datatracker/ietf/mailinglists/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

52 lines
1.9 KiB
Python

# Generated by Django 2.2.28 on 2023-03-20 19:22
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
initial = True
dependencies = [
('person', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='List',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=32)),
('description', models.CharField(max_length=256)),
('advertised', models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name='Subscribed',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(auto_now_add=True)),
('email', models.CharField(max_length=128, validators=[django.core.validators.EmailValidator()])),
('lists', models.ManyToManyField(to='mailinglists.List')),
],
options={
'verbose_name_plural': 'Subscribed',
},
),
migrations.CreateModel(
name='Allowlisted',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('time', models.DateTimeField(auto_now_add=True)),
('email', models.CharField(max_length=64, validators=[django.core.validators.EmailValidator()], verbose_name='Email address')),
('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')),
],
options={
'verbose_name_plural': 'Allowlisted',
},
),
]