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.

36 lines
1.2 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. # Generated by Django 3.2.3 on 2021-06-07 01:48
  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", "0014_auto_20210603_0438"),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name="ExampleState",
  13. fields=[
  14. ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
  15. ("confirmed_at", models.DateTimeField(auto_now=True)),
  16. (
  17. "confirmed_by",
  18. models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
  19. ),
  20. (
  21. "example",
  22. models.ForeignKey(
  23. on_delete=django.db.models.deletion.CASCADE, related_name="states", to="api.example"
  24. ),
  25. ),
  26. ],
  27. options={
  28. "unique_together": {("example", "confirmed_by")},
  29. },
  30. ),
  31. ]