0002_userinstitution_user_institution.py 903 B

123456789101112131415161718192021222324252627282930313233
  1. # Generated by Django 5.1.1 on 2024-10-01 11:00
  2. import django.db.models.deletion
  3. from django.db import migrations, models
  4. class Migration(migrations.Migration):
  5. dependencies = [
  6. ("account", "0001_initial"),
  7. ]
  8. operations = [
  9. migrations.CreateModel(
  10. name="UserInstitution",
  11. fields=[
  12. ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
  13. ("name", models.CharField(max_length=255)),
  14. ],
  15. ),
  16. migrations.AddField(
  17. model_name="user",
  18. name="institution",
  19. field=models.ForeignKey(
  20. blank=True,
  21. null=True,
  22. on_delete=django.db.models.deletion.CASCADE,
  23. related_name="users",
  24. to="account.userinstitution",
  25. ),
  26. ),
  27. ]