1
- # Generated by Django 2.1.7 on 2019-06-21 06:05
1
+ # Generated by Django 2.1.7 on 2019-10-25 16:26
2
2
3
3
from django .conf import settings
4
4
from django .db import migrations , models
@@ -10,8 +10,8 @@ class Migration(migrations.Migration):
10
10
initial = True
11
11
12
12
dependencies = [
13
- ('contenttypes' , '0002_remove_content_type_name' ),
14
13
migrations .swappable_dependency (settings .AUTH_USER_MODEL ),
14
+ ('contenttypes' , '0002_remove_content_type_name' ),
15
15
]
16
16
17
17
operations = [
@@ -23,6 +23,7 @@ class Migration(migrations.Migration):
23
23
('meta' , models .TextField (default = '{}' )),
24
24
('created_at' , models .DateTimeField (auto_now_add = True )),
25
25
('updated_at' , models .DateTimeField (auto_now = True )),
26
+ ('annotations_approved_by' , models .ForeignKey (null = True , on_delete = django .db .models .deletion .SET_NULL , to = settings .AUTH_USER_MODEL )),
26
27
],
27
28
),
28
29
migrations .CreateModel (
@@ -60,12 +61,31 @@ class Migration(migrations.Migration):
60
61
('updated_at' , models .DateTimeField (auto_now = True )),
61
62
('project_type' , models .CharField (choices = [('DocumentClassification' , 'document classification' ), ('SequenceLabeling' , 'sequence labeling' ), ('Seq2seq' , 'sequence to sequence' )], max_length = 30 )),
62
63
('randomize_document_order' , models .BooleanField (default = False )),
64
+ ('collaborative_annotation' , models .BooleanField (default = False )),
63
65
],
64
66
options = {
65
67
'abstract' : False ,
66
68
'base_manager_name' : 'objects' ,
67
69
},
68
70
),
71
+ migrations .CreateModel (
72
+ name = 'Role' ,
73
+ fields = [
74
+ ('id' , models .AutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
75
+ ('name' , models .CharField (max_length = 100 , unique = True )),
76
+ ('description' , models .TextField (default = '' )),
77
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
78
+ ('updated_at' , models .DateTimeField (auto_now = True )),
79
+ ],
80
+ ),
81
+ migrations .CreateModel (
82
+ name = 'RoleMapping' ,
83
+ fields = [
84
+ ('id' , models .AutoField (auto_created = True , primary_key = True , serialize = False , verbose_name = 'ID' )),
85
+ ('created_at' , models .DateTimeField (auto_now_add = True )),
86
+ ('updated_at' , models .DateTimeField (auto_now = True )),
87
+ ],
88
+ ),
69
89
migrations .CreateModel (
70
90
name = 'Seq2seqAnnotation' ,
71
91
fields = [
@@ -74,7 +94,7 @@ class Migration(migrations.Migration):
74
94
('manual' , models .BooleanField (default = False )),
75
95
('created_at' , models .DateTimeField (auto_now_add = True )),
76
96
('updated_at' , models .DateTimeField (auto_now = True )),
77
- ('text' , models .TextField ( )),
97
+ ('text' , models .CharField ( max_length = 500 )),
78
98
('document' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , related_name = 'seq2seq_annotations' , to = 'api.Document' )),
79
99
('user' , models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = settings .AUTH_USER_MODEL )),
80
100
],
@@ -127,6 +147,21 @@ class Migration(migrations.Migration):
127
147
},
128
148
bases = ('api.project' ,),
129
149
),
150
+ migrations .AddField (
151
+ model_name = 'rolemapping' ,
152
+ name = 'project' ,
153
+ field = models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , related_name = 'role_mappings' , to = 'api.Project' ),
154
+ ),
155
+ migrations .AddField (
156
+ model_name = 'rolemapping' ,
157
+ name = 'role' ,
158
+ field = models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , to = 'api.Role' ),
159
+ ),
160
+ migrations .AddField (
161
+ model_name = 'rolemapping' ,
162
+ name = 'user' ,
163
+ field = models .ForeignKey (on_delete = django .db .models .deletion .CASCADE , related_name = 'role_mappings' , to = settings .AUTH_USER_MODEL ),
164
+ ),
130
165
migrations .AddField (
131
166
model_name = 'project' ,
132
167
name = 'polymorphic_ctype' ,
@@ -161,9 +196,17 @@ class Migration(migrations.Migration):
161
196
name = 'sequenceannotation' ,
162
197
unique_together = {('document' , 'user' , 'label' , 'start_offset' , 'end_offset' )},
163
198
),
199
+ migrations .AlterUniqueTogether (
200
+ name = 'seq2seqannotation' ,
201
+ unique_together = {('document' , 'user' , 'text' )},
202
+ ),
203
+ migrations .AlterUniqueTogether (
204
+ name = 'rolemapping' ,
205
+ unique_together = {('user' , 'project' , 'role' )},
206
+ ),
164
207
migrations .AlterUniqueTogether (
165
208
name = 'label' ,
166
- unique_together = {('project' , 'text' ), ( 'project' , 'prefix_key' , 'suffix_key' ) },
209
+ unique_together = {('project' , 'text' )},
167
210
),
168
211
migrations .AlterUniqueTogether (
169
212
name = 'documentannotation' ,
0 commit comments