mirror of https://github.com/doccano/doccano.git
pythondatasetsactive-learningtext-annotationdatasetnatural-language-processingdata-labelingmachine-learningannotation-tool
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.
48 lines
1.9 KiB
48 lines
1.9 KiB
# Generated by Django 3.1.6 on 2021-03-02 10:13
|
|
|
|
import django.db.models.deletion
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("api", "0008_auto_20210302_1013"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel( # id_autogen, annotation_id_1, annotation_id_2, type, author, timestamp
|
|
name="RelationTypes",
|
|
fields=[
|
|
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
|
("name", models.TextField(max_length=50)),
|
|
("color", models.TextField(max_length=20)),
|
|
(
|
|
"project",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE, related_name="relation_types", to="api.Project"
|
|
),
|
|
),
|
|
],
|
|
),
|
|
migrations.CreateModel( # id_autogen, annotation_id_1, annotation_id_2, type, author, timestamp
|
|
name="AnnotationRelations",
|
|
fields=[
|
|
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
|
|
("annotation_id_1", models.IntegerField()),
|
|
("annotation_id_2", models.IntegerField()),
|
|
("type", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="api.RelationTypes")),
|
|
("user", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
("timestamp", models.DateTimeField(auto_now_add=True)),
|
|
(
|
|
"project",
|
|
models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
related_name="annotation_relations",
|
|
to="api.Project",
|
|
),
|
|
),
|
|
],
|
|
),
|
|
]
|