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.

43 lines
1.8 KiB

  1. # Generated by Django 2.1.7 on 2019-07-25 03:33
  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. dependencies = [
  7. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  8. ('api', '0003_support_sql_server'),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='Role',
  13. fields=[
  14. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('name', models.CharField(max_length=100, unique=True)),
  16. ('description', models.TextField(default='', null=True)),
  17. ('created_at', models.DateTimeField(auto_now_add=True)),
  18. ('updated_at', models.DateTimeField(auto_now=True)),
  19. ],
  20. ),
  21. migrations.CreateModel(
  22. name='RoleMapping',
  23. fields=[
  24. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  25. ('created_at', models.DateTimeField(auto_now_add=True)),
  26. ('updated_at', models.DateTimeField(auto_now=True)),
  27. ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
  28. related_name='role_mappings', to='api.Project')),
  29. ('role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Role')),
  30. ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
  31. related_name='role_mappings', to=settings.AUTH_USER_MODEL)),
  32. ],
  33. ),
  34. migrations.AlterUniqueTogether(
  35. name='rolemapping',
  36. unique_together={('user', 'project', 'role')},
  37. ),
  38. ]