0001_initial.py 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # Generated by Django 3.2.5 on 2021-08-07 09:49
  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='DateMission',
  13. fields=[
  14. ('date_mission_id', models.AutoField(primary_key=True, serialize=False)),
  15. ('date', models.DateField()),
  16. ('is_date_finished', models.BooleanField(default=False)),
  17. ],
  18. ),
  19. migrations.CreateModel(
  20. name='TimeMission',
  21. fields=[
  22. ('time_mission_id', models.AutoField(primary_key=True, serialize=False)),
  23. ('time', models.DateTimeField()),
  24. ('is_time_finished', models.BooleanField(default=False)),
  25. ('date_mission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='TimeMission', to='CrawKeywords.datemission')),
  26. ],
  27. ),
  28. migrations.CreateModel(
  29. name='PageMission',
  30. fields=[
  31. ('page_mission_id', models.AutoField(primary_key=True, serialize=False)),
  32. ('page', models.BigIntegerField()),
  33. ('finisher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='PageMission', to=settings.AUTH_USER_MODEL)),
  34. ('time_mission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='PageMission', to='CrawKeywords.timemission')),
  35. ],
  36. ),
  37. migrations.CreateModel(
  38. name='KeywordMission',
  39. fields=[
  40. ('keyword_mission_id', models.AutoField(primary_key=True, serialize=False)),
  41. ('keyword', models.CharField(max_length=256)),
  42. ('publisher', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='publisher', to=settings.AUTH_USER_MODEL)),
  43. ],
  44. ),
  45. migrations.AddField(
  46. model_name='datemission',
  47. name='keyword_mission',
  48. field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='DateMission', to='CrawKeywords.keywordmission'),
  49. ),
  50. migrations.CreateModel(
  51. name='ArticleMission',
  52. fields=[
  53. ('article_mission_id', models.AutoField(primary_key=True, serialize=False)),
  54. ('article_id', models.CharField(max_length=100)),
  55. ('publish_time', models.DateTimeField()),
  56. ('content', models.TextField()),
  57. ('like_count', models.IntegerField()),
  58. ('comment_count', models.IntegerField()),
  59. ('page_mission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ArticleMission', to='CrawKeywords.pagemission')),
  60. ],
  61. ),
  62. ]