forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0041_add_documentactionholder.py
More file actions
35 lines (30 loc) · 1.33 KB
/
0041_add_documentactionholder.py
File metadata and controls
35 lines (30 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Generated by Django 2.2.17 on 2021-01-15 12:50
import datetime
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
dependencies = [
('person', '0018_auto_20201109_0439'),
('doc', '0040_add_changed_action_holders_docevent_type'),
]
operations = [
migrations.CreateModel(
name='DocumentActionHolder',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time_added', models.DateTimeField(default=datetime.datetime.now)),
('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')),
('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
],
),
migrations.AddField(
model_name='document',
name='action_holders',
field=models.ManyToManyField(blank=True, through='doc.DocumentActionHolder', to='person.Person'),
),
migrations.AddConstraint(
model_name='documentactionholder',
constraint=models.UniqueConstraint(fields=('document', 'person'), name='unique_action_holder'),
),
]