Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0001_initial.py 3.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. # Generated by Django 2.1.2 on 2018-10-30 10:43
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import django.utils.timezone
  6. import taggit.managers
  7. class Migration(migrations.Migration):
  8. initial = True
  9. dependencies = [
  10. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  11. ('taggit', '0001_initial'),
  12. ]
  13. operations = [
  14. migrations.CreateModel(
  15. name='CustomUser',
  16. fields=[
  17. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  18. ('tags', taggit.managers.TaggableManager(help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
  19. ('user', models.OneToOneField(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  20. ],
  21. ),
  22. migrations.CreateModel(
  23. name='Post',
  24. fields=[
  25. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  26. ('title', models.CharField(max_length=200)),
  27. ('text', models.TextField()),
  28. ('created_date', models.DateTimeField(default=django.utils.timezone.now)),
  29. ('published_date', models.DateTimeField(blank=True, null=True)),
  30. ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  31. ('tags', taggit.managers.TaggableManager(help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
  32. ],
  33. ),
  34. migrations.CreateModel(
  35. name='Report',
  36. fields=[
  37. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  38. ('report_text', models.TextField()),
  39. ],
  40. ),
  41. migrations.CreateModel(
  42. name='ReportRecipient',
  43. fields=[
  44. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  45. ('email', models.EmailField(max_length=254)),
  46. ],
  47. ),
  48. migrations.CreateModel(
  49. name='ScheduledReport',
  50. fields=[
  51. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  52. ('subject', models.CharField(max_length=200)),
  53. ('last_run_at', models.DateTimeField(blank=True, null=True)),
  54. ('next_run_at', models.DateTimeField(blank=True, null=True)),
  55. ('cron_expression', models.CharField(max_length=200)),
  56. ],
  57. ),
  58. migrations.CreateModel(
  59. name='ScheduledReportGroup',
  60. fields=[
  61. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  62. ('report', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='report', to='application.Report')),
  63. ('scheduled_report', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='relatedscheduledreport', to='application.ScheduledReport')),
  64. ],
  65. ),
  66. migrations.AddField(
  67. model_name='reportrecipient',
  68. name='scheduled_report',
  69. field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reportrecep', to='application.ScheduledReport'),
  70. ),
  71. ]