0001_initial.py 1.7 KB

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