0001_initial.py 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Generated by Django 2.0.3 on 2018-04-04 15:39
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. class Migration(migrations.Migration):
  6. initial = True
  7. dependencies = [
  8. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='Canvas',
  13. fields=[
  14. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('title', models.CharField(db_index=True, help_text='The title of the canvas', max_length=255)),
  16. ('date_created', models.DateTimeField(auto_now_add=True, db_index=True)),
  17. ('date_modified', models.DateTimeField(auto_now=True, db_index=True)),
  18. ('public', models.BooleanField(db_index=True, default=False)),
  19. ('admins', models.ManyToManyField(related_name='admins', to=settings.AUTH_USER_MODEL)),
  20. ('users', models.ManyToManyField(related_name='users', to=settings.AUTH_USER_MODEL)),
  21. ],
  22. options={
  23. 'ordering': ('date_modified',),
  24. },
  25. ),
  26. migrations.CreateModel(
  27. name='CanvasTag',
  28. fields=[
  29. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  30. ('text', models.CharField(max_length=255)),
  31. ],
  32. ),
  33. migrations.CreateModel(
  34. name='Comment',
  35. fields=[
  36. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  37. ('text', models.CharField(help_text='Type a comment', max_length=255)),
  38. ('resolved', models.BooleanField(db_index=True, default=False)),
  39. ],
  40. options={
  41. 'ordering': ('resolved',),
  42. },
  43. ),
  44. migrations.CreateModel(
  45. name='Idea',
  46. fields=[
  47. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  48. ('text', models.CharField(help_text='The description of the idea', max_length=255)),
  49. ('date_created', models.DateTimeField(auto_now_add=True, db_index=True)),
  50. ('date_modified', models.DateTimeField(auto_now=True, db_index=True)),
  51. ('canvas', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.Canvas')),
  52. ('canvas_tags', models.ManyToManyField(blank=True, related_name='canvas_tags', to='catalog.CanvasTag')),
  53. ],
  54. options={
  55. 'ordering': ('date_created',),
  56. },
  57. ),
  58. migrations.CreateModel(
  59. name='IdeaCategory',
  60. fields=[
  61. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  62. ('description', models.CharField(help_text='Category Description', max_length=50)),
  63. ],
  64. ),
  65. migrations.AddField(
  66. model_name='idea',
  67. name='category',
  68. field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.IdeaCategory'),
  69. ),
  70. migrations.AddField(
  71. model_name='comment',
  72. name='idea',
  73. field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='catalog.Idea'),
  74. ),
  75. migrations.AddField(
  76. model_name='comment',
  77. name='user',
  78. field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
  79. ),
  80. ]