0001_initial.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # Generated by Django 3.0.3 on 2020-02-28 17:52
  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. ("organizations_ext", "0001_squashed_0009_organization_scrub_ip_addresses"),
  10. (
  11. "projects",
  12. "0001_squashed_0009_alter_project_id_alter_projectcounter_id_and_more",
  13. ),
  14. ]
  15. operations = [
  16. migrations.CreateModel(
  17. name="Team",
  18. fields=[
  19. (
  20. "id",
  21. models.AutoField(
  22. auto_created=True,
  23. primary_key=True,
  24. serialize=False,
  25. verbose_name="ID",
  26. ),
  27. ),
  28. ("created", models.DateTimeField(auto_now_add=True, db_index=True)),
  29. ("slug", models.SlugField()),
  30. ("members", models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
  31. (
  32. "organization",
  33. models.ForeignKey(
  34. on_delete=django.db.models.deletion.CASCADE,
  35. related_name="teams",
  36. to="organizations_ext.Organization",
  37. ),
  38. ),
  39. ("projects", models.ManyToManyField(to="projects.Project")),
  40. ],
  41. options={
  42. "unique_together": {("slug", "organization")},
  43. },
  44. ),
  45. ]