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.

63 lines
1.9 KiB

  1. # Generated by Django 2.1.5 on 2019-01-12 14:26
  2. from django.conf import settings
  3. from django.db import migrations, models
  4. import django.db.models.deletion
  5. import uuid
  6. class Migration(migrations.Migration):
  7. dependencies = [
  8. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  9. ("accounts", "0016_remove_profile_bill_to"),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name="Project",
  14. fields=[
  15. (
  16. "id",
  17. models.AutoField(
  18. auto_created=True,
  19. primary_key=True,
  20. serialize=False,
  21. verbose_name="ID",
  22. ),
  23. ),
  24. (
  25. "code",
  26. models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
  27. ),
  28. ("name", models.CharField(blank=True, max_length=200)),
  29. ("api_key", models.CharField(blank=True, max_length=128)),
  30. ("api_key_readonly", models.CharField(blank=True, max_length=128)),
  31. (
  32. "owner",
  33. models.ForeignKey(
  34. on_delete=django.db.models.deletion.CASCADE,
  35. to=settings.AUTH_USER_MODEL,
  36. ),
  37. ),
  38. ],
  39. ),
  40. migrations.AddField(
  41. model_name="member",
  42. name="project",
  43. field=models.ForeignKey(
  44. null=True,
  45. on_delete=django.db.models.deletion.CASCADE,
  46. to="accounts.Project",
  47. ),
  48. ),
  49. migrations.AddField(
  50. model_name="profile",
  51. name="current_project",
  52. field=models.ForeignKey(
  53. null=True,
  54. on_delete=django.db.models.deletion.SET_NULL,
  55. to="accounts.Project",
  56. ),
  57. ),
  58. ]