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.

37 lines
1.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
  1. # Generated by Django 2.1.11 on 2019-12-12 19:11
  2. import django.db.models.deletion
  3. from django.conf import settings
  4. from django.db import migrations, models
  5. class Migration(migrations.Migration):
  6. dependencies = [
  7. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  8. ("api", "0001_initial"),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name="Comment",
  13. fields=[
  14. ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
  15. ("text", models.TextField()),
  16. ("created_at", models.DateTimeField(auto_now_add=True)),
  17. ("updated_at", models.DateTimeField(auto_now=True)),
  18. (
  19. "document",
  20. models.ForeignKey(
  21. on_delete=django.db.models.deletion.CASCADE, related_name="comments", to="api.Document"
  22. ),
  23. ),
  24. (
  25. "user",
  26. models.ForeignKey(
  27. null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL
  28. ),
  29. ),
  30. ],
  31. ),
  32. ]