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.

59 lines
2.3 KiB

  1. # Generated by Django 4.0.2 on 2022-02-22 06:15
  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. ("label_types", "0006_auto_20220222_0512"),
  9. ("examples", "0002_alter_example_project"),
  10. ("labels", "0006_rename_relation_relationold"),
  11. ]
  12. operations = [
  13. migrations.CreateModel(
  14. name="RelationNew",
  15. fields=[
  16. ("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
  17. ("prob", models.FloatField(default=0.0)),
  18. ("manual", models.BooleanField(default=False)),
  19. ("created_at", models.DateTimeField(auto_now_add=True)),
  20. ("updated_at", models.DateTimeField(auto_now=True)),
  21. (
  22. "direction",
  23. models.CharField(
  24. choices=[("left", "left"), ("right", "right"), ("undirected", "undirected")],
  25. default="undirected",
  26. max_length=10,
  27. ),
  28. ),
  29. (
  30. "example",
  31. models.ForeignKey(
  32. on_delete=django.db.models.deletion.CASCADE, related_name="relations", to="examples.example"
  33. ),
  34. ),
  35. (
  36. "from_id",
  37. models.ForeignKey(
  38. on_delete=django.db.models.deletion.CASCADE, related_name="from_relations", to="labels.span"
  39. ),
  40. ),
  41. (
  42. "to_id",
  43. models.ForeignKey(
  44. on_delete=django.db.models.deletion.CASCADE, related_name="to_relations", to="labels.span"
  45. ),
  46. ),
  47. ("type", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="label_types.relationtype")),
  48. ("user", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  49. ],
  50. options={
  51. "abstract": False,
  52. },
  53. ),
  54. ]