0001_initial.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Generated by Django 5.1.1 on 2024-10-01 09:51
  2. import django.db.models.deletion
  3. from django.db import migrations, models
  4. class Migration(migrations.Migration):
  5. initial = True
  6. dependencies = []
  7. operations = [
  8. migrations.CreateModel(
  9. name="NationalRegion",
  10. fields=[
  11. (
  12. "id",
  13. models.BigAutoField(
  14. auto_created=True,
  15. primary_key=True,
  16. serialize=False,
  17. verbose_name="ID",
  18. ),
  19. ),
  20. ("name", models.CharField(max_length=255)),
  21. ("nuts_code", models.CharField(max_length=255)),
  22. ],
  23. ),
  24. migrations.CreateModel(
  25. name="County",
  26. fields=[
  27. (
  28. "id",
  29. models.BigAutoField(
  30. auto_created=True,
  31. primary_key=True,
  32. serialize=False,
  33. verbose_name="ID",
  34. ),
  35. ),
  36. ("name", models.CharField(max_length=255)),
  37. ("code", models.CharField(max_length=255)),
  38. ("nuts_code", models.CharField(max_length=255)),
  39. (
  40. "region",
  41. models.ForeignKey(
  42. on_delete=django.db.models.deletion.CASCADE,
  43. related_name="counties",
  44. to="core.nationalregion",
  45. ),
  46. ),
  47. ],
  48. ),
  49. ]