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.

35 lines
1.7 KiB

  1. # Generated by Django 3.1.6 on 2021-03-02 10:13
  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. ('api', '0008_auto_20210302_1013'),
  8. ]
  9. operations = [
  10. migrations.CreateModel( # id_autogen, annotation_id_1, annotation_id_2, type, author, timestamp
  11. name='RelationTypes',
  12. fields=[
  13. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  14. ('name', models.TextField(max_length=50)),
  15. ('color', models.TextField(max_length=20)),
  16. ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='relation_types', to='api.Project'))
  17. ],
  18. ),
  19. migrations.CreateModel( # id_autogen, annotation_id_1, annotation_id_2, type, author, timestamp
  20. name='AnnotationRelations',
  21. fields=[
  22. ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  23. ('annotation_id_1', models.IntegerField()),
  24. ('annotation_id_2', models.IntegerField()),
  25. ('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.RelationTypes')),
  26. ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  27. ('timestamp', models.DateTimeField(auto_now_add=True)),
  28. ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='annotation_relations', to='api.Project'))
  29. ],
  30. )
  31. ]