datatracker/ietf/liaisons/migrations/0001_initial.py
Jennifer Richards 6b826fd985
refactor: Purge old migrations and update ci to build on a clean schema (#5431)
* refactor: Remove all existing migrations

* refactor: Create clean set of migrations

* chore: Skip check_statetype_slugs when DB is not yet populated

* fix: Do not cache active_groups_menu on module import

* fix: Do not patch timezone awareness out of oidc-provider

* refactor: Migrate to create postgres schema, only use pgloader for data

* ci: Use migration scripts from feat/pg-migrations branch

* Revert "ci: Use migration scripts from feat/pg-migrations branch"

This reverts commit c82f64c614241ccede4865a50d494725c8a47c15.

* ci: Run check before migrate

* fix: Remove redundant migration caused by merge error

* chore: Add casts/ALTER TABLEs to eliminate pgloader errors/warnings

* chore: Change schema name to match docker image assumptions

* chore: Clear out schema so we get a clean start in case of a retry
2023-03-28 18:06:07 +09:00

110 lines
5.3 KiB
Python

# Generated by Django 2.2.28 on 2023-03-20 19:22
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('group', '0001_initial'),
('name', '0001_initial'),
('person', '0001_initial'),
('doc', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='LiaisonStatement',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('to_contacts', models.CharField(help_text='Contacts at recipient group', max_length=2000)),
('response_contacts', models.CharField(blank=True, help_text='Where to send a response', max_length=255)),
('technical_contacts', models.CharField(blank=True, help_text='Who to contact for clarification', max_length=255)),
('action_holder_contacts', models.CharField(blank=True, help_text='Who makes sure action is completed', max_length=255)),
('cc_contacts', models.TextField(blank=True)),
('deadline', models.DateField(blank=True, null=True)),
('other_identifiers', models.TextField(blank=True, null=True)),
('body', models.TextField(blank=True)),
],
options={
'ordering': ['id'],
},
),
migrations.CreateModel(
name='RelatedLiaisonStatement',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('relationship', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocRelationshipName')),
('source', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='source_of_set', to='liaisons.LiaisonStatement')),
('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='target_of_set', to='liaisons.LiaisonStatement')),
],
),
migrations.CreateModel(
name='LiaisonStatementEvent',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(auto_now_add=True)),
('desc', models.TextField()),
('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
('statement', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='liaisons.LiaisonStatement')),
('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.LiaisonStatementEventTypeName')),
],
options={
'ordering': ['-time', '-id'],
},
),
migrations.CreateModel(
name='LiaisonStatementAttachment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('removed', models.BooleanField(default=False)),
('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')),
('statement', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='liaisons.LiaisonStatement')),
],
),
migrations.AddField(
model_name='liaisonstatement',
name='attachments',
field=models.ManyToManyField(blank=True, through='liaisons.LiaisonStatementAttachment', to='doc.Document'),
),
migrations.AddField(
model_name='liaisonstatement',
name='from_contact',
field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Email'),
),
migrations.AddField(
model_name='liaisonstatement',
name='from_groups',
field=models.ManyToManyField(blank=True, related_name='liaisonstatement_from_set', to='group.Group'),
),
migrations.AddField(
model_name='liaisonstatement',
name='purpose',
field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.LiaisonStatementPurposeName'),
),
migrations.AddField(
model_name='liaisonstatement',
name='state',
field=ietf.utils.models.ForeignKey(default='pending', on_delete=django.db.models.deletion.CASCADE, to='name.LiaisonStatementState'),
),
migrations.AddField(
model_name='liaisonstatement',
name='tags',
field=models.ManyToManyField(blank=True, to='name.LiaisonStatementTagName'),
),
migrations.AddField(
model_name='liaisonstatement',
name='to_groups',
field=models.ManyToManyField(blank=True, related_name='liaisonstatement_to_set', to='group.Group'),
),
migrations.AddIndex(
model_name='liaisonstatementevent',
index=models.Index(fields=['-time', '-id'], name='liaisons_li_time_3e1646_idx'),
),
]