diff --git a/docker/scripts/db-pg-migrate.sh b/docker/scripts/db-pg-migrate.sh index 21acb4aea..722e6ff30 100644 --- a/docker/scripts/db-pg-migrate.sh +++ b/docker/scripts/db-pg-migrate.sh @@ -23,52 +23,127 @@ echo "Waiting for DB containers to come online..." /usr/local/bin/wait-for db:3306 -- echo "MariaDB ready" /usr/local/bin/wait-for pgdb:5432 -- echo "PostgreSQL ready" -# Alter search path -psql -U django -h pgdb -d ietf -v ON_ERROR_STOP=1 -c '\x' -c 'ALTER USER django set search_path=ietf_utf8,django,public;' +# Set up schema and alter search path +psql -U django -h pgdb -d ietf -v ON_ERROR_STOP=1 -c '\x' \ + -c 'DROP SCHEMA IF EXISTS ietf_utf8 CASCADE;' \ + -c 'CREATE SCHEMA ietf_utf8;' \ + -c 'ALTER DATABASE ietf SET search_path=ietf_utf8,public;' \ + -c 'ALTER USER django set search_path=ietf_utf8,django,public;' \ + -c 'CREATE EXTENSION citext WITH SCHEMA ietf_utf8;' # Copy settings files cp ./docker/configs/settings_local.py ./ietf/settings_local.py cp ./docker/configs/settings_mysqldb.py ./ietf/settings_mysqldb.py cp ./docker/configs/settings_postgresqldb.py ./ietf/settings_postgresqldb.py -# Switch to MySQL config -cat ./ietf/settings_local.py | sed 's/from ietf.settings_postgresqldb import DATABASES/from ietf.settings_mysqldb import DATABASES/' > /tmp/settings_local.py && mv /tmp/settings_local.py ./ietf/settings_local.py - -# Initial checks -echo "Running initial checks..." -/usr/local/bin/python ./ietf/manage.py check --settings=settings_local - -# The mysql database is always freshly build container from the -# image build of last-night's dump when this script is run -# The first run of migrations will run anything merged from main that -# that hasn't been released, and the few pre-engine-shift migrations -# that the feat/postgres branch adds. It is guaranteed to fail at -# utils.migrations.0004_pause_to_change_database_engines (where it -# fails on purpose, hence the `|| true` so we may proceed -/usr/local/bin/python ./ietf/manage.py migrate --settings=settings_local || true - # Switch to PostgreSQL config -cat ./ietf/settings_local.py | sed 's/from ietf.settings_mysqldb import DATABASES/from ietf.settings_postgresqldb import DATABASES/' > /tmp/settings_local.py && mv /tmp/settings_local.py ./ietf/settings_local.py +#cat ./ietf/settings_local.py | sed 's/from ietf.settings_mysqldb import DATABASES/from ietf.settings_postgresqldb import DATABASES/' > /tmp/settings_local.py && mv /tmp/settings_local.py ./ietf/settings_local.py cat ./ietf/settings_postgresqldb.py | sed "s/'db'/'pgdb'/" > /tmp/settings_postgresqldb.py && mv /tmp/settings_postgresqldb.py ./ietf/settings_postgresqldb.py -# Now transfer the migrated database from mysql to postgres unless that's already happened. +# Migrate empty schema into postgres database +/usr/local/bin/python ./ietf/manage.py check --settings=settings_local +/usr/local/bin/python ./ietf/manage.py migrate --settings=settings_local + +# Now transfer data from mysql to postgres echo "Transferring migrated database from MySQL to PostgreSQL..." -EMPTY_CHECK=`psql -U django -h pgdb -d ietf -c "\dt" 2>&1` -if echo ${EMPTY_CHECK} | grep -q "Did not find any relations."; then - cat << EOF > cast.load +cat << EOF > transforms.lisp +; transform functions for IETF datatracker conversion +(in-package :pgloader.transforms) +(defun integer-to-interval (dt) + "Convert microseconds to a postgres interval value" + (multiple-value-bind (totsec useconds) (floor (parse-integer dt) 1000000) + (multiple-value-bind (totmin seconds) (floor totsec 60) + (multiple-value-bind (tothours minutes) (floor totmin 60) + (multiple-value-bind (totdays hours) (floor tothours 24) + (multiple-value-bind (totmonths days) (floor totdays 30) + (multiple-value-bind (years months) (floor totmonths 12) + (format nil "~a years ~a months ~a days ~a hours ~a minutes ~a seconds ~a microseconds" + years months days hours minutes seconds useconds)))))))) +EOF +cat << EOF > cast.load LOAD DATABASE FROM mysql://django:RkTkDPFnKpko@db/ietf_utf8 INTO postgresql://django:RkTkDPFnKpko@pgdb/ietf -WITH workers = 3, concurrency = 1, batch size = 1MB, batch rows = 1000 -CAST type varchar to text drop typemod; +WITH workers = 3, concurrency = 1, batch size = 1MB, batch rows = 1000, + data only, truncate, include no drop, create no tables, create no indexes, reset sequences +EXCLUDING TABLE NAMES MATCHING + 'django_migrations', + 'community_communitylist_added_ids', + 'community_documentchangedates', + 'community_expectedchange', + 'community_listnotification', + 'community_rule_cached_ids', + 'draft_versions_mirror', + 'iesg_wgaction', + 'ietfworkflows_annotationtag', + 'ietfworkflows_statedescription', + 'ietfworkflows_stream', + 'ietfworkflows_wgworkflow', + 'ipr_iprselecttype', + 'ipr_iprlicensing', + 'request_profiler_profilingrecord', + 'request_profiler_ruleset', + 'south_migrationhistory', + 'submit_idapproveddetail', + 'workflows_state', + 'workflows_state_transitions', + 'workflows_transition', + 'workflows_workflow' +CAST TYPE int with extra auto_increment TO integer, + TYPE int TO integer, + COLUMN django_admin_log.action_flag TO smallint, + COLUMN meeting_session_materials.order TO smallint, + COLUMN community_emailsubscription.email_id TO text, + COLUMN doc_dochistory.shepherd_id TO text, + COLUMN doc_document.shepherd_id TO text, + COLUMN doc_documentauthor.email_id TO text, + COLUMN doc_dochistoryauthor.email_id TO text, + COLUMN group_role.email_id TO text, + COLUMN group_rolehistory.email_id TO text, + COLUMN liaisons_liaisonstatement.from_contact_id TO text, + COLUMN nomcom_nominee.email_id TO text, + COLUMN person_email.address TO text, + COLUMN person_historicalemail.address TO text, + COLUMN review_historicalreviewassignment.reviewer_id TO text, + COLUMN review_reviewassignment.reviewer_id TO text, + COLUMN meeting_session.requested_duration TO interval USING integer-to-interval, + COLUMN meeting_timeslot.duration TO interval USING integer-to-interval, + COLUMN meeting_meeting.idsubmit_cutoff_time_utc TO interval USING integer-to-interval, + COLUMN meeting_meeting.idsubmit_cutoff_warning_days TO interval USING integer-to-interval +BEFORE LOAD DO + -- must change person_email before any tables with FK constraints to address + \$\$ ALTER TABLE person_email ALTER COLUMN address TYPE text; \$\$, + \$\$ ALTER TABLE community_emailsubscription ALTER COLUMN email_id TYPE text; \$\$, + \$\$ ALTER TABLE doc_dochistory ALTER COLUMN shepherd_id TYPE text; \$\$, + \$\$ ALTER TABLE doc_document ALTER COLUMN shepherd_id TYPE text; \$\$, + \$\$ ALTER TABLE doc_documentauthor ALTER COLUMN email_id TYPE text; \$\$, + \$\$ ALTER TABLE doc_dochistoryauthor ALTER COLUMN email_id TYPE text; \$\$, + \$\$ ALTER TABLE group_role ALTER COLUMN email_id TYPE text; \$\$, + \$\$ ALTER TABLE group_rolehistory ALTER COLUMN email_id TYPE text; \$\$, + \$\$ ALTER TABLE liaisons_liaisonstatement ALTER COLUMN from_contact_id TYPE text; \$\$, + \$\$ ALTER TABLE nomcom_nominee ALTER COLUMN email_id TYPE text; \$\$, + \$\$ ALTER TABLE person_historicalemail ALTER COLUMN address TYPE text; \$\$, + \$\$ ALTER TABLE review_historicalreviewassignment ALTER COLUMN reviewer_id TYPE text; \$\$, + \$\$ ALTER TABLE review_reviewassignment ALTER COLUMN reviewer_id TYPE text; \$\$ +AFTER LOAD DO + \$\$ ALTER TABLE community_emailsubscription ALTER COLUMN email_id TYPE citext; \$\$, + \$\$ ALTER TABLE doc_dochistory ALTER COLUMN shepherd_id TYPE citext; \$\$, + \$\$ ALTER TABLE doc_document ALTER COLUMN shepherd_id TYPE citext; \$\$, + \$\$ ALTER TABLE doc_documentauthor ALTER COLUMN email_id TYPE citext; \$\$, + \$\$ ALTER TABLE doc_dochistoryauthor ALTER COLUMN email_id TYPE citext; \$\$, + \$\$ ALTER TABLE group_role ALTER COLUMN email_id TYPE citext; \$\$, + \$\$ ALTER TABLE group_rolehistory ALTER COLUMN email_id TYPE citext; \$\$, + \$\$ ALTER TABLE liaisons_liaisonstatement ALTER COLUMN from_contact_id TYPE citext; \$\$, + \$\$ ALTER TABLE nomcom_nominee ALTER COLUMN email_id TYPE citext; \$\$, + \$\$ ALTER TABLE person_historicalemail ALTER COLUMN address TYPE citext; \$\$, + \$\$ ALTER TABLE review_historicalreviewassignment ALTER COLUMN reviewer_id TYPE citext; \$\$, + \$\$ ALTER TABLE review_reviewassignment ALTER COLUMN reviewer_id TYPE citext; \$\$, + -- must change person_email after any tables with FK constraints to address + \$\$ ALTER TABLE person_email ALTER COLUMN address TYPE citext; \$\$ +; EOF - pgloader --verbose --logfile=ietf_pgloader.run --summary=ietf_pgloader.summary cast.load - rm cast.load - /usr/local/bin/python ./ietf/manage.py migrate --settings=settings_local -else - echo "The postgres database is in an unexpected state" - echo ${EMPTY_CHECK} -fi +pgloader --verbose --logfile=ietf_pgloader.run --summary=ietf_pgloader.summary --load-lisp-file transforms.lisp cast.load +rm cast.load transforms.lisp # Create export dump echo "Creating export dump..." diff --git a/ietf/community/migrations/0001_initial.py b/ietf/community/migrations/0001_initial.py index dc1ae75a3..2f971ccf1 100644 --- a/ietf/community/migrations/0001_initial.py +++ b/ietf/community/migrations/0001_initial.py @@ -1,9 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - - -from typing import List, Tuple # pyflakes:ignore +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations, models import django.db.models.deletion @@ -15,7 +10,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ] # type: List[Tuple[str]] + ] operations = [ migrations.CreateModel( @@ -35,7 +30,7 @@ class Migration(migrations.Migration): name='SearchRule', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('rule_type', models.CharField(choices=[('group', 'All I-Ds associated with a particular group'), ('area', 'All I-Ds associated with all groups in a particular Area'), ('group_rfc', 'All RFCs associated with a particular group'), ('area_rfc', 'All RFCs associated with all groups in a particular Area'), ('state_iab', 'All I-Ds that are in a particular IAB state'), ('state_iana', 'All I-Ds that are in a particular IANA state'), ('state_iesg', 'All I-Ds that are in a particular IESG state'), ('state_irtf', 'All I-Ds that are in a particular IRTF state'), ('state_ise', 'All I-Ds that are in a particular ISE state'), ('state_rfceditor', 'All I-Ds that are in a particular RFC Editor state'), ('state_ietf', 'All I-Ds that are in a particular Working Group state'), ('author', 'All I-Ds with a particular author'), ('author_rfc', 'All RFCs with a particular author'), ('ad', 'All I-Ds with a particular responsible AD'), ('shepherd', 'All I-Ds with a particular document shepherd'), ('name_contains', 'All I-Ds with particular text/regular expression in the name')], max_length=30)), + ('rule_type', models.CharField(choices=[('group', 'All I-Ds associated with a particular group'), ('area', 'All I-Ds associated with all groups in a particular Area'), ('group_rfc', 'All RFCs associated with a particular group'), ('area_rfc', 'All RFCs associated with all groups in a particular Area'), ('group_exp', 'All expired I-Ds of a particular group'), ('state_iab', 'All I-Ds that are in a particular IAB state'), ('state_iana', 'All I-Ds that are in a particular IANA state'), ('state_iesg', 'All I-Ds that are in a particular IESG state'), ('state_irtf', 'All I-Ds that are in a particular IRTF state'), ('state_ise', 'All I-Ds that are in a particular ISE state'), ('state_rfceditor', 'All I-Ds that are in a particular RFC Editor state'), ('state_ietf', 'All I-Ds that are in a particular Working Group state'), ('author', 'All I-Ds with a particular author'), ('author_rfc', 'All RFCs with a particular author'), ('ad', 'All I-Ds with a particular responsible AD'), ('shepherd', 'All I-Ds with a particular document shepherd'), ('name_contains', 'All I-Ds with particular text/regular expression in the name')], max_length=30)), ('text', models.CharField(blank=True, default='', max_length=255, verbose_name='Text/RegExp')), ('community_list', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='community.CommunityList')), ], diff --git a/ietf/community/migrations/0002_auto_20180220_1052.py b/ietf/community/migrations/0002_auto_20230320_1222.py similarity index 94% rename from ietf/community/migrations/0002_auto_20180220_1052.py rename to ietf/community/migrations/0002_auto_20230320_1222.py index cb5658ac1..f552cc06e 100644 --- a/ietf/community/migrations/0002_auto_20180220_1052.py +++ b/ietf/community/migrations/0002_auto_20230320_1222.py @@ -1,7 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.conf import settings from django.db import migrations, models @@ -14,11 +11,11 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('doc', '0001_initial'), - ('group', '0001_initial'), + ('person', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('community', '0001_initial'), - ('person', '0001_initial'), + ('group', '0001_initial'), + ('doc', '0001_initial'), ] operations = [ diff --git a/ietf/community/migrations/0003_add_communitylist_docs2_m2m.py b/ietf/community/migrations/0003_add_communitylist_docs2_m2m.py deleted file mode 100644 index 3bfaee9aa..000000000 --- a/ietf/community/migrations/0003_add_communitylist_docs2_m2m.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 14:23 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0002_auto_20180220_1052'), - ] - - operations = [ - migrations.CreateModel( - name='CommunityListDocs', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('communitylist', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='community.CommunityList')), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id')), - ], - ), - migrations.AddField( - model_name='communitylist', - name='added_docs2', - field=models.ManyToManyField(related_name='communitylists', through='community.CommunityListDocs', to='doc.Document'), - ), - migrations.CreateModel( - name='SearchRuleDocs', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id')), - ('searchrule', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='community.SearchRule')), - ], - ), - migrations.AddField( - model_name='searchrule', - name='name_contains_index2', - field=models.ManyToManyField(related_name='searchrules', through='community.SearchRuleDocs', to='doc.Document'), - ), - ] diff --git a/ietf/community/migrations/0004_set_document_m2m_keys.py b/ietf/community/migrations/0004_set_document_m2m_keys.py deleted file mode 100644 index 60e51fc36..000000000 --- a/ietf/community/migrations/0004_set_document_m2m_keys.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 14:27 - - -import sys - -from tqdm import tqdm - -from django.db import migrations - - -def forward(apps, schema_editor): - - Document = apps.get_model('doc','Document') - CommunityList = apps.get_model('community', 'CommunityList') - CommunityListDocs = apps.get_model('community', 'CommunityListDocs') - SearchRule = apps.get_model('community', 'SearchRule') - SearchRuleDocs = apps.get_model('community', 'SearchRuleDocs') - - # Document id fixup ------------------------------------------------------------ - - objs = Document.objects.in_bulk() - nameid = { o.name: o.id for id, o in objs.items() } - - sys.stderr.write('\n') - - sys.stderr.write(' %s.%s:\n' % (CommunityList.__name__, 'added_docs')) - count = 0 - for l in tqdm(CommunityList.objects.all()): - for d in l.added_docs.all(): - count += 1 - CommunityListDocs.objects.get_or_create(communitylist=l, document_id=nameid[d.name]) - sys.stderr.write(' %s CommunityListDocs objects created\n' % (count, )) - - sys.stderr.write(' %s.%s:\n' % (SearchRule.__name__, 'name_contains_index')) - count = 0 - for r in tqdm(SearchRule.objects.all()): - for d in r.name_contains_index.all(): - count += 1 - SearchRuleDocs.objects.get_or_create(searchrule=r, document_id=nameid[d.name]) - sys.stderr.write(' %s SearchRuleDocs objects created\n' % (count, )) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0003_add_communitylist_docs2_m2m'), - ('doc', '0014_set_document_docalias_id'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/community/migrations/0005_1_del_docs_m2m_table.py b/ietf/community/migrations/0005_1_del_docs_m2m_table.py deleted file mode 100644 index 9a7b7f945..000000000 --- a/ietf/community/migrations/0005_1_del_docs_m2m_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-22 08:15 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0004_set_document_m2m_keys'), - ] - - # The implementation of AlterField in Django 1.11 applies - # 'ALTER TABLE MODIFY ...;' in order to fix foregn keys - # to the altered field, but as it seems does _not_ fix up m2m - # intermediary tables in an equivalent manner, so here we remove and - # then recreate the m2m tables so they will have the appropriate field - # types. - - operations = [ - # Remove fields - migrations.RemoveField( - model_name='communitylist', - name='added_docs', - ), - migrations.RemoveField( - model_name='searchrule', - name='name_contains_index', - ), - ] diff --git a/ietf/community/migrations/0005_2_add_docs_m2m_table.py b/ietf/community/migrations/0005_2_add_docs_m2m_table.py deleted file mode 100644 index ef1f9bc4f..000000000 --- a/ietf/community/migrations/0005_2_add_docs_m2m_table.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-22 08:15 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0005_1_del_docs_m2m_table'), - ] - - # The implementation of AlterField in Django 1.11 applies - # 'ALTER TABLE
MODIFY ...;' in order to fix foregn keys - # to the altered field, but as it seems does _not_ fix up m2m - # intermediary tables in an equivalent manner, so here we remove and - # then recreate the m2m tables so they will have the appropriate field - # types. - - operations = [ - # Add fields back (will create the m2m tables with the right field types) - migrations.AddField( - model_name='communitylist', - name='added_docs', - field=models.ManyToManyField(to='doc.Document'), - ), - migrations.AddField( - model_name='searchrule', - name='name_contains_index', - field=models.ManyToManyField(to='doc.Document'), - ), - ] diff --git a/ietf/community/migrations/0006_copy_docs_m2m_table.py b/ietf/community/migrations/0006_copy_docs_m2m_table.py deleted file mode 100644 index 6d1a5e3a8..000000000 --- a/ietf/community/migrations/0006_copy_docs_m2m_table.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-27 05:56 - - -from django.db import migrations - -import sys, time - -from tqdm import tqdm - - -def forward(apps, schema_editor): - - CommunityList = apps.get_model('community', 'CommunityList') - CommunityListDocs = apps.get_model('community', 'CommunityListDocs') - SearchRule = apps.get_model('community', 'SearchRule') - SearchRuleDocs = apps.get_model('community', 'SearchRuleDocs') - - # Document id fixup ------------------------------------------------------------ - - - sys.stderr.write('\n') - - sys.stderr.write(' %s.%s:\n' % (CommunityList.__name__, 'added_docs')) - for l in tqdm(CommunityList.objects.all()): - l.added_docs.set([ d.document for d in CommunityListDocs.objects.filter(communitylist=l) ]) - - sys.stderr.write(' %s.%s:\n' % (SearchRule.__name__, 'name_contains_index')) - for r in tqdm(SearchRule.objects.all()): - r.name_contains_index.set([ d.document for d in SearchRuleDocs.objects.filter(searchrule=r) ]) - -def reverse(apps, schema_editor): - pass - -def timestamp(apps, schema_editor): - sys.stderr.write('\n %s' % time.strftime('%Y-%m-%d %H:%M:%S')) - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0005_2_add_docs_m2m_table'), - ] - - operations = [ - #migrations.RunPython(forward, reverse), - # Alternative: - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO community_communitylist_added_docs SELECT * FROM community_communitylistdocs;", - ""), - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO community_searchrule_name_contains_index SELECT * FROM community_searchruledocs;", - ""), - migrations.RunPython(timestamp, timestamp), - ] diff --git a/ietf/community/migrations/0007_remove_docs2_m2m.py b/ietf/community/migrations/0007_remove_docs2_m2m.py deleted file mode 100644 index a454fbf07..000000000 --- a/ietf/community/migrations/0007_remove_docs2_m2m.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-30 03:06 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0006_copy_docs_m2m_table'), - ] - - operations = [ - migrations.RemoveField( - model_name='communitylistdocs', - name='communitylist', - ), - migrations.RemoveField( - model_name='communitylistdocs', - name='document', - ), - migrations.RemoveField( - model_name='searchruledocs', - name='document', - ), - migrations.RemoveField( - model_name='searchruledocs', - name='searchrule', - ), - migrations.RemoveField( - model_name='communitylist', - name='added_docs2', - ), - migrations.RemoveField( - model_name='searchrule', - name='name_contains_index2', - ), - migrations.DeleteModel( - name='CommunityListDocs', - ), - migrations.DeleteModel( - name='SearchRuleDocs', - ), - ] diff --git a/ietf/community/migrations/0008_add_group_exp_rule.py b/ietf/community/migrations/0008_add_group_exp_rule.py deleted file mode 100644 index b5ddebe63..000000000 --- a/ietf/community/migrations/0008_add_group_exp_rule.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.28 on 2022-06-30 05:59 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0007_remove_docs2_m2m'), - ] - - operations = [ - migrations.AlterField( - model_name='searchrule', - name='rule_type', - field=models.CharField(choices=[('group', 'All I-Ds associated with a particular group'), ('area', 'All I-Ds associated with all groups in a particular Area'), ('group_rfc', 'All RFCs associated with a particular group'), ('area_rfc', 'All RFCs associated with all groups in a particular Area'), ('group_exp', 'All expired I-Ds of a particular group'), ('state_iab', 'All I-Ds that are in a particular IAB state'), ('state_iana', 'All I-Ds that are in a particular IANA state'), ('state_iesg', 'All I-Ds that are in a particular IESG state'), ('state_irtf', 'All I-Ds that are in a particular IRTF state'), ('state_ise', 'All I-Ds that are in a particular ISE state'), ('state_rfceditor', 'All I-Ds that are in a particular RFC Editor state'), ('state_ietf', 'All I-Ds that are in a particular Working Group state'), ('author', 'All I-Ds with a particular author'), ('author_rfc', 'All RFCs with a particular author'), ('ad', 'All I-Ds with a particular responsible AD'), ('shepherd', 'All I-Ds with a particular document shepherd'), ('name_contains', 'All I-Ds with particular text/regular expression in the name')], max_length=30), - ), - ] diff --git a/ietf/community/migrations/0009_add_group_exp_rule_to_groups.py b/ietf/community/migrations/0009_add_group_exp_rule_to_groups.py deleted file mode 100644 index 1d3222dc6..000000000 --- a/ietf/community/migrations/0009_add_group_exp_rule_to_groups.py +++ /dev/null @@ -1,30 +0,0 @@ -# Generated by Django 2.2.28 on 2022-06-30 23:15 - - -from django.db import migrations - - -def forward(apps, schema_editor): - SearchRule = apps.get_model('community', 'SearchRule') - CommunityList = apps.get_model('community', 'CommunityList') - Group = apps.get_model('group', 'Group') - State = apps.get_model('doc', 'State') - for group in Group.objects.filter(type_id__in=['wg','rg'], state_id='active'): - com_list = CommunityList.objects.filter(group=group).first() - if com_list is not None: - SearchRule.objects.create(community_list=com_list, rule_type="group_exp", group=group, state=State.objects.get(slug="expired", type="draft"),) - - -def reverse(apps, schema_editor): - SearchRule = apps.get_model('community', 'SearchRule') - SearchRule.objects.filter(rule_type='group_exp').delete() - - -class Migration(migrations.Migration): - dependencies = [ - ('community', '0008_add_group_exp_rule'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/community/migrations/0010_doc_ids_are_ints.py b/ietf/community/migrations/0010_doc_ids_are_ints.py deleted file mode 100644 index a76eda92a..000000000 --- a/ietf/community/migrations/0010_doc_ids_are_ints.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.2.28 on 2022-11-05 11:07 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0009_add_group_exp_rule_to_groups'), - ] - - operations = [ - migrations.RunSQL( - sql="alter table community_communitylist_added_docs modify document_id int unsigned not null;", - reverse_sql="alter table community_communitylist_added_docs modify document_id varchar(255) not null;" - ), - migrations.RunSQL( - sql="alter table community_searchrule_name_contains_index modify document_id int unsigned not null;", - reverse_sql="alter table community_searchrule_name_contains_index modify document_id varchar(255) not null;" - ), - ] diff --git a/ietf/dbtemplate/migrations/0001_initial.py b/ietf/dbtemplate/migrations/0001_initial.py index 53defbda2..1eb28d266 100644 --- a/ietf/dbtemplate/migrations/0001_initial.py +++ b/ietf/dbtemplate/migrations/0001_initial.py @@ -1,9 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - - -from typing import List, Tuple # pyflakes:ignore +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations, models @@ -13,7 +8,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ] # type: List[Tuple[str]] + ] operations = [ migrations.CreateModel( diff --git a/ietf/dbtemplate/migrations/0002_auto_20180220_1052.py b/ietf/dbtemplate/migrations/0002_auto_20230320_1222.py similarity index 85% rename from ietf/dbtemplate/migrations/0002_auto_20180220_1052.py rename to ietf/dbtemplate/migrations/0002_auto_20230320_1222.py index 9cff93f4a..5aa713635 100644 --- a/ietf/dbtemplate/migrations/0002_auto_20180220_1052.py +++ b/ietf/dbtemplate/migrations/0002_auto_20230320_1222.py @@ -1,7 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations import django.db.models.deletion @@ -13,9 +10,9 @@ class Migration(migrations.Migration): initial = True dependencies = [ + ('dbtemplate', '0001_initial'), ('group', '0001_initial'), ('name', '0001_initial'), - ('dbtemplate', '0001_initial'), ] operations = [ diff --git a/ietf/dbtemplate/migrations/0003_adjust_review_templates.py b/ietf/dbtemplate/migrations/0003_adjust_review_templates.py deleted file mode 100644 index d3038c946..000000000 --- a/ietf/dbtemplate/migrations/0003_adjust_review_templates.py +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-05 11:39 - - -from django.db import migrations - -def forward(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate', 'DBTemplate') - DBTemplate.objects.filter(id=186).update(content="""I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please treat these comments just -like any other last call comments. - -For more information, please see the FAQ at - -. - -Document: {{ assignment.review_request.doc.name }}-?? -Reviewer: {{ assignment.reviewer.person.plain_name }} -Review Date: {{ today }} -IETF LC End Date: {% if assignment.review_request.doc.most_recent_ietflc %}{{ assignment.review_request.doc.most_recent_ietflc.expires|date:"Y-m-d" }}{% else %}None{% endif %} -IESG Telechat date: {{ assignment.review_request.doc.telechat_date|default:'Not scheduled for a telechat' }} - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: -""") - - DBTemplate.objects.filter(id=187).update(content="""I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please wait for direction from your -document shepherd or AD before posting a new version of the draft. - -For more information, please see the FAQ at - -. - -Document: {{ assignment.review_request.doc.name }}-?? -Reviewer: {{ assignment.reviewer.person.plain_name }} -Review Date: {{ today }} -IETF LC End Date: {% if assignment.review_req.doc.most_recent_ietflc %}{{ assignment.review_request.doc.most_recent_ietflc.expires|date:"Y-m-d" }}{% else %}None{% endif %} -IESG Telechat date: {{ assignment.review_request.doc.telechat_date|default:'Not scheduled for a telechat' }} - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - -""") - -def reverse(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate','DBTemplate') - DBTemplate.objects.filter(id=186).update(content="""I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please treat these comments just -like any other last call comments. - -For more information, please see the FAQ at - -. - -Document: {{ review_req.doc.name }}-?? -Reviewer: {{ review_req.reviewer.person.plain_name }} -Review Date: {{ today }} -IETF LC End Date: {% if review_req.doc.most_recent_ietflc %}{{ review_req.doc.most_recent_ietflc.expires|date:"Y-m-d" }}{% else %}None{% endif %} -IESG Telechat date: {{ review_req.doc.telechat_date|default:'Not scheduled for a telechat' }} - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - -""") - DBTemplate.objects.filter(id=187).update(content="""I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please wait for direction from your -document shepherd or AD before posting a new version of the draft. - -For more information, please see the FAQ at - -. - -Document: {{ review_req.doc.name }}-?? -Reviewer: {{ review_req.reviewer.person.plain_name }} -Review Date: {{ today }} -IETF LC End Date: {% if review_req.doc.most_recent_ietflc %}{{ review_req.doc.most_recent_ietflc.expires|date:"Y-m-d" }}{% else %}None{% endif %} -IESG Telechat date: {{ review_req.doc.telechat_date|default:'Not scheduled for a telechat' }} - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - -""") - -class Migration(migrations.Migration): - - dependencies = [ - ('dbtemplate', '0002_auto_20180220_1052'), - ('doc','0011_reviewassignmentdocevent'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/dbtemplate/migrations/0004_adjust_assignment_email_summary_templates.py b/ietf/dbtemplate/migrations/0004_adjust_assignment_email_summary_templates.py deleted file mode 100644 index f9a249609..000000000 --- a/ietf/dbtemplate/migrations/0004_adjust_assignment_email_summary_templates.py +++ /dev/null @@ -1,290 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-13 13:41 - - -from django.db import migrations - -def forward(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate','DBTemplate') - - DBTemplate.objects.filter(pk=182).update(content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}} - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc_id }}-{% if r.review_request..requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request..doc.rev }}{% endif %} {{ r.earlier_review_mark }}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} -""") - - DBTemplate.objects.filter(pk=183).update(content="""{% autoescape off %}Subject: Review Assignments - -Hi all, - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer Type LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{r.review_request.type.name|ljust:"10"}}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc_id }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %}{% if r.earlier_review_mark %} {{ r.earlier_review_mark }}{% endif %}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %} -The LC and Telechat review templates are included below: -------------------------------------------------------- - --- Begin LC Template -- -I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please treat these comments just -like any other last call comments. - -For more information, please see the FAQ at - -. - -Document: -Reviewer: -Review Date: -IETF LC End Date: -IESG Telechat date: (if known) - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - --- End LC Template -- - --- Begin Telechat Template -- -I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please wait for direction from your -document shepherd or AD before posting a new version of the draft. - -For more information, please see the FAQ at - -. - -Document: -Reviewer: -Review Date: -IETF LC End Date: -IESG Telechat date: (if known) - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - --- End Telechat Template -- -{% endautoescape %} - -""") - - DBTemplate.objects.filter(pk=184).update(content="""{% autoescape off %}Subject: Assignments - -Review instructions and related resources are at: -http://tools.ietf.org/area/sec/trac/wiki/SecDirReview{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }}{{ r.earlier_review|yesno:'R, , ' }}{% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc_id }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %}{% endfor %} - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} - -""") - - DBTemplate.objects.filter(pk=185).update(content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}} - -Review instructions and related resources are at: - - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc_id }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %} {{ r.earlier_review_mark }}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} - -""") - - -def reverse(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate','DBTemplate') - - DBTemplate.objects.filter(pk=182).update(content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}} - -The following reviewers have assignments:{% for r in review_requests %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.doc_id }}-{% if r.requested_rev %}{{ r.requested_rev }}{% else %}{{ r.doc.rev }}{% endif %} {{ r.earlier_review_mark }}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} -""") - - DBTemplate.objects.filter(pk=183).update(content="""{% autoescape off %}Subject: Review Assignments - -Hi all, - -The following reviewers have assignments:{% for r in review_requests %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer Type LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.deadline|date:"Y-m-d" }}{% else %}{{r.type.name|ljust:"10"}}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.doc_id }}-{% if r.requested_rev %}{{ r.requested_rev }}{% else %}{{ r.doc.rev }}{% endif %}{% if r.earlier_review_mark %} {{ r.earlier_review_mark }}{% endif %}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %} -The LC and Telechat review templates are included below: -------------------------------------------------------- - --- Begin LC Template -- -I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please treat these comments just -like any other last call comments. - -For more information, please see the FAQ at - -. - -Document: -Reviewer: -Review Date: -IETF LC End Date: -IESG Telechat date: (if known) - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - --- End LC Template -- - --- Begin Telechat Template -- -I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please wait for direction from your -document shepherd or AD before posting a new version of the draft. - -For more information, please see the FAQ at - -. - -Document: -Reviewer: -Review Date: -IETF LC End Date: -IESG Telechat date: (if known) - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - --- End Telechat Template -- -{% endautoescape %} - -""") - - DBTemplate.objects.filter(pk=184).update(content="""{% autoescape off %}Subject: Assignments - -Review instructions and related resources are at: -http://tools.ietf.org/area/sec/trac/wiki/SecDirReview{% for r in review_requests %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }}{{ r.earlier_review|yesno:'R, , ' }}{% if r.section == 'Early review requests:' %}{{ r.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.doc_id }}-{% if r.requested_rev %}{{ r.requested_rev }}{% else %}{{ r.doc.rev }}{% endif %}{% endfor %} - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} - -""") - - DBTemplate.objects.filter(pk=185).update(content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}} - -Review instructions and related resources are at: - - -The following reviewers have assignments:{% for r in review_requests %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.doc_id }}-{% if r.requested_rev %}{{ r.requested_rev }}{% else %}{{ r.doc.rev }}{% endif %} {{ r.earlier_review_mark }}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} - -""") - - -class Migration(migrations.Migration): - - dependencies = [ - ('dbtemplate', '0003_adjust_review_templates'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - ] diff --git a/ietf/dbtemplate/migrations/0005_adjust_assignment_email_summary_templates_2526.py b/ietf/dbtemplate/migrations/0005_adjust_assignment_email_summary_templates_2526.py deleted file mode 100644 index 8a07d8936..000000000 --- a/ietf/dbtemplate/migrations/0005_adjust_assignment_email_summary_templates_2526.py +++ /dev/null @@ -1,281 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-13 13:41 - - -from django.db import migrations - -def forward(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate','DBTemplate') - - DBTemplate.objects.filter(pk=182).update(content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}} - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc.name }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %} {{ r.earlier_reviews }}{% endfor %} - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} -""") - - DBTemplate.objects.filter(pk=183).update(content="""{% autoescape off %}Subject: Review Assignments - -Hi all, - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer Type LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{r.review_request.type.name|ljust:"10"}}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc.name }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %}{% if r.earlier_reviews %} {{ r.earlier_reviews }}{% endif %}{% endfor %} - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %} -The LC and Telechat review templates are included below: -------------------------------------------------------- - --- Begin LC Template -- -I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please treat these comments just -like any other last call comments. - -For more information, please see the FAQ at - -. - -Document: -Reviewer: -Review Date: -IETF LC End Date: -IESG Telechat date: (if known) - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - --- End LC Template -- - --- Begin Telechat Template -- -I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please wait for direction from your -document shepherd or AD before posting a new version of the draft. - -For more information, please see the FAQ at - -. - -Document: -Reviewer: -Review Date: -IETF LC End Date: -IESG Telechat date: (if known) - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - --- End Telechat Template -- -{% endautoescape %} - -""") - - DBTemplate.objects.filter(pk=184).update(content="""{% autoescape off %}Subject: Assignments - -Review instructions and related resources are at: -http://tools.ietf.org/area/sec/trac/wiki/SecDirReview{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }}{{ r.earlier_review|yesno:'R, , ' }}{% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc.name }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %}{% endfor %} - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} - -""") - - DBTemplate.objects.filter(pk=185).update(content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}} - -Review instructions and related resources are at: - - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc.name }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %} {{ r.earlier_reviews }}{% endfor %} - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} - -""") - - -def reverse(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate','DBTemplate') - - DBTemplate.objects.filter(pk=182).update(content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}} - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc_id }}-{% if r.review_request..requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request..doc.rev }}{% endif %} {{ r.earlier_review_mark }}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} -""") - - DBTemplate.objects.filter(pk=183).update(content="""{% autoescape off %}Subject: Review Assignments - -Hi all, - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer Type LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{r.review_request.type.name|ljust:"10"}}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc.name }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %}{% if r.earlier_review_mark %} {{ r.earlier_review_mark }}{% endif %}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %} -The LC and Telechat review templates are included below: -------------------------------------------------------- - --- Begin LC Template -- -I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please treat these comments just -like any other last call comments. - -For more information, please see the FAQ at - -. - -Document: -Reviewer: -Review Date: -IETF LC End Date: -IESG Telechat date: (if known) - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - --- End LC Template -- - --- Begin Telechat Template -- -I am the assigned Gen-ART reviewer for this draft. The General Area -Review Team (Gen-ART) reviews all IETF documents being processed -by the IESG for the IETF Chair. Please wait for direction from your -document shepherd or AD before posting a new version of the draft. - -For more information, please see the FAQ at - -. - -Document: -Reviewer: -Review Date: -IETF LC End Date: -IESG Telechat date: (if known) - -Summary: - -Major issues: - -Minor issues: - -Nits/editorial comments: - --- End Telechat Template -- -{% endautoescape %} - -""") - - DBTemplate.objects.filter(pk=184).update(content="""{% autoescape off %}Subject: Assignments - -Review instructions and related resources are at: -http://tools.ietf.org/area/sec/trac/wiki/SecDirReview{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }}{{ r.earlier_review|yesno:'R, , ' }}{% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc.name }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %}{% endfor %} - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} - -""") - - DBTemplate.objects.filter(pk=185).update(content="""{% autoescape off %}Subject: Open review assignments in {{group.acronym}} - -Review instructions and related resources are at: - - -The following reviewers have assignments:{% for r in review_assignments %}{% ifchanged r.section %} - -{{r.section}} - -{% if r.section == 'Early review requests:' %}Reviewer Due Draft{% else %}Reviewer LC end Draft{% endif %}{% endifchanged %} -{{ r.reviewer.person.plain_name|ljust:"22" }} {% if r.section == 'Early review requests:' %}{{ r.review_request.deadline|date:"Y-m-d" }}{% else %}{{ r.lastcall_ends|default:"None " }}{% endif %} {{ r.review_request.doc.name }}-{% if r.review_request.requested_rev %}{{ r.review_request.requested_rev }}{% else %}{{ r.review_request.doc.rev }}{% endif %} {{ r.earlier_review_mark }}{% endfor %} - -* Other revision previously reviewed -** This revision already reviewed - -{% if rotation_list %}Next in the reviewer rotation: - -{% for p in rotation_list %} {{ p }} -{% endfor %}{% endif %}{% endautoescape %} - -""") - - -class Migration(migrations.Migration): - - dependencies = [ - ('dbtemplate', '0004_adjust_assignment_email_summary_templates'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - ] diff --git a/ietf/dbtemplate/migrations/0006_add_review_assigned_template.py b/ietf/dbtemplate/migrations/0006_add_review_assigned_template.py deleted file mode 100644 index cedd84322..000000000 --- a/ietf/dbtemplate/migrations/0006_add_review_assigned_template.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - -def forward(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate', 'DBTemplate') - - DBTemplate.objects.create(path='/group/defaults/email/review_assigned.txt', type_id='django', - content="""{{ assigner.ascii }} has assigned you as a reviewer for this document. - -{% if prev_team_reviews %}This team has completed other reviews of this document:{% endif %}{% for assignment in prev_team_reviews %} -- {{ assignment.completed_on }} {{ assignment.reviewer.person.ascii }} -{% if assignment.reviewed_rev %}{{ assignment.reviewed_rev }}{% else %}{{ assignment.review_request.requested_rev }}{% endif %} {{ assignment.result.name }} -{% endfor %} -""") - - -def reverse(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate', 'DBTemplate') - - DBTemplate.objects.get(path='/group/defaults/email/review_assigned.txt').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('dbtemplate', '0005_adjust_assignment_email_summary_templates_2526'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - ] diff --git a/ietf/dbtemplate/migrations/0007_adjust_review_assigned.py b/ietf/dbtemplate/migrations/0007_adjust_review_assigned.py deleted file mode 100644 index c1e8324ef..000000000 --- a/ietf/dbtemplate/migrations/0007_adjust_review_assigned.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.26 on 2019-11-19 11:47 - - -from django.db import migrations - -def forward(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate','DBTemplate') - qs = DBTemplate.objects.filter(path='/group/defaults/email/review_assigned.txt') - qs.update(content="""{{ assigner.ascii }} has assigned {{ reviewer.person.ascii }} as a reviewer for this document. - -{% if prev_team_reviews %}This team has completed other reviews of this document:{% endif %}{% for assignment in prev_team_reviews %} -- {{ assignment.completed_on }} {{ assignment.reviewer.person.ascii }} -{% if assignment.reviewed_rev %}{{ assignment.reviewed_rev }}{% else %}{{ assignment.review_request.requested_rev }}{% endif %} {{ assignment.result.name }} -{% endfor %} -""") - qs.update(title="Default template for review assignment email") - -def reverse(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate','DBTemplate') - qs = DBTemplate.objects.filter(path='/group/defaults/email/review_assigned.txt') - qs.update(content="""{{ assigner.ascii }} has assigned you as a reviewer for this document. - -{% if prev_team_reviews %}This team has completed other reviews of this document:{% endif %}{% for assignment in prev_team_reviews %} -- {{ assignment.completed_on }} {{ assignment.reviewer.person.ascii }} -{% if assignment.reviewed_rev %}{{ assignment.reviewed_rev }}{% else %}{{ assignment.review_request.requested_rev }}{% endif %} {{ assignment.result.name }} -{% endfor %} -""") - - -class Migration(migrations.Migration): - - dependencies = [ - ('dbtemplate', '0006_add_review_assigned_template'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/dbtemplate/migrations/0008_add_default_iesg_req_template.py b/ietf/dbtemplate/migrations/0008_add_default_iesg_req_template.py deleted file mode 100644 index 3ca9a6fc8..000000000 --- a/ietf/dbtemplate/migrations/0008_add_default_iesg_req_template.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-01-07 09:25 - - -from django.db import migrations - -def forward(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate', 'DBTemplate') - DBTemplate.objects.create(path='/nomcom/defaults/iesg_requirements', type_id='rst', title='Generic IESG requirements', - content="""============================= -IESG MEMBER DESIRED EXPERTISE -============================= - -Place this year's Generic IESG Member Desired Expertise here. - -This template uses reStructured text for formatting. Feel free to use it (to change the above header for example). -""") - -def reverse(apps, schema_editor): - DBTemplate = apps.get_model('dbtemplate', 'DBTemplate') - DBTemplate.objects.filter(path='/nomcom/defaults/iesg_requirements').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('dbtemplate', '0007_adjust_review_assigned'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/doc/migrations/0001_initial.py b/ietf/doc/migrations/0001_initial.py index fd50d34fc..2823abfe6 100644 --- a/ietf/doc/migrations/0001_initial.py +++ b/ietf/doc/migrations/0001_initial.py @@ -1,12 +1,9 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 +# Generated by Django 2.2.28 on 2023-03-20 19:22 - -import datetime import django.core.validators from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone import ietf.utils.models @@ -39,13 +36,14 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('json', models.TextField(help_text='Deleted object in JSON format, with attribute names chosen to be suitable for passing into the relevant create method.')), - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), ], ), migrations.CreateModel( name='DocAlias', fields=[ - ('name', models.CharField(max_length=255, primary_key=True, serialize=False)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255, unique=True)), ], options={ 'verbose_name': 'document alias', @@ -56,8 +54,8 @@ class Migration(migrations.Migration): name='DocEvent', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(db_index=True, default=datetime.datetime.now, help_text='When the event happened')), - ('type', models.CharField(choices=[(b'new_revision', b'Added new revision'), (b'new_submission', b'Uploaded new revision'), (b'changed_document', b'Changed document metadata'), (b'added_comment', b'Added comment'), (b'added_message', b'Added message'), (b'edited_authors', b'Edited the documents author list'), (b'deleted', b'Deleted document'), (b'changed_state', b'Changed state'), (b'changed_stream', b'Changed document stream'), (b'expired_document', b'Expired document'), (b'extended_expiry', b'Extended expiry of document'), (b'requested_resurrect', b'Requested resurrect'), (b'completed_resurrect', b'Completed resurrect'), (b'changed_consensus', b'Changed consensus'), (b'published_rfc', b'Published RFC'), (b'added_suggested_replaces', b'Added suggested replacement relationships'), (b'reviewed_suggested_replaces', b'Reviewed suggested replacement relationships'), (b'changed_group', b'Changed group'), (b'changed_protocol_writeup', b'Changed protocol writeup'), (b'changed_charter_milestone', b'Changed charter milestone'), (b'initial_review', b'Set initial review time'), (b'changed_review_announcement', b'Changed WG Review text'), (b'changed_action_announcement', b'Changed WG Action text'), (b'started_iesg_process', b'Started IESG process on document'), (b'created_ballot', b'Created ballot'), (b'closed_ballot', b'Closed ballot'), (b'sent_ballot_announcement', b'Sent ballot announcement'), (b'changed_ballot_position', b'Changed ballot position'), (b'changed_ballot_approval_text', b'Changed ballot approval text'), (b'changed_ballot_writeup_text', b'Changed ballot writeup text'), (b'changed_rfc_editor_note_text', b'Changed RFC Editor Note text'), (b'changed_last_call_text', b'Changed last call text'), (b'requested_last_call', b'Requested last call'), (b'sent_last_call', b'Sent last call'), (b'scheduled_for_telechat', b'Scheduled for telechat'), (b'iesg_approved', b'IESG approved document (no problem)'), (b'iesg_disapproved', b'IESG disapproved document (do not publish)'), (b'approved_in_minute', b'Approved in minute'), (b'iana_review', b'IANA review comment'), (b'rfc_in_iana_registry', b'RFC is in IANA registry'), (b'rfc_editor_received_announcement', b'Announcement was received by RFC Editor'), (b'requested_publication', b'Publication at RFC Editor requested'), (b'sync_from_rfc_editor', b'Received updated information from RFC Editor'), (b'requested_review', b'Requested review'), (b'assigned_review_request', b'Assigned review request'), (b'closed_review_request', b'Closed review request'), (b'downref_approved', b'Downref approved')], max_length=50)), + ('time', models.DateTimeField(db_index=True, default=django.utils.timezone.now, help_text='When the event happened')), + ('type', models.CharField(choices=[('new_revision', 'Added new revision'), ('new_submission', 'Uploaded new revision'), ('changed_document', 'Changed document metadata'), ('added_comment', 'Added comment'), ('added_message', 'Added message'), ('edited_authors', 'Edited the documents author list'), ('deleted', 'Deleted document'), ('changed_state', 'Changed state'), ('changed_stream', 'Changed document stream'), ('expired_document', 'Expired document'), ('extended_expiry', 'Extended expiry of document'), ('requested_resurrect', 'Requested resurrect'), ('completed_resurrect', 'Completed resurrect'), ('changed_consensus', 'Changed consensus'), ('published_rfc', 'Published RFC'), ('added_suggested_replaces', 'Added suggested replacement relationships'), ('reviewed_suggested_replaces', 'Reviewed suggested replacement relationships'), ('changed_action_holders', 'Changed action holders for document'), ('changed_group', 'Changed group'), ('changed_protocol_writeup', 'Changed protocol writeup'), ('changed_charter_milestone', 'Changed charter milestone'), ('initial_review', 'Set initial review time'), ('changed_review_announcement', 'Changed WG Review text'), ('changed_action_announcement', 'Changed WG Action text'), ('started_iesg_process', 'Started IESG process on document'), ('created_ballot', 'Created ballot'), ('closed_ballot', 'Closed ballot'), ('sent_ballot_announcement', 'Sent ballot announcement'), ('changed_ballot_position', 'Changed ballot position'), ('changed_ballot_approval_text', 'Changed ballot approval text'), ('changed_ballot_writeup_text', 'Changed ballot writeup text'), ('changed_rfc_editor_note_text', 'Changed RFC Editor Note text'), ('changed_last_call_text', 'Changed last call text'), ('requested_last_call', 'Requested last call'), ('sent_last_call', 'Sent last call'), ('scheduled_for_telechat', 'Scheduled for telechat'), ('iesg_approved', 'IESG approved document (no problem)'), ('iesg_disapproved', 'IESG disapproved document (do not publish)'), ('approved_in_minute', 'Approved in minute'), ('iana_review', 'IANA review comment'), ('rfc_in_iana_registry', 'RFC is in IANA registry'), ('rfc_editor_received_announcement', 'Announcement was received by RFC Editor'), ('requested_publication', 'Publication at RFC Editor requested'), ('sync_from_rfc_editor', 'Received updated information from RFC Editor'), ('requested_review', 'Requested review'), ('assigned_review_request', 'Assigned review request'), ('closed_review_request', 'Closed review request'), ('closed_review_assignment', 'Closed review assignment'), ('downref_approved', 'Downref approved'), ('posted_related_ipr', 'Posted related IPR'), ('removed_related_ipr', 'Removed related IPR'), ('changed_editors', 'Changed BOF Request editors')], max_length=50)), ('rev', models.CharField(blank=True, max_length=16, null=True, verbose_name='revision')), ('desc', models.TextField()), ], @@ -65,11 +63,22 @@ class Migration(migrations.Migration): 'ordering': ['-time', '-id'], }, ), + migrations.CreateModel( + name='DocExtResource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('display_name', models.CharField(blank=True, default='', max_length=255)), + ('value', models.CharField(max_length=2083)), + ], + options={ + 'abstract': False, + }, + ), migrations.CreateModel( name='DocHistory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), ('title', models.CharField(max_length=255, validators=[django.core.validators.RegexValidator(message='Please enter a string without control characters.', regex='^[^\x00-\x1f]*$')])), ('abstract', models.TextField(blank=True)), ('rev', models.CharField(blank=True, max_length=16, verbose_name='revision')), @@ -77,8 +86,9 @@ class Migration(migrations.Migration): ('words', models.IntegerField(blank=True, null=True)), ('order', models.IntegerField(blank=True, default=1)), ('expires', models.DateTimeField(blank=True, null=True)), - ('notify', models.CharField(blank=True, max_length=255)), + ('notify', models.TextField(blank=True, max_length=1023)), ('external_url', models.URLField(blank=True)), + ('uploaded_filename', models.TextField(blank=True)), ('note', models.TextField(blank=True)), ('internal_comments', models.TextField(blank=True)), ('name', models.CharField(max_length=255)), @@ -112,7 +122,8 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Document', fields=[ - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time', models.DateTimeField(default=django.utils.timezone.now)), ('title', models.CharField(max_length=255, validators=[django.core.validators.RegexValidator(message='Please enter a string without control characters.', regex='^[^\x00-\x1f]*$')])), ('abstract', models.TextField(blank=True)), ('rev', models.CharField(blank=True, max_length=16, verbose_name='revision')), @@ -120,77 +131,17 @@ class Migration(migrations.Migration): ('words', models.IntegerField(blank=True, null=True)), ('order', models.IntegerField(blank=True, default=1)), ('expires', models.DateTimeField(blank=True, null=True)), - ('notify', models.CharField(blank=True, max_length=255)), + ('notify', models.TextField(blank=True, max_length=1023)), ('external_url', models.URLField(blank=True)), + ('uploaded_filename', models.TextField(blank=True)), ('note', models.TextField(blank=True)), ('internal_comments', models.TextField(blank=True)), - ('name', models.CharField(max_length=255, primary_key=True, serialize=False, validators=[django.core.validators.RegexValidator(b'^[-a-z0-9]+$', b'Provide a valid document name consisting of lowercase letters, numbers and hyphens.', b'invalid')])), - ('ad', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ad_document_set', to='person.Person', verbose_name='area director')), - ('formal_languages', models.ManyToManyField(blank=True, help_text='Formal languages used in document', to='name.FormalLanguageName')), + ('name', models.CharField(max_length=255, unique=True, validators=[django.core.validators.RegexValidator('^[-a-z0-9]+$', 'Provide a valid document name consisting of lowercase letters, numbers and hyphens.', 'invalid')])), ], options={ 'abstract': False, }, ), - migrations.CreateModel( - name='DocumentAuthor', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('affiliation', models.CharField(blank=True, help_text='Organization/company used by author for submission', max_length=100)), - ('country', models.CharField(blank=True, help_text='Country used by author for submission', max_length=255)), - ('order', models.IntegerField(default=1)), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), - ('email', ietf.utils.models.ForeignKey(blank=True, help_text='Email address used by author for submission', null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Email')), - ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ], - options={ - 'ordering': ['document', 'order'], - 'abstract': False, - }, - ), - migrations.CreateModel( - name='DocumentURL', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('desc', models.CharField(blank=True, default='', max_length=255)), - ('url', models.URLField(max_length=512)), - ('doc', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), - ('tag', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocUrlTagName')), - ], - ), - migrations.CreateModel( - name='RelatedDocHistory', - 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, to='doc.DocHistory')), - ('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reversely_related_document_history_set', to='doc.DocAlias')), - ], - ), - migrations.CreateModel( - name='RelatedDocument', - 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, to='doc.Document')), - ('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias')), - ], - ), - migrations.CreateModel( - name='State', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('slug', models.SlugField()), - ('name', models.CharField(max_length=255)), - ('used', models.BooleanField(default=True)), - ('desc', models.TextField(blank=True)), - ('order', models.IntegerField(default=0)), - ('next_states', models.ManyToManyField(blank=True, related_name='previous_states', to='doc.State')), - ], - options={ - 'ordering': ['type', 'order'], - }, - ), migrations.CreateModel( name='StateType', fields=[ @@ -221,6 +172,21 @@ class Migration(migrations.Migration): ('discuss_time', models.DateTimeField(blank=True, help_text='Time discuss text was written', null=True)), ('comment', models.TextField(blank=True, help_text='Optional comment')), ('comment_time', models.DateTimeField(blank=True, help_text='Time optional comment was written', null=True)), + ('send_email', models.BooleanField(default=None, null=True)), + ], + bases=('doc.docevent',), + ), + migrations.CreateModel( + name='BofreqEditorDocEvent', + fields=[ + ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), + ], + bases=('doc.docevent',), + ), + migrations.CreateModel( + name='BofreqResponsibleDocEvent', + fields=[ + ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), ], bases=('doc.docevent',), ), @@ -228,7 +194,7 @@ class Migration(migrations.Migration): name='ConsensusDocEvent', fields=[ ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), - ('consensus', models.NullBooleanField(default=None)), + ('consensus', models.BooleanField(default=None, null=True)), ], bases=('doc.docevent',), ), @@ -240,6 +206,13 @@ class Migration(migrations.Migration): ], bases=('doc.docevent',), ), + migrations.CreateModel( + name='IanaExpertDocEvent', + fields=[ + ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), + ], + bases=('doc.docevent',), + ), migrations.CreateModel( name='InitialReviewDocEvent', fields=[ @@ -263,6 +236,13 @@ class Migration(migrations.Migration): ], bases=('doc.docevent',), ), + migrations.CreateModel( + name='ReviewAssignmentDocEvent', + fields=[ + ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), + ], + bases=('doc.docevent',), + ), migrations.CreateModel( name='ReviewRequestDocEvent', fields=[ @@ -301,9 +281,88 @@ class Migration(migrations.Migration): ], bases=('doc.docevent',), ), + migrations.CreateModel( + name='State', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('slug', models.SlugField()), + ('name', models.CharField(max_length=255)), + ('used', models.BooleanField(default=True)), + ('desc', models.TextField(blank=True)), + ('order', models.IntegerField(default=0)), + ('next_states', models.ManyToManyField(blank=True, related_name='previous_states', to='doc.State')), + ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.StateType')), + ], + options={ + 'ordering': ['type', 'order'], + }, + ), + migrations.CreateModel( + name='RelatedDocument', + 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, to='doc.Document')), + ('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias')), + ], + ), + migrations.CreateModel( + name='RelatedDocHistory', + 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, to='doc.DocHistory')), + ('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reversely_related_document_history_set', to='doc.DocAlias')), + ], + ), + migrations.CreateModel( + name='DocumentURL', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('desc', models.CharField(blank=True, default='', max_length=255)), + ('url', models.URLField(max_length=2083)), + ('doc', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), + ('tag', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocUrlTagName')), + ], + ), + migrations.CreateModel( + name='DocumentAuthor', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('affiliation', models.CharField(blank=True, help_text='Organization/company used by author for submission', max_length=100)), + ('country', models.CharField(blank=True, help_text='Country used by author for submission', max_length=255)), + ('order', models.IntegerField(default=1)), + ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), + ('email', ietf.utils.models.ForeignKey(blank=True, help_text='Email address used by author for submission', null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Email')), + ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + options={ + 'ordering': ['document', 'order'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DocumentActionHolder', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time_added', models.DateTimeField(default=django.utils.timezone.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='state', - name='type', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.StateType'), + model_name='document', + name='action_holders', + field=models.ManyToManyField(blank=True, through='doc.DocumentActionHolder', to='person.Person'), + ), + migrations.AddField( + model_name='document', + name='ad', + field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ad_document_set', to='person.Person', verbose_name='area director'), + ), + migrations.AddField( + model_name='document', + name='formal_languages', + field=models.ManyToManyField(blank=True, help_text='Formal languages used in document', to='name.FormalLanguageName'), ), ] diff --git a/ietf/doc/migrations/0002_auto_20180220_1052.py b/ietf/doc/migrations/0002_auto_20230320_1222.py similarity index 79% rename from ietf/doc/migrations/0002_auto_20180220_1052.py rename to ietf/doc/migrations/0002_auto_20230320_1222.py index 811e9eb81..90b2d11a2 100644 --- a/ietf/doc/migrations/0002_auto_20180220_1052.py +++ b/ietf/doc/migrations/0002_auto_20230320_1222.py @@ -1,7 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations, models import django.db.models.deletion @@ -13,14 +10,14 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('review', '0001_initial'), - ('contenttypes', '0002_remove_content_type_name'), - ('name', '0001_initial'), - ('submit', '0001_initial'), - ('person', '0001_initial'), ('message', '0001_initial'), - ('doc', '0001_initial'), + ('name', '0001_initial'), + ('person', '0001_initial'), + ('review', '0001_initial'), ('group', '0001_initial'), + ('contenttypes', '0002_remove_content_type_name'), + ('submit', '0001_initial'), + ('doc', '0001_initial'), ] operations = [ @@ -144,6 +141,16 @@ class Migration(migrations.Migration): name='type', field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='name.DocTypeName'), ), + migrations.AddField( + model_name='docextresource', + name='doc', + field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), + ), + migrations.AddField( + model_name='docextresource', + name='name', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceName'), + ), migrations.AddField( model_name='docevent', name='by', @@ -156,8 +163,8 @@ class Migration(migrations.Migration): ), migrations.AddField( model_name='docalias', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), + name='docs', + field=models.ManyToManyField(related_name='docalias', to='doc.Document'), ), migrations.AddField( model_name='deletedevent', @@ -179,6 +186,14 @@ class Migration(migrations.Migration): name='positions', field=models.ManyToManyField(blank=True, to='name.BallotPositionName'), ), + migrations.CreateModel( + name='IRSGBallotDocEvent', + fields=[ + ('ballotdocevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.BallotDocEvent')), + ('duedate', models.DateTimeField(blank=True, null=True)), + ], + bases=('doc.ballotdocevent',), + ), migrations.AddField( model_name='submissiondocevent', name='submission', @@ -205,15 +220,55 @@ class Migration(migrations.Migration): field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='name.ReviewRequestStateName'), ), migrations.AddField( - model_name='ballotpositiondocevent', - name='ad', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + model_name='reviewassignmentdocevent', + name='review_assignment', + field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='review.ReviewAssignment'), + ), + migrations.AddField( + model_name='reviewassignmentdocevent', + name='state', + field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='name.ReviewAssignmentStateName'), + ), + migrations.AddIndex( + model_name='documentauthor', + index=models.Index(fields=['document', 'order'], name='doc_documen_documen_7fabe2_idx'), + ), + migrations.AddConstraint( + model_name='documentactionholder', + constraint=models.UniqueConstraint(fields=('document', 'person'), name='unique_action_holder'), + ), + migrations.AddIndex( + model_name='dochistoryauthor', + index=models.Index(fields=['document', 'order'], name='doc_dochist_documen_7e2441_idx'), + ), + migrations.AddIndex( + model_name='docevent', + index=models.Index(fields=['type', 'doc'], name='doc_doceven_type_43e53e_idx'), + ), + migrations.AddIndex( + model_name='docevent', + index=models.Index(fields=['-time', '-id'], name='doc_doceven_time_1a258f_idx'), + ), + migrations.AddField( + model_name='bofreqresponsibledocevent', + name='responsible', + field=models.ManyToManyField(blank=True, to='person.Person'), + ), + migrations.AddField( + model_name='bofreqeditordocevent', + name='editors', + field=models.ManyToManyField(blank=True, to='person.Person'), ), migrations.AddField( model_name='ballotpositiondocevent', name='ballot', field=ietf.utils.models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.BallotDocEvent'), ), + migrations.AddField( + model_name='ballotpositiondocevent', + name='balloter', + field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + ), migrations.AddField( model_name='ballotpositiondocevent', name='pos', diff --git a/ietf/doc/migrations/0003_auto_20180401_1231.py b/ietf/doc/migrations/0003_auto_20180401_1231.py deleted file mode 100644 index 7760b2511..000000000 --- a/ietf/doc/migrations/0003_auto_20180401_1231.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.11 on 2018-04-01 12:31 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0002_auto_20180220_1052'), - ] - - operations = [ - migrations.AddIndex( - model_name='docevent', - index=models.Index(fields=['type', 'doc'], name='doc_doceven_type_43e53e_idx'), - ), - ] diff --git a/ietf/doc/migrations/0004_add_draft_stream_replaced_states.py b/ietf/doc/migrations/0004_add_draft_stream_replaced_states.py deleted file mode 100644 index 9d57cb476..000000000 --- a/ietf/doc/migrations/0004_add_draft_stream_replaced_states.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.13 on 2018-05-03 11:50 - - -from django.db import migrations - -def forward(apps, schema_editor): - State = apps.get_model('doc','State') - for type_id in ('draft-stream-iab','draft-stream-ise','draft-stream-irtf'): - State.objects.create(type_id=type_id, - slug='repl', - name='Replaced', - desc='Replaced', - ) - - -def reverse(apps, schema_editor): - State = apps.get_model('doc','State') - State.objects.filter(type_id__in=('draft-stream-iab','draft-stream-ise','draft-stream-irtf'), slug='repl').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0003_auto_20180401_1231'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/doc/migrations/0005_fix_replaced_iab_irtf_stream_docs.py b/ietf/doc/migrations/0005_fix_replaced_iab_irtf_stream_docs.py deleted file mode 100644 index 3529baf98..000000000 --- a/ietf/doc/migrations/0005_fix_replaced_iab_irtf_stream_docs.py +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.13 on 2018-05-03 12:16 - - -from django.db import migrations - -def forward(apps, schema_editor): - Document = apps.get_model('doc','Document') - State = apps.get_model('doc','State') - - iab_active = State.objects.get(type_id='draft-stream-iab',slug='active') - iab_replaced = State.objects.get(type_id='draft-stream-iab',slug='repl') - - irtf_active = State.objects.get(type_id='draft-stream-irtf',slug='active') - irtf_candidate = State.objects.get(type_id='draft-stream-irtf',slug='candidat') - irtf_replaced = State.objects.get(type_id='draft-stream-irtf',slug='repl') - irtf_dead = State.objects.get(type_id='draft-stream-irtf',slug='dead') - - doc = Document.objects.get(name='draft-flanagan-rfc-preservation') - doc.states.remove(iab_active) - doc.states.add(iab_replaced) - - doc = Document.objects.get(name='draft-trammell-semi-report') - doc.states.remove(iab_active) - doc.states.add(iab_replaced) - - doc = Document.objects.get(name='draft-nir-cfrg-chacha20-poly1305') - doc.states.remove(irtf_candidate) - doc.states.add(irtf_replaced) - - doc = Document.objects.get(name='draft-ladd-spake2') - doc.states.remove(irtf_candidate) - doc.states.add(irtf_replaced) - - doc = Document.objects.get(name='draft-lee-nfvrg-resource-management-service-chain') - doc.states.remove(irtf_candidate) - doc.states.add(irtf_replaced) - - doc = Document.objects.get(name='draft-keranen-t2trg-rest-iot') - doc.states.remove(irtf_candidate) - doc.states.add(irtf_replaced) - - doc = Document.objects.get(name='draft-josefsson-argon2') - doc.states.remove(irtf_active) - doc.states.add(irtf_replaced) - - doc = Document.objects.get(name='draft-tenoever-hrpc-research') - doc.states.remove(irtf_active) - doc.states.add(irtf_replaced) - - doc = Document.objects.get(name='draft-kutscher-icnrg-challenges') - doc.states.remove(irtf_dead) - doc.states.add(irtf_replaced) - -def reverse(apps, schema_editor): - Document = apps.get_model('doc','Document') - State = apps.get_model('doc','State') - - iab_active = State.objects.get(type_id='draft-stream-iab',slug='active') - iab_replaced = State.objects.get(type_id='draft-stream-iab',slug='repl') - - irtf_active = State.objects.get(type_id='draft-stream-irtf',slug='active') - irtf_candidate = State.objects.get(type_id='draft-stream-irtf',slug='candidat') - irtf_replaced = State.objects.get(type_id='draft-stream-irtf',slug='repl') - irtf_dead = State.objects.get(type_id='draft-stream-irtf',slug='dead') - - doc = Document.objects.get(name='draft-flanagan-rfc-preservation') - doc.states.add(iab_active) - doc.states.remove(iab_replaced) - - doc = Document.objects.get(name='draft-trammell-semi-report') - doc.states.add(iab_active) - doc.states.remove(iab_replaced) - - doc = Document.objects.get(name='draft-nir-cfrg-chacha20-poly1305') - doc.states.add(irtf_candidate) - doc.states.remove(irtf_replaced) - - doc = Document.objects.get(name='draft-ladd-spake2') - doc.states.add(irtf_candidate) - doc.states.remove(irtf_replaced) - - doc = Document.objects.get(name='draft-lee-nfvrg-resource-management-service-chain') - doc.states.add(irtf_candidate) - doc.states.remove(irtf_replaced) - - doc = Document.objects.get(name='draft-keranen-t2trg-rest-iot') - doc.states.add(irtf_candidate) - doc.states.remove(irtf_replaced) - - doc = Document.objects.get(name='draft-josefsson-argon2') - doc.states.add(irtf_active) - doc.states.remove(irtf_replaced) - - doc = Document.objects.get(name='draft-tenoever-hrpc-research') - doc.states.add(irtf_active) - doc.states.remove(irtf_replaced) - - doc = Document.objects.get(name='draft-kutscher-icnrg-challenges') - doc.states.add(irtf_dead) - doc.states.remove(irtf_replaced) - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0004_add_draft_stream_replaced_states'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/doc/migrations/0006_ballotpositiondocevent_send_email.py b/ietf/doc/migrations/0006_ballotpositiondocevent_send_email.py deleted file mode 100644 index 42f58ca02..000000000 --- a/ietf/doc/migrations/0006_ballotpositiondocevent_send_email.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.15 on 2018-10-03 06:39 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0005_fix_replaced_iab_irtf_stream_docs'), - ] - - operations = [ - migrations.AddField( - model_name='ballotpositiondocevent', - name='send_email', - field=models.NullBooleanField(default=None), - ), - ] diff --git a/ietf/doc/migrations/0007_idexists.py b/ietf/doc/migrations/0007_idexists.py deleted file mode 100644 index d8df81d5f..000000000 --- a/ietf/doc/migrations/0007_idexists.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-11-04 10:56 - - -from tqdm import tqdm - -from django.db import migrations - - -def forward(apps, schema_editor): - State = apps.get_model('doc','State') - Document = apps.get_model('doc','Document') - DocHistory = apps.get_model('doc','DocHistory') - - idexists = State.objects.create( - type_id = 'draft-iesg', - slug = 'idexists', - name = 'I-D Exists', - used = True, - desc = 'The IESG has not started processing this draft, or has stopped processing it without publicastion.', - order = 0, - ) - idexists.next_states.set(State.objects.filter(type='draft-iesg',slug__in=['pub-req','watching'])) - - #for doc in tqdm(Document.objects.filter(type='draft'): - # if not doc.states.filter(type='draft-iesg').exists(): - # doc.states.add(idexists) - # for dh in doc.history_set.all(): - # if not dh.states.filter(type='draft-iesg').exists(): - # dh.states.add(idexists) - - for doc in tqdm(Document.objects.filter(type_id='draft').exclude(states__type_id='draft-iesg')): - doc.states.add(idexists) - for history in tqdm(DocHistory.objects.filter(type_id='draft').exclude(states__type_id='draft-iesg')): - history.states.add(idexists) - - -def reverse(apps, schema_editor): - State = apps.get_model('doc','State') - State.objects.filter(slug='idexists').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0006_ballotpositiondocevent_send_email'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/doc/migrations/0008_add_uploaded_filename.py b/ietf/doc/migrations/0008_add_uploaded_filename.py deleted file mode 100644 index bf3690108..000000000 --- a/ietf/doc/migrations/0008_add_uploaded_filename.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.17 on 2018-12-28 13:11 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0007_idexists'), - ] - - operations = [ - migrations.AddField( - model_name='dochistory', - name='uploaded_filename', - field=models.TextField(blank=True), - ), - migrations.AddField( - model_name='document', - name='uploaded_filename', - field=models.TextField(blank=True), - ), - ] diff --git a/ietf/doc/migrations/0009_move_non_url_externalurls_to_uploaded_filename.py b/ietf/doc/migrations/0009_move_non_url_externalurls_to_uploaded_filename.py deleted file mode 100644 index f97ebbdff..000000000 --- a/ietf/doc/migrations/0009_move_non_url_externalurls_to_uploaded_filename.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.17 on 2018-12-28 13:33 - - -from django.db import migrations -from django.db.models import F - -def forward(apps, schema_editor): - Document = apps.get_model('doc','Document') - Document.objects.exclude(type_id__in=('review','recording')).update(uploaded_filename = F('external_url')) - Document.objects.exclude(type_id__in=('review','recording')).update(external_url="") - - Document.objects.filter(name='slides-100-edu-sessf-patents-at-ietf-an-overview-of-bcp79bis').update(uploaded_filename='slides-100-edu-sessf-patents-at-ietf-an-overview-of-bcp79bis-00.pdf') - - DocHistory = apps.get_model('doc','DocHistory') - DocHistory.objects.exclude(type_id__in=('review','recording')).update(uploaded_filename = F('external_url')) - DocHistory.objects.exclude(type_id__in=('review','recording')).update(external_url="") - - DocHistory.objects.filter(uploaded_filename='https://www.ietf.org/proceedings/97/slides/slides-97-edu-sessb-local-version-of-newcomers-training-in-korean-00.pdf').update(uploaded_filename='slides-97-edu-sessb-local-version-of-newcomers-training-in-korean-00.pdf') - DocHistory.objects.filter(uploaded_filename='http://materials-98-codec-opus-newvectors-00.tar.gz').update(uploaded_filename='materials-98-codec-opus-newvectors-00.tar.gz') - DocHistory.objects.filter(uploaded_filename='http://materials-98-codec-opus-update-00.patch').update(uploaded_filename='materials-98-codec-opus-update-00.patch') - DocHistory.objects.filter(uploaded_filename='http://slides-100-edu-sessf-patents-at-ietf-an-overview-of-bcp79bis-00.pdf').update(uploaded_filename='slides-100-edu-sessf-patents-at-ietf-an-overview-of-bcp79bis-00.pdf') - DocHistory.objects.filter(uploaded_filename='http://bluesheets-97-6man-201611150930-00.pdf/').update(uploaded_filename='bluesheets-97-6man-201611150930-00.pdf') - DocHistory.objects.filter(uploaded_filename='http://agenda-interim-2017-stir-01-stir-01-01.txt').update(uploaded_filename='agenda-interim-2017-stir-01-stir-01-01.txt') - DocHistory.objects.filter(uploaded_filename='http://agenda-interim-2017-icnrg-02-icnrg-01-05.html').update(uploaded_filename='agenda-interim-2017-icnrg-02-icnrg-01-05.html') - - -def reverse(apps, schema_editor): - Document = apps.get_model('doc','Document') - Document.objects.exclude(type_id__in=('review','recording')).update(external_url = F('uploaded_filename')) - Document.objects.exclude(type_id__in=('review','recording')).update(uploaded_filename="") - - DocHistory = apps.get_model('doc','DocHistory') - DocHistory.objects.exclude(type_id__in=('review','recording')).update(external_url = F('uploaded_filename')) - DocHistory.objects.exclude(type_id__in=('review','recording')).update(uploaded_filename="") - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0008_add_uploaded_filename'), - ('review', '0008_remove_reviewrequest_old_id'), - ('meeting', '0011_auto_20190114_0550'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - ] diff --git a/ietf/doc/migrations/0010_auto_20190225_1302.py b/ietf/doc/migrations/0010_auto_20190225_1302.py deleted file mode 100644 index 2f8dfef45..000000000 --- a/ietf/doc/migrations/0010_auto_20190225_1302.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-02-25 13:02 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0009_move_non_url_externalurls_to_uploaded_filename'), - ] - - operations = [ - migrations.AlterField( - model_name='documenturl', - name='url', - field=models.URLField(max_length=2083), - ), - ] diff --git a/ietf/doc/migrations/0011_reviewassignmentdocevent.py b/ietf/doc/migrations/0011_reviewassignmentdocevent.py deleted file mode 100644 index e143b5339..000000000 --- a/ietf/doc/migrations/0011_reviewassignmentdocevent.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.18 on 2019-01-11 11:22 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0009_refactor_review_request'), - ('name', '0005_reviewassignmentstatename'), - ('doc', '0010_auto_20190225_1302'), - ] - - operations = [ - migrations.CreateModel( - name='ReviewAssignmentDocEvent', - fields=[ - ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), - ('review_assignment', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='review.ReviewAssignment')), - ('state', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='name.ReviewAssignmentStateName')), - ], - bases=('doc.docevent',), - ), - ] diff --git a/ietf/doc/migrations/0012_add_event_type_closed_review_assignment.py b/ietf/doc/migrations/0012_add_event_type_closed_review_assignment.py deleted file mode 100644 index ae9bb3ce8..000000000 --- a/ietf/doc/migrations/0012_add_event_type_closed_review_assignment.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-01 04:43 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0011_reviewassignmentdocevent'), - # present to facilitate migration to just before review.0010: - ('name', '0006_adjust_statenames'), - ('dbtemplate', '0004_adjust_assignment_email_summary_templates'), - ] - - operations = [ - migrations.AlterField( - model_name='docevent', - name='type', - field=models.CharField(choices=[('new_revision', 'Added new revision'), ('new_submission', 'Uploaded new revision'), ('changed_document', 'Changed document metadata'), ('added_comment', 'Added comment'), ('added_message', 'Added message'), ('edited_authors', 'Edited the documents author list'), ('deleted', 'Deleted document'), ('changed_state', 'Changed state'), ('changed_stream', 'Changed document stream'), ('expired_document', 'Expired document'), ('extended_expiry', 'Extended expiry of document'), ('requested_resurrect', 'Requested resurrect'), ('completed_resurrect', 'Completed resurrect'), ('changed_consensus', 'Changed consensus'), ('published_rfc', 'Published RFC'), ('added_suggested_replaces', 'Added suggested replacement relationships'), ('reviewed_suggested_replaces', 'Reviewed suggested replacement relationships'), ('changed_group', 'Changed group'), ('changed_protocol_writeup', 'Changed protocol writeup'), ('changed_charter_milestone', 'Changed charter milestone'), ('initial_review', 'Set initial review time'), ('changed_review_announcement', 'Changed WG Review text'), ('changed_action_announcement', 'Changed WG Action text'), ('started_iesg_process', 'Started IESG process on document'), ('created_ballot', 'Created ballot'), ('closed_ballot', 'Closed ballot'), ('sent_ballot_announcement', 'Sent ballot announcement'), ('changed_ballot_position', 'Changed ballot position'), ('changed_ballot_approval_text', 'Changed ballot approval text'), ('changed_ballot_writeup_text', 'Changed ballot writeup text'), ('changed_rfc_editor_note_text', 'Changed RFC Editor Note text'), ('changed_last_call_text', 'Changed last call text'), ('requested_last_call', 'Requested last call'), ('sent_last_call', 'Sent last call'), ('scheduled_for_telechat', 'Scheduled for telechat'), ('iesg_approved', 'IESG approved document (no problem)'), ('iesg_disapproved', 'IESG disapproved document (do not publish)'), ('approved_in_minute', 'Approved in minute'), ('iana_review', 'IANA review comment'), ('rfc_in_iana_registry', 'RFC is in IANA registry'), ('rfc_editor_received_announcement', 'Announcement was received by RFC Editor'), ('requested_publication', 'Publication at RFC Editor requested'), ('sync_from_rfc_editor', 'Received updated information from RFC Editor'), ('requested_review', 'Requested review'), ('assigned_review_request', 'Assigned review request'), ('closed_review_request', 'Closed review request'), ('closed_review_assignment', 'Closed review assignment'), ('downref_approved', 'Downref approved')], max_length=50), - ), - ] diff --git a/ietf/doc/migrations/0013_add_document_docalias_id.py b/ietf/doc/migrations/0013_add_document_docalias_id.py deleted file mode 100644 index 1b9d0ab91..000000000 --- a/ietf/doc/migrations/0013_add_document_docalias_id.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 08:41 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0012_add_event_type_closed_review_assignment'), - ] - - operations = [ - migrations.AddField( - model_name='docalias', - name='id', - field=models.IntegerField(default=0), - ), - migrations.AddField( - model_name='document', - name='id', - field=models.IntegerField(default=0), - ), - ] diff --git a/ietf/doc/migrations/0014_set_document_docalias_id.py b/ietf/doc/migrations/0014_set_document_docalias_id.py deleted file mode 100644 index a97f6d7e4..000000000 --- a/ietf/doc/migrations/0014_set_document_docalias_id.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 08:42 - - -import sys - -from tqdm import tqdm - -from django.db import migrations - - -def forward(apps, schema_editor): - Document = apps.get_model('doc','Document') - sys.stderr.write('\n') - for i, d in enumerate(tqdm(Document.objects.all()), start=1): - d.id = i - d.save() - - DocAlias = apps.get_model('doc','DocAlias') - for i, d in enumerate(tqdm(DocAlias.objects.all()), start=1): - d.id = i - d.save() - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0013_add_document_docalias_id'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0015_1_add_fk_to_document_id.py b/ietf/doc/migrations/0015_1_add_fk_to_document_id.py deleted file mode 100644 index 6d2e7415f..000000000 --- a/ietf/doc/migrations/0015_1_add_fk_to_document_id.py +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 10:29 - - -import django.core.validators -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0014_set_document_docalias_id'), - ] - - operations = [ - # Fix name and id fields first - migrations.AlterField( - model_name='docalias', - name='name', - field=models.CharField(max_length=255, unique=True), - ), - migrations.AlterField( - model_name='docalias', - name='id', - field=models.IntegerField(primary_key=True, serialize=False), - ), - migrations.AlterField( - model_name='document', - name='name', - field=models.CharField(max_length=255, unique=True, validators=[django.core.validators.RegexValidator('^[-a-z0-9]+$', 'Provide a valid document name consisting of lowercase letters, numbers and hyphens.', 'invalid')]), - ), - migrations.AlterField( - model_name='document', - name='id', - field=models.IntegerField(primary_key=True, serialize=False), - ), - - # Then remaining fields - migrations.AddField( - model_name='docalias', - name='document2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id'), - ), - migrations.AddField( - model_name='dochistory', - name='doc2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='history_set', to='doc.Document', to_field=b'id'), - ), - migrations.AddField( - model_name='documentauthor', - name='document2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id'), - ), - migrations.AddField( - model_name='documenturl', - name='doc2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id'), - ), - migrations.AddField( - model_name='relateddochistory', - name='target2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reversely_related_document_history_set', to='doc.DocAlias', to_field=b'id'), - ), - migrations.AddField( - model_name='relateddocument', - name='source2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id'), - ), - migrations.AddField( - model_name='relateddocument', - name='target2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias', to_field=b'id'), - ), - migrations.AddField( - model_name='docevent', - name='doc2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='id'), - ), - migrations.AlterField( - model_name='docalias', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_docalias', to='doc.Document', to_field=b'name'), - ), - migrations.AlterField( - model_name='dochistory', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_hist', to='doc.Document', to_field=b'name'), - ), - migrations.AlterField( - model_name='documentauthor', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_doc_auth', to='doc.Document', to_field=b'name'), - ), - migrations.AlterField( - model_name='documenturl', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_doc_url', to='doc.Document', to_field=b'name'), - ), - migrations.AlterField( - model_name='relateddochistory', - name='target', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_hist_target', to='doc.DocAlias', to_field=b'name'), - ), - migrations.AlterField( - model_name='relateddocument', - name='source', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_rel_source', to='doc.Document', to_field=b'name'), - ), - migrations.AlterField( - model_name='relateddocument', - name='target', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_rel_target', to='doc.DocAlias', to_field=b'name'), - ), - migrations.AlterField( - model_name='docevent', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_docevent', to='doc.Document', to_field=b'name'), - ), - ] diff --git a/ietf/doc/migrations/0015_2_add_doc_document_m2m_fields.py b/ietf/doc/migrations/0015_2_add_doc_document_m2m_fields.py deleted file mode 100644 index e49a40396..000000000 --- a/ietf/doc/migrations/0015_2_add_doc_document_m2m_fields.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-28 12:42 - - -import sys, time - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -def timestamp(apps, schema_editor): - sys.stderr.write('\n %s' % time.strftime('%Y-%m-%d %H:%M:%S')) - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0006_adjust_statenames'), - ('doc', '0015_1_add_fk_to_document_id'), - ] - - operations = [ - migrations.CreateModel( - name='DocumentLanguages', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='name', related_name='doclanguages')), - ('formallanguagename', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.FormalLanguageName')), - ], - ), - migrations.CreateModel( - name='DocumentStates', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='name', related_name='docstates')), - ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.State')), - ], - ), - migrations.CreateModel( - name='DocumentTags', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='name', related_name='doctags')), - ('doctagname', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DocTagName')), - ], - ), - migrations.AddField( - model_name='document', - name='formal_languages2', - field=models.ManyToManyField(blank=True, related_name='languagedocs', through='doc.DocumentLanguages', to='name.FormalLanguageName'), - ), - migrations.AddField( - model_name='document', - name='states2', - field=models.ManyToManyField(blank=True, related_name='statedocs', through='doc.DocumentStates', to='doc.State'), - ), - migrations.AddField( - model_name='document', - name='tags2', - field=models.ManyToManyField(blank=True, related_name='tagdocs', through='doc.DocumentTags', to='name.DocTagName'), - ), - # Here we copy the content of the existing implicit m2m tables for - # the Document m2m fields into the explicit through tables, in order - # to be able to later set the correct id from name - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO doc_documentlanguages SELECT * FROM doc_document_formal_languages;", - ""), - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO doc_documentstates SELECT * FROM doc_document_states;", - ""), - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO doc_documenttags SELECT * FROM doc_document_tags;", - ""), - migrations.RunPython(timestamp, timestamp), - migrations.AddField( - model_name='documentlanguages', - name='document2', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='id', null=True, default=None), - ), - migrations.AddField( - model_name='documentstates', - name='document2', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='id', null=True, default=None), ), - migrations.AddField( - model_name='documenttags', - name='document2', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='id', null=True, default=None), - - ), - ] diff --git a/ietf/doc/migrations/0016_set_document_docalias_fk.py b/ietf/doc/migrations/0016_set_document_docalias_fk.py deleted file mode 100644 index 67d1333f3..000000000 --- a/ietf/doc/migrations/0016_set_document_docalias_fk.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 14:04 - - -import sys - -from tqdm import tqdm - -from django.db import migrations - -def forward(apps, schema_editor): - - def add_id_fk(o, a, nameid): - n = getattr(o, a+'_id') - if n: - i = nameid[n] - if not isinstance(i, int): - raise ValueError("Inappropriate value: %s: nameid[%s]: %s" % (o.__class__.__name__, n, i)) - if getattr(o, a+'2_id') != i: - setattr(o, a+'2_id', i) - o.save() - - DocAlias = apps.get_model('doc','DocAlias') - DocEvent = apps.get_model('doc', 'DocEvent') - DocHistory = apps.get_model('doc', 'DocHistory') - Document = apps.get_model('doc', 'Document') - DocumentAuthor = apps.get_model('doc', 'DocumentAuthor') - DocumentLanguages = apps.get_model('doc', 'DocumentLanguages') - DocumentStates = apps.get_model('doc', 'DocumentStates') - DocumentTags = apps.get_model('doc', 'DocumentTags') - DocumentURL = apps.get_model('doc', 'DocumentURL') - Group = apps.get_model('group', 'Group') - IprDocRel = apps.get_model('ipr', 'IprDocRel') - LiaisonStatementAttachment = apps.get_model('liaisons', 'LiaisonStatementAttachment') - RelatedDocHistory = apps.get_model('doc', 'RelatedDocHistory') - RelatedDocument = apps.get_model('doc', 'RelatedDocument') - ReviewAssignment = apps.get_model('review', 'ReviewAssignment') - ReviewRequest = apps.get_model('review', 'ReviewRequest') - ReviewWish = apps.get_model('review', 'ReviewWish') - SessionPresentation = apps.get_model('meeting', 'SessionPresentation') - Submission = apps.get_model('submit', 'Submission') - - # Document id fixup ------------------------------------------------------------ - - objs = Document.objects.in_bulk() - nameid = { o.name: o.id for id, o in objs.items() } - - sys.stderr.write('\n') - - sys.stderr.write('Setting Document FKs:\n') - - for C, a in [ - ( DocAlias , 'document'), - ( DocEvent , 'doc'), - ( DocHistory , 'doc'), - ( DocumentAuthor , 'document'), - ( DocumentLanguages , 'document'), - ( DocumentStates , 'document'), - ( DocumentTags , 'document'), - ( DocumentURL , 'doc'), - ( Group , 'charter'), - ( LiaisonStatementAttachment , 'document'), - ( RelatedDocument , 'source'), - ( ReviewAssignment , 'review'), - ( ReviewRequest , 'doc'), - ( ReviewRequest , 'unused_review'), - ( ReviewWish , 'doc'), - ( SessionPresentation , 'document'), - ( Submission , 'draft'), - ]: - sys.stderr.write(' %s.%s:\n' % (C.__name__, a)) - for o in tqdm(C.objects.all()): - add_id_fk(o, a, nameid) - - # DocAlias id fixup ------------------------------------------------------------ - - sys.stderr.write('\n') - - objs = DocAlias.objects.in_bulk() - nameid = { o.name: o.id for id, o in objs.items() } - - sys.stderr.write('Setting DocAlias FKs:\n') - - for C, a in [ - ( IprDocRel , 'document'), - ( RelatedDocument , 'target'), - ( RelatedDocHistory , 'target'), - ]: - sys.stderr.write(' %s.%s:\n' % (C.__name__, a)) - for o in tqdm(C.objects.all()): - add_id_fk(o, a, nameid) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0004_set_document_m2m_keys'), - ('doc', '0015_2_add_doc_document_m2m_fields'), - ('group', '0014_set_document_m2m_keys'), - ('ipr', '0003_add_ipdocrel_document2_fk'), - ('liaisons', '0003_liaison_document2_fk'), - ('meeting', '0015_sessionpresentation_document2_fk'), - ('message', '0003_set_document_m2m_keys'), - ('review', '0011_review_document2_fk'), - ('submit', '0002_submission_document2_fk'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0017_make_document_id_primary_key.py b/ietf/doc/migrations/0017_make_document_id_primary_key.py deleted file mode 100644 index baadd6f72..000000000 --- a/ietf/doc/migrations/0017_make_document_id_primary_key.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-09 05:46 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0016_set_document_docalias_fk'), - ] - - operations = [ - migrations.AlterField( - model_name='docalias', - name='id', - field=models.AutoField(primary_key=True, serialize=False), - ), - migrations.AlterField( - model_name='document', - name='id', - field=models.AutoField(primary_key=True, serialize=False), - ), - ] diff --git a/ietf/doc/migrations/0018_remove_old_document_field.py b/ietf/doc/migrations/0018_remove_old_document_field.py deleted file mode 100644 index 887dcc770..000000000 --- a/ietf/doc/migrations/0018_remove_old_document_field.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-20 09:53 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0017_make_document_id_primary_key'), - ] - - operations = [ - migrations.AlterModelOptions( - name='documentauthor', - options={'ordering': ['document2', 'order']}, - ), - migrations.RemoveIndex( - model_name='docevent', - name='doc_doceven_type_43e53e_idx', - ), - migrations.RemoveField( - model_name='docalias', - name='document', - ), - migrations.RemoveField( - model_name='docevent', - name='doc', - ), - migrations.RemoveField( - model_name='dochistory', - name='doc', - ), - migrations.RemoveField( - model_name='documentauthor', - name='document', - ), - migrations.RemoveField( - model_name='documenturl', - name='doc', - ), - migrations.RemoveField( - model_name='relateddochistory', - name='target', - ), - migrations.RemoveField( - model_name='relateddocument', - name='source', - ), - migrations.RemoveField( - model_name='relateddocument', - name='target', - ), - migrations.AddIndex( - model_name='docevent', - index=models.Index(fields=['type', 'doc2'], name='doc_doceven_type_ac7748_idx'), - ), - # The following 9 migrations are related to the m2m fields on Document - # Remove the intermediary model field pointing to Document.name - migrations.RemoveField( - model_name='documentlanguages', - name='document', - ), - migrations.RemoveField( - model_name='documentstates', - name='document', - ), - migrations.RemoveField( - model_name='documenttags', - name='document', - ), - # Rename the intermediary model field pointing to Document.id, to - # match the implicit m2m table - migrations.RenameField( - model_name='documentlanguages', - old_name='document2', - new_name='document', - ), - migrations.RenameField( - model_name='documentstates', - old_name='document2', - new_name='document', - ), - migrations.RenameField( - model_name='documenttags', - old_name='document2', - new_name='document', - ), - # Alter the fields to point to Document.pk instead of Document.name - migrations.AlterField( - model_name='documentlanguages', - name='document', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - migrations.AlterField( - model_name='documentstates', - name='document', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - migrations.AlterField( - model_name='documenttags', - name='document', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - # Remove the implicit m2m tables which point to Document.name - migrations.RemoveField( - model_name='document', - name='formal_languages', - ), - migrations.RemoveField( - model_name='document', - name='states', - ), - migrations.RemoveField( - model_name='document', - name='tags', - ), - # Next (in a separate migration, in order to commit the above before - # we proceed) we'll create the implicit m2m tables again, this time - # pointing to Document.id since that's now the primary key. - ] diff --git a/ietf/doc/migrations/0019_rename_field_document2.py b/ietf/doc/migrations/0019_rename_field_document2.py deleted file mode 100644 index 517ae9ee7..000000000 --- a/ietf/doc/migrations/0019_rename_field_document2.py +++ /dev/null @@ -1,84 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 05:31 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0018_remove_old_document_field'), - ] - - operations = [ - migrations.AlterModelOptions( - name='documentauthor', - options={'ordering': ['document', 'order']}, - ), - migrations.RemoveIndex( - model_name='docevent', - name='doc_doceven_type_ac7748_idx', - ), - migrations.RenameField( - model_name='docalias', - old_name='document2', - new_name='document', - ), - migrations.RenameField( - model_name='docevent', - old_name='doc2', - new_name='doc', - ), - migrations.RenameField( - model_name='dochistory', - old_name='doc2', - new_name='doc', - ), - migrations.RenameField( - model_name='documentauthor', - old_name='document2', - new_name='document', - ), - migrations.RenameField( - model_name='documenturl', - old_name='doc2', - new_name='doc', - ), - migrations.RenameField( - model_name='relateddochistory', - old_name='target2', - new_name='target', - ), - migrations.RenameField( - model_name='relateddocument', - old_name='source2', - new_name='source', - ), - migrations.RenameField( - model_name='relateddocument', - old_name='target2', - new_name='target', - ), - migrations.AddIndex( - model_name='docevent', - index=models.Index(fields=['type', 'doc'], name='doc_doceven_type_43e53e_idx'), - ), - # Add back the m2m field we removed in 0018_... - migrations.AddField( - model_name='document', - name='formal_languages', - field=models.ManyToManyField(blank=True, help_text='Formal languages used in document', to='name.FormalLanguageName'), - ), - migrations.AddField( - model_name='document', - name='states', - field=models.ManyToManyField(blank=True, to='doc.State'), - ), - migrations.AddField( - model_name='document', - name='tags', - field=models.ManyToManyField(blank=True, to='name.DocTagName'), - ), - ] diff --git a/ietf/doc/migrations/0020_copy_docs_m2m_table.py b/ietf/doc/migrations/0020_copy_docs_m2m_table.py deleted file mode 100644 index 482c4d785..000000000 --- a/ietf/doc/migrations/0020_copy_docs_m2m_table.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 05:31 - - -import sys, time - -from django.db import migrations - -def timestamp(apps, schema_editor): - sys.stderr.write('\n %s' % time.strftime('%Y-%m-%d %H:%M:%S')) - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0019_rename_field_document2'), - ] - - operations = [ - # Copy the doc IDs from the explicit m2m table to the implicit table - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO doc_document_formal_languages SELECT id,document_id,formallanguagename_id FROM doc_documentlanguages;", - ""), - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO doc_document_states SELECT id,document_id,state_id FROM doc_documentstates;", - ""), - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO doc_document_tags SELECT id,document_id,doctagname_id FROM doc_documenttags;", - ""), - migrations.RunPython(timestamp, timestamp), - ] diff --git a/ietf/doc/migrations/0021_remove_docs2_m2m.py b/ietf/doc/migrations/0021_remove_docs2_m2m.py deleted file mode 100644 index c659b65de..000000000 --- a/ietf/doc/migrations/0021_remove_docs2_m2m.py +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-30 03:36 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0020_copy_docs_m2m_table'), - ] - - operations = [ - # Get rid of the explicit m2m tables which we needed only to be - # able to convert from Document.name to Document.id - migrations.RemoveField( - model_name='documentlanguages', - name='document', - ), - migrations.RemoveField( - model_name='documentlanguages', - name='formallanguagename', - ), - migrations.RemoveField( - model_name='documentstates', - name='document', - ), - migrations.RemoveField( - model_name='documentstates', - name='state', - ), - migrations.RemoveField( - model_name='documenttags', - name='doctagname', - ), - migrations.RemoveField( - model_name='documenttags', - name='document', - ), - migrations.RemoveField( - model_name='document', - name='formal_languages2', - ), - migrations.RemoveField( - model_name='document', - name='states2', - ), - migrations.RemoveField( - model_name='document', - name='tags2', - ), - migrations.DeleteModel( - name='DocumentLanguages', - ), - migrations.DeleteModel( - name='DocumentStates', - ), - migrations.DeleteModel( - name='DocumentTags', - ), - ] diff --git a/ietf/doc/migrations/0022_document_primary_key_cleanup.py b/ietf/doc/migrations/0022_document_primary_key_cleanup.py deleted file mode 100644 index 9ddc908f5..000000000 --- a/ietf/doc/migrations/0022_document_primary_key_cleanup.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-06-10 03:47 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0021_remove_docs2_m2m'), - ] - - operations = [ - migrations.AlterField( - model_name='docalias', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - migrations.AlterField( - model_name='docalias', - name='id', - field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), - ), - migrations.AlterField( - model_name='docevent', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - migrations.AlterField( - model_name='dochistory', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history_set', to='doc.Document'), - ), - migrations.AlterField( - model_name='document', - name='id', - field=models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'), - ), - migrations.AlterField( - model_name='documentauthor', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - migrations.AlterField( - model_name='documenturl', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - migrations.AlterField( - model_name='relateddochistory', - name='target', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reversely_related_document_history_set', to='doc.DocAlias'), - ), - migrations.AlterField( - model_name='relateddocument', - name='source', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - migrations.AlterField( - model_name='relateddocument', - name='target', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias'), - ), - ] diff --git a/ietf/doc/migrations/0023_one_to_many_docalias.py b/ietf/doc/migrations/0023_one_to_many_docalias.py deleted file mode 100644 index cf3c8330a..000000000 --- a/ietf/doc/migrations/0023_one_to_many_docalias.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-06-10 04:36 - - -import sys - -from tqdm import tqdm - -from django.db import migrations, models - - -def forward(apps, schema_editor): - DocAlias = apps.get_model('doc','DocAlias') - sys.stderr.write('\n') - for a in tqdm(DocAlias.objects.all()): - a.docs.add(a.document) - -def reverse(apps, schema_editor): - DocAlias = apps.get_model('doc','DocAlias') - sys.stderr.write('\n') - for a in tqdm(DocAlias.objects.all()): - a.document = a.document - a.save() - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0022_document_primary_key_cleanup'), - ] - - operations = [ - migrations.AddField( - model_name='docalias', - name='docs', - field=models.ManyToManyField(related_name='docalias', to='doc.Document'), - ), - migrations.RunPython(forward, reverse), - migrations.RemoveField( - model_name='docalias', - name='document', - ), - ] diff --git a/ietf/doc/migrations/0024_iana_experts.py b/ietf/doc/migrations/0024_iana_experts.py deleted file mode 100644 index 0922b9c24..000000000 --- a/ietf/doc/migrations/0024_iana_experts.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.23 on 2019-08-07 12:07 - - -from django.db import migrations - -def forward(apps, schema_editor): - StateType = apps.get_model('doc','StateType') - State = apps.get_model('doc','State') - - StateType.objects.create(slug='draft-iana-experts',label='IANA Experts State') - State.objects.create(type_id='draft-iana-experts', - slug='need-experts', - name='Need IANA Expert(s)', - used=True, - desc='One or more registries need experts assigned', - order=0 - ) - State.objects.create(type_id='draft-iana-experts', - slug='reviews-assigned', - name='Reviews assigned', - used=True, - desc='One or more expert reviews have been assigned', - order=1 - ) - State.objects.create(type_id='draft-iana-experts', - slug='expert-issues', - name='Issues identified', - used=True, - desc='Some expert reviewers have identified issues', - order=2 - ) - State.objects.create(type_id='draft-iana-experts', - slug='reviewers-ok', - name='Expert Reviews OK', - used=True, - desc='All expert reviews have been completed with no blocking issues', - order=2 - ) - -def reverse(apps, schema_editor): - StateType = apps.get_model('doc','StateType') - State = apps.get_model('doc','State') - - State.objects.filter(type_id='draft-iana-experts', slug__in=('need-experts','reviews-assigned','reviews-complete')).delete() - StateType.objects.filter(slug='draft-iana-experts').delete() - - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0023_one_to_many_docalias'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/doc/migrations/0025_ianaexpertdocevent.py b/ietf/doc/migrations/0025_ianaexpertdocevent.py deleted file mode 100644 index 282d506d9..000000000 --- a/ietf/doc/migrations/0025_ianaexpertdocevent.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.23 on 2019-08-07 12:27 - - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0024_iana_experts'), - ] - - operations = [ - migrations.CreateModel( - name='IanaExpertDocEvent', - fields=[ - ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), - ], - bases=('doc.docevent',), - ), - ] diff --git a/ietf/doc/migrations/0026_add_draft_rfceditor_state.py b/ietf/doc/migrations/0026_add_draft_rfceditor_state.py deleted file mode 100644 index 0490f15ba..000000000 --- a/ietf/doc/migrations/0026_add_draft_rfceditor_state.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - -def forward(apps, schema_editor): - State = apps.get_model('doc','State') - State.objects.get_or_create(type_id='draft-rfceditor', slug='tooling-issue', name='TI', - desc='Tooling Issue; an update is needed to one or more of the tools in the publication pipeline before this document can be published') - -def reverse(apps, schema_editor): - State = apps.get_model('doc','State') - State.objects.filter(type_id='draft-rfceditor', slug='tooling-issue').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0025_ianaexpertdocevent'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/doc/migrations/0027_add_irsg_doc_positions.py b/ietf/doc/migrations/0027_add_irsg_doc_positions.py deleted file mode 100644 index e88ac9dda..000000000 --- a/ietf/doc/migrations/0027_add_irsg_doc_positions.py +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.22 on 2019-08-03 10:09 - - -from django.db import migrations - -# forward, reverse initially copied from migration 0004 -def forward(apps, schema_editor): - State = apps.get_model('doc','State') - State.objects.create(type_id='draft-stream-irtf', - slug='irsg_review', - name='IRSG Review', - desc='IRSG Review', - used=True, - ) - BallotPositionName = apps.get_model('name','BallotPositionName') - # desc, used, order, and blocking all have suitable defaults - BallotPositionName.objects.create(slug="moretime", - name="Need More Time", - ) - BallotPositionName.objects.create(slug="notready", - name="Not Ready", - ) - - # Create a new ballot type for IRSG ballot - # include positions for the ballot type - BallotType = apps.get_model('doc','BallotType') - bt = BallotType.objects.create(doc_type_id="draft", - slug="irsg-approve", - name="IRSG Approve", - question="Is this draft ready for publication in the IRTF stream?", - ) - bt.positions.set(['yes','noobj','recuse','notready','moretime']) - -def reverse(apps, schema_editor): - State = apps.get_model('doc','State') - State.objects.filter(type_id__in=('draft-stream-irtf',), slug='irsg_review').delete() - - Position = apps.get_model('name','BallotPositionName') - for pos in ("moretime", "notready"): - Position.objects.filter(slug=pos).delete() - - IRSGBallot = apps.get_model('doc','BallotType') - IRSGBallot.objects.filter(slug="irsg-approve").delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0026_add_draft_rfceditor_state'), - ('name', '0007_fix_m2m_slug_id_length'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - migrations.RenameField( - model_name='ballotpositiondocevent', - old_name='ad', - new_name='balloter', - ), - - ] diff --git a/ietf/doc/migrations/0028_irsgballotdocevent.py b/ietf/doc/migrations/0028_irsgballotdocevent.py deleted file mode 100644 index 92f4d52d7..000000000 --- a/ietf/doc/migrations/0028_irsgballotdocevent.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-10 10:37 - - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0027_add_irsg_doc_positions'), - ] - - operations = [ - migrations.CreateModel( - name='IRSGBallotDocEvent', - fields=[ - ('ballotdocevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.BallotDocEvent')), - ('duedate', models.DateTimeField(blank=True, null=True)), - ], - bases=('doc.ballotdocevent',), - ), - ] diff --git a/ietf/doc/migrations/0029_add_ipr_event_types.py b/ietf/doc/migrations/0029_add_ipr_event_types.py deleted file mode 100644 index 08073b16e..000000000 --- a/ietf/doc/migrations/0029_add_ipr_event_types.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-01-17 11:54 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0028_irsgballotdocevent'), - ] - - operations = [ - migrations.AlterField( - model_name='docevent', - name='type', - field=models.CharField(choices=[('new_revision', 'Added new revision'), ('new_submission', 'Uploaded new revision'), ('changed_document', 'Changed document metadata'), ('added_comment', 'Added comment'), ('added_message', 'Added message'), ('edited_authors', 'Edited the documents author list'), ('deleted', 'Deleted document'), ('changed_state', 'Changed state'), ('changed_stream', 'Changed document stream'), ('expired_document', 'Expired document'), ('extended_expiry', 'Extended expiry of document'), ('requested_resurrect', 'Requested resurrect'), ('completed_resurrect', 'Completed resurrect'), ('changed_consensus', 'Changed consensus'), ('published_rfc', 'Published RFC'), ('added_suggested_replaces', 'Added suggested replacement relationships'), ('reviewed_suggested_replaces', 'Reviewed suggested replacement relationships'), ('changed_group', 'Changed group'), ('changed_protocol_writeup', 'Changed protocol writeup'), ('changed_charter_milestone', 'Changed charter milestone'), ('initial_review', 'Set initial review time'), ('changed_review_announcement', 'Changed WG Review text'), ('changed_action_announcement', 'Changed WG Action text'), ('started_iesg_process', 'Started IESG process on document'), ('created_ballot', 'Created ballot'), ('closed_ballot', 'Closed ballot'), ('sent_ballot_announcement', 'Sent ballot announcement'), ('changed_ballot_position', 'Changed ballot position'), ('changed_ballot_approval_text', 'Changed ballot approval text'), ('changed_ballot_writeup_text', 'Changed ballot writeup text'), ('changed_rfc_editor_note_text', 'Changed RFC Editor Note text'), ('changed_last_call_text', 'Changed last call text'), ('requested_last_call', 'Requested last call'), ('sent_last_call', 'Sent last call'), ('scheduled_for_telechat', 'Scheduled for telechat'), ('iesg_approved', 'IESG approved document (no problem)'), ('iesg_disapproved', 'IESG disapproved document (do not publish)'), ('approved_in_minute', 'Approved in minute'), ('iana_review', 'IANA review comment'), ('rfc_in_iana_registry', 'RFC is in IANA registry'), ('rfc_editor_received_announcement', 'Announcement was received by RFC Editor'), ('requested_publication', 'Publication at RFC Editor requested'), ('sync_from_rfc_editor', 'Received updated information from RFC Editor'), ('requested_review', 'Requested review'), ('assigned_review_request', 'Assigned review request'), ('closed_review_request', 'Closed review request'), ('closed_review_assignment', 'Closed review assignment'), ('downref_approved', 'Downref approved'), ('posted_related_ipr', 'Posted related IPR'), ('removed_related_ipr', 'Removed related IPR')], max_length=50), - ), - ] diff --git a/ietf/doc/migrations/0030_fix_bytes_mailarch_url.py b/ietf/doc/migrations/0030_fix_bytes_mailarch_url.py deleted file mode 100644 index 3c3ad2aa6..000000000 --- a/ietf/doc/migrations/0030_fix_bytes_mailarch_url.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 14:27 - - -from __future__ import absolute_import, print_function, unicode_literals - -import re - -from django.conf import settings -from django.db import migrations - - -def forward(apps, schema_editor): - - Document = apps.get_model('doc', 'Document') - - print('') - for d in Document.objects.filter(external_url__contains="/b'"): - match = re.search("^(%s/arch/msg/[^/]+/)b'([^']+)'$" % settings.MAILING_LIST_ARCHIVE_URL, d.external_url) - if match: - d.external_url = "%s%s" % (match.group(1), match.group(2)) - d.save() - print('Fixed url #%s: %s' % (d.id, d.external_url)) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0029_add_ipr_event_types'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0031_set_state_for_charters_of_replaced_groups.py b/ietf/doc/migrations/0031_set_state_for_charters_of_replaced_groups.py deleted file mode 100644 index 1bf96f9a4..000000000 --- a/ietf/doc/migrations/0031_set_state_for_charters_of_replaced_groups.py +++ /dev/null @@ -1,42 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright The IETF Trust 2020, All Rights Reserved -# Generated by Django 1.11.28 on 2020-03-03 13:54 -from __future__ import unicode_literals - -from django.db import migrations - -def forward(apps, schema_editor): - - Person = apps.get_model('person', 'Person') - - Document = apps.get_model('doc','Document') - State = apps.get_model('doc','State') - BallotDocEvent = apps.get_model('doc','BallotDocEvent') - - replaced_state = State.objects.create(type_id='charter', slug='replaced', name='Replaced', used=True, desc="This charter's group was replaced.", order = 0) - by = Person.objects.get(name='(System)') - - for doc in Document.objects.filter(type_id='charter',states__type_id='charter',states__slug__in=['intrev','extrev'],group__state='replaced'): - doc.states.remove(*list(doc.states.filter(type_id='charter'))) - doc.states.add(replaced_state) - ballot = BallotDocEvent.objects.filter(doc=doc, type__in=('created_ballot', 'closed_ballot')).order_by('-time', '-id').first() - if ballot and ballot.type == 'created_ballot': - e = BallotDocEvent(type="closed_ballot", doc=doc, rev=doc.rev, by=by) - e.ballot_type = ballot.ballot_type - e.desc = 'Closed "%s" ballot' % e.ballot_type.name - e.save() - - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0030_fix_bytes_mailarch_url'), - ('person', '0009_auto_20190118_0725'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0032_auto_20200624_1332.py b/ietf/doc/migrations/0032_auto_20200624_1332.py deleted file mode 100644 index 1dd656a31..000000000 --- a/ietf/doc/migrations/0032_auto_20200624_1332.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.1.15 on 2020-06-24 13:32 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0031_set_state_for_charters_of_replaced_groups'), - ] - - operations = [ - migrations.AlterField( - model_name='ballotpositiondocevent', - name='send_email', - field=models.BooleanField(default=None, null=True), - ), - migrations.AlterField( - model_name='consensusdocevent', - name='consensus', - field=models.BooleanField(default=None, null=True), - ), - ] diff --git a/ietf/doc/migrations/0033_populate_auth48_urls.py b/ietf/doc/migrations/0033_populate_auth48_urls.py deleted file mode 100644 index d6092b630..000000000 --- a/ietf/doc/migrations/0033_populate_auth48_urls.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations -from django.db.models import OuterRef, Subquery - -from re import match - - -def forward(apps, schema_editor): - """Add DocumentURLs for docs in the Auth48 state - - Checks the latest StateDocEvent; if it is in the auth48 state and the - event desc has an AUTH48 link, creates an auth48 DocumentURL for that doc. - """ - Document = apps.get_model('doc', 'Document') - StateDocEvent = apps.get_model('doc', 'StateDocEvent') - DocumentURL = apps.get_model('doc', 'DocumentURL') - - # Regex - extracts auth48 URL as first match group - pattern = r'RFC Editor state changed to AUTH48.*.*' - - # To avoid 100k queries, set up a subquery to find the latest StateDocEvent for each doc... - latest_events = StateDocEvent.objects.filter(doc=OuterRef('pk')).order_by('-time', '-id') - # ... then annotate the doc list with that and select only those in the auth48 state... - auth48_docs = Document.objects.annotate( - current_state_slug=Subquery(latest_events.values('state__slug')[:1]) - ).filter(current_state_slug='auth48') - # ... and add an auth48 DocumentURL if one is found. - for doc in auth48_docs: - # Retrieve the full StateDocEvent. Results in a query per doc, but - # only for the few few in the auth48 state. - sde = StateDocEvent.objects.filter(doc=doc).order_by('-time', '-id').first() - urlmatch = match(pattern, sde.desc) # Auth48 URL is usually in the event desc - if urlmatch is not None: - DocumentURL.objects.create(doc=doc, tag_id='auth48', url=urlmatch[1]) - - # Validate the migration using a different approach to find auth48 docs. - # This is slower than above, but still avoids querying for every Document. - auth48_events = StateDocEvent.objects.filter(state__slug='auth48') - for a48_event in auth48_events: - doc = a48_event.doc - latest_sde = StateDocEvent.objects.filter(doc=doc).order_by('-time', '-id').first() - if latest_sde.state and latest_sde.state.slug == 'auth48' and match(pattern, latest_sde.desc) is not None: - # Currently in the auth48 state with a URL - assert doc.documenturl_set.filter(tag_id='auth48').count() == 1 - else: - # Either no longer in auth48 state or had no URL - assert doc.documenturl_set.filter(tag_id='auth48').count() == 0 - - -def reverse(apps, schema_editor): - """Remove any auth48 DocumentURLs - these did not exist before""" - DocumentURL = apps.get_model('doc', 'DocumentURL') - DocumentURL.objects.filter(tag_id='auth48').delete() - - -class Migration(migrations.Migration): - dependencies = [ - ('doc', '0032_auto_20200624_1332'), - ('name', '0013_add_auth48_docurltagname'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0034_extres.py b/ietf/doc/migrations/0034_extres.py deleted file mode 100644 index 2157d0e86..000000000 --- a/ietf/doc/migrations/0034_extres.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-04-15 10:20 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0014_extres'), - ('doc', '0033_populate_auth48_urls'), - ] - - operations = [ - migrations.CreateModel( - name='DocExtResource', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('display_name', models.CharField(blank=True, default='', max_length=255)), - ('value', models.CharField(max_length=2083)), - ('doc', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), - ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceName')), - ], - ), - ] diff --git a/ietf/doc/migrations/0035_populate_docextresources.py b/ietf/doc/migrations/0035_populate_docextresources.py deleted file mode 100644 index 04b396a96..000000000 --- a/ietf/doc/migrations/0035_populate_docextresources.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-03-19 13:06 -from __future__ import unicode_literals - -import re - -import debug # pyflakes:ignore - -from collections import OrderedDict, Counter -from io import StringIO - -from django.db import migrations - -from ietf.utils.validators import validate_external_resource_value -from django.core.exceptions import ValidationError - - -name_map = { - "Issue.*": "tracker", - ".*FAQ.*": "faq", - ".*Area Web Page": "webpage", - ".*Wiki": "wiki", - "Home Page": "webpage", - "Slack.*": "slack", - "Additional .* Web Page": "webpage", - "Additional .* Page": "webpage", - "Yang catalog entry.*": "yc_entry", - "Yang impact analysis.*": "yc_impact", - "GitHub": "github_repo", - "Github page": "github_repo", - "GitHub repo.*": "github_repo", - "Github repository.*": "github_repo", - "GitHub org.*": "github_org", - "GitHub User.*": "github_username", - "GitLab User": "gitlab_username", - "GitLab User Name": "gitlab_username", -} - -url_map = OrderedDict({ - "https?://github\\.com": "github_repo", - "https://git.sr.ht/": "repo", - "https://todo.sr.ht/": "tracker", - "https?://trac\\.ietf\\.org/.*/wiki": "wiki", - "ietf\\.org.*/trac/wiki": "wiki", - "trac.*wiki": "wiki", - "www\\.ietf\\.org/mailman" : None, - "www\\.ietf\\.org/mail-archive" : None, - "mailarchive\\.ietf\\.org" : None, - "ietf\\.org/logs": "jabber_log", - "ietf\\.org/jabber/logs": "jabber_log", - "xmpp:.*?join": "jabber_room", - "bell-labs\\.com": None, - "html\\.charters": None, - "datatracker\\.ietf\\.org": None, -}) - -def forward(apps, schema_editor): - DocExtResource = apps.get_model('doc', 'DocExtResource') - ExtResourceName = apps.get_model('name', 'ExtResourceName') - DocumentUrl = apps.get_model('doc', 'DocumentUrl') - - stats = Counter() - stats_file = StringIO() - - for doc_url in DocumentUrl.objects.all(): - doc_url.url = doc_url.url.strip() - match_found = False - for regext,slug in name_map.items(): - if re.fullmatch(regext, doc_url.desc): - match_found = True - stats['mapped'] += 1 - name = ExtResourceName.objects.get(slug=slug) - try: - validate_external_resource_value(name, doc_url.url) - DocExtResource.objects.create(doc=doc_url.doc, name_id=slug, value=doc_url.url, display_name=doc_url.desc) - except ValidationError as e: # pyflakes:ignore - print("Failed validation:", doc_url.url, e, file=stats_file) - stats['failed_validation'] +=1 - break - if not match_found: - for regext, slug in url_map.items(): - if re.search(regext, doc_url.url): - match_found = True - if slug: - stats['mapped'] +=1 - name = ExtResourceName.objects.get(slug=slug) - # Munge the URL if it's the first github repo match - # Remove "/tree/master" substring if it exists - # Remove trailing "/issues" substring if it exists - # Remove "/blob/master/.*" pattern if present - if regext == "https?://github\\.com": - doc_url.url = doc_url.url.replace("/tree/master","") - doc_url.url = re.sub('/issues$', '', doc_url.url) - doc_url.url = re.sub('/blob/master.*$', '', doc_url.url) - try: - validate_external_resource_value(name, doc_url.url) - DocExtResource.objects.create(doc=doc_url.doc, name=name, value=doc_url.url, display_name=doc_url.desc) - except ValidationError as e: # pyflakes:ignore - print("Failed validation:", doc_url.url, e, file=stats_file) - stats['failed_validation'] +=1 - else: - stats['ignored'] +=1 - break - if not match_found: - print("Not Mapped:", doc_url.desc, doc_url.tag.slug, doc_url.doc.name, doc_url.url, file=stats_file) - stats['not_mapped'] += 1 - print('') - print(stats_file.getvalue()) - print (stats) - -def reverse(apps, schema_editor): - DocExtResource = apps.get_model('doc', 'DocExtResource') - DocExtResource.objects.all().delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0034_extres'), - ('name', '0015_populate_extres'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/doc/migrations/0036_orgs_vs_repos.py b/ietf/doc/migrations/0036_orgs_vs_repos.py deleted file mode 100644 index 37a0db0d2..000000000 --- a/ietf/doc/migrations/0036_orgs_vs_repos.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved - -from urllib.parse import urlparse -from django.db import migrations - -def categorize(url): - # This will categorize a few urls pointing into files in a repo as a repo, but that's better than calling them an org - element_count = len(urlparse(url).path.strip('/').split('/')) - if element_count < 1: - print("Bad github resource:",url) - return 'github_org' if element_count == 1 else 'github_repo' - -def forward(apps, schema_editor): - DocExtResource = apps.get_model('doc','DocExtResource') - - for resource in DocExtResource.objects.filter(name__slug__in=('github_org','github_repo')): - category = categorize(resource.value) - if resource.name_id != category: - resource.name_id = category - resource.save() - -def reverse(apps, schema_editor): - # Intentionally don't try to return to former worse state - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0035_populate_docextresources'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0037_clean_up_missing_docaliases.py b/ietf/doc/migrations/0037_clean_up_missing_docaliases.py deleted file mode 100644 index 6ce350c3f..000000000 --- a/ietf/doc/migrations/0037_clean_up_missing_docaliases.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 2.2.16 on 2020-09-22 07:58 - -from django.db import migrations - - -def forward(apps, schema_editor): - Document = apps.get_model('doc', 'Document') - DocAlias = apps.get_model('doc', 'DocAlias') - - docs_without_alias = Document.objects.filter(docalias__isnull=True) - - bad_aliases = DocAlias.objects.filter(name__in=docs_without_alias.values_list('name')) - bad_aliases.delete() - - for doc in docs_without_alias: - DocAlias.objects.create(name=doc.name).docs.add(doc) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0036_orgs_vs_repos'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0038_auto_20201109_0429.py b/ietf/doc/migrations/0038_auto_20201109_0429.py deleted file mode 100644 index 1335032b2..000000000 --- a/ietf/doc/migrations/0038_auto_20201109_0429.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:29 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0037_clean_up_missing_docaliases'), - ] - - operations = [ - migrations.AddIndex( - model_name='docevent', - index=models.Index(fields=['-time', '-id'], name='doc_doceven_time_1a258f_idx'), - ), - ] diff --git a/ietf/doc/migrations/0039_auto_20201109_0439.py b/ietf/doc/migrations/0039_auto_20201109_0439.py deleted file mode 100644 index e6e336456..000000000 --- a/ietf/doc/migrations/0039_auto_20201109_0439.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0038_auto_20201109_0429'), - ] - - operations = [ - migrations.AddIndex( - model_name='dochistoryauthor', - index=models.Index(fields=['document', 'order'], name='doc_dochist_documen_7e2441_idx'), - ), - migrations.AddIndex( - model_name='documentauthor', - index=models.Index(fields=['document', 'order'], name='doc_documen_documen_7fabe2_idx'), - ), - ] diff --git a/ietf/doc/migrations/0040_add_changed_action_holders_docevent_type.py b/ietf/doc/migrations/0040_add_changed_action_holders_docevent_type.py deleted file mode 100644 index 3aa127871..000000000 --- a/ietf/doc/migrations/0040_add_changed_action_holders_docevent_type.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.2.17 on 2021-01-15 12:50 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0040_lengthen_used_roles_fields'), # only needed for schema vs data ordering - ('doc', '0039_auto_20201109_0439'), - ] - - operations = [ - migrations.AlterField( - model_name='docevent', - name='type', - field=models.CharField(choices=[('new_revision', 'Added new revision'), ('new_submission', 'Uploaded new revision'), ('changed_document', 'Changed document metadata'), ('added_comment', 'Added comment'), ('added_message', 'Added message'), ('edited_authors', 'Edited the documents author list'), ('deleted', 'Deleted document'), ('changed_state', 'Changed state'), ('changed_stream', 'Changed document stream'), ('expired_document', 'Expired document'), ('extended_expiry', 'Extended expiry of document'), ('requested_resurrect', 'Requested resurrect'), ('completed_resurrect', 'Completed resurrect'), ('changed_consensus', 'Changed consensus'), ('published_rfc', 'Published RFC'), ('added_suggested_replaces', 'Added suggested replacement relationships'), ('reviewed_suggested_replaces', 'Reviewed suggested replacement relationships'), ('changed_action_holders', 'Changed action holders for document'), ('changed_group', 'Changed group'), ('changed_protocol_writeup', 'Changed protocol writeup'), ('changed_charter_milestone', 'Changed charter milestone'), ('initial_review', 'Set initial review time'), ('changed_review_announcement', 'Changed WG Review text'), ('changed_action_announcement', 'Changed WG Action text'), ('started_iesg_process', 'Started IESG process on document'), ('created_ballot', 'Created ballot'), ('closed_ballot', 'Closed ballot'), ('sent_ballot_announcement', 'Sent ballot announcement'), ('changed_ballot_position', 'Changed ballot position'), ('changed_ballot_approval_text', 'Changed ballot approval text'), ('changed_ballot_writeup_text', 'Changed ballot writeup text'), ('changed_rfc_editor_note_text', 'Changed RFC Editor Note text'), ('changed_last_call_text', 'Changed last call text'), ('requested_last_call', 'Requested last call'), ('sent_last_call', 'Sent last call'), ('scheduled_for_telechat', 'Scheduled for telechat'), ('iesg_approved', 'IESG approved document (no problem)'), ('iesg_disapproved', 'IESG disapproved document (do not publish)'), ('approved_in_minute', 'Approved in minute'), ('iana_review', 'IANA review comment'), ('rfc_in_iana_registry', 'RFC is in IANA registry'), ('rfc_editor_received_announcement', 'Announcement was received by RFC Editor'), ('requested_publication', 'Publication at RFC Editor requested'), ('sync_from_rfc_editor', 'Received updated information from RFC Editor'), ('requested_review', 'Requested review'), ('assigned_review_request', 'Assigned review request'), ('closed_review_request', 'Closed review request'), ('closed_review_assignment', 'Closed review assignment'), ('downref_approved', 'Downref approved'), ('posted_related_ipr', 'Posted related IPR'), ('removed_related_ipr', 'Removed related IPR')], max_length=50), - ), - ] diff --git a/ietf/doc/migrations/0041_add_documentactionholder.py b/ietf/doc/migrations/0041_add_documentactionholder.py deleted file mode 100644 index 3832a5603..000000000 --- a/ietf/doc/migrations/0041_add_documentactionholder.py +++ /dev/null @@ -1,35 +0,0 @@ -# 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'), - ), - ] diff --git a/ietf/doc/migrations/0042_bofreq_states.py b/ietf/doc/migrations/0042_bofreq_states.py deleted file mode 100644 index 95119f814..000000000 --- a/ietf/doc/migrations/0042_bofreq_states.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.23 on 2021-05-21 13:29 - -from django.db import migrations - -def forward(apps, schema_editor): - StateType = apps.get_model('doc', 'StateType') - State = apps.get_model('doc', 'State') - - StateType.objects.create(slug='bofreq', label='BOF Request State') - proposed = State.objects.create(type_id='bofreq', slug='proposed', name='Proposed', used=True, desc='The BOF request is proposed', order=0) - approved = State.objects.create(type_id='bofreq', slug='approved', name='Approved', used=True, desc='The BOF request is approved', order=1) - declined = State.objects.create(type_id='bofreq', slug='declined', name='Declined', used=True, desc='The BOF request is declined', order=2) - replaced = State.objects.create(type_id='bofreq', slug='replaced', name='Replaced', used=True, desc='The BOF request is proposed', order=3) - abandoned = State.objects.create(type_id='bofreq', slug='abandoned', name='Abandoned', used=True, desc='The BOF request is abandoned', order=4) - - proposed.next_states.set([approved,declined,replaced,abandoned]) - -def reverse(apps, schema_editor): - StateType = apps.get_model('doc', 'StateType') - State = apps.get_model('doc', 'State') - State.objects.filter(type_id='bofreq').delete() - StateType.objects.filter(slug='bofreq').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0041_add_documentactionholder'), - ('name', '0027_add_bofrequest'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/doc/migrations/0043_bofreq_docevents.py b/ietf/doc/migrations/0043_bofreq_docevents.py deleted file mode 100644 index 7a300426b..000000000 --- a/ietf/doc/migrations/0043_bofreq_docevents.py +++ /dev/null @@ -1,36 +0,0 @@ -# Generated by Django 2.2.24 on 2021-07-06 13:34 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0019_auto_20210604_1443'), - ('doc', '0042_bofreq_states'), - ] - - operations = [ - migrations.AlterField( - model_name='docevent', - name='type', - field=models.CharField(choices=[('new_revision', 'Added new revision'), ('new_submission', 'Uploaded new revision'), ('changed_document', 'Changed document metadata'), ('added_comment', 'Added comment'), ('added_message', 'Added message'), ('edited_authors', 'Edited the documents author list'), ('deleted', 'Deleted document'), ('changed_state', 'Changed state'), ('changed_stream', 'Changed document stream'), ('expired_document', 'Expired document'), ('extended_expiry', 'Extended expiry of document'), ('requested_resurrect', 'Requested resurrect'), ('completed_resurrect', 'Completed resurrect'), ('changed_consensus', 'Changed consensus'), ('published_rfc', 'Published RFC'), ('added_suggested_replaces', 'Added suggested replacement relationships'), ('reviewed_suggested_replaces', 'Reviewed suggested replacement relationships'), ('changed_action_holders', 'Changed action holders for document'), ('changed_group', 'Changed group'), ('changed_protocol_writeup', 'Changed protocol writeup'), ('changed_charter_milestone', 'Changed charter milestone'), ('initial_review', 'Set initial review time'), ('changed_review_announcement', 'Changed WG Review text'), ('changed_action_announcement', 'Changed WG Action text'), ('started_iesg_process', 'Started IESG process on document'), ('created_ballot', 'Created ballot'), ('closed_ballot', 'Closed ballot'), ('sent_ballot_announcement', 'Sent ballot announcement'), ('changed_ballot_position', 'Changed ballot position'), ('changed_ballot_approval_text', 'Changed ballot approval text'), ('changed_ballot_writeup_text', 'Changed ballot writeup text'), ('changed_rfc_editor_note_text', 'Changed RFC Editor Note text'), ('changed_last_call_text', 'Changed last call text'), ('requested_last_call', 'Requested last call'), ('sent_last_call', 'Sent last call'), ('scheduled_for_telechat', 'Scheduled for telechat'), ('iesg_approved', 'IESG approved document (no problem)'), ('iesg_disapproved', 'IESG disapproved document (do not publish)'), ('approved_in_minute', 'Approved in minute'), ('iana_review', 'IANA review comment'), ('rfc_in_iana_registry', 'RFC is in IANA registry'), ('rfc_editor_received_announcement', 'Announcement was received by RFC Editor'), ('requested_publication', 'Publication at RFC Editor requested'), ('sync_from_rfc_editor', 'Received updated information from RFC Editor'), ('requested_review', 'Requested review'), ('assigned_review_request', 'Assigned review request'), ('closed_review_request', 'Closed review request'), ('closed_review_assignment', 'Closed review assignment'), ('downref_approved', 'Downref approved'), ('posted_related_ipr', 'Posted related IPR'), ('removed_related_ipr', 'Removed related IPR'), ('changed_editors', 'Changed BOF Request editors')], max_length=50), - ), - migrations.CreateModel( - name='BofreqResponsibleDocEvent', - fields=[ - ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), - ('responsible', models.ManyToManyField(blank=True, to='person.Person')), - ], - bases=('doc.docevent',), - ), - migrations.CreateModel( - name='BofreqEditorDocEvent', - fields=[ - ('docevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='doc.DocEvent')), - ('editors', models.ManyToManyField(blank=True, to='person.Person')), - ], - bases=('doc.docevent',), - ), - ] diff --git a/ietf/doc/migrations/0044_procmaterials_states.py b/ietf/doc/migrations/0044_procmaterials_states.py deleted file mode 100644 index 289293588..000000000 --- a/ietf/doc/migrations/0044_procmaterials_states.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.23 on 2021-05-21 13:29 - -from django.db import migrations - -def forward(apps, schema_editor): - StateType = apps.get_model('doc', 'StateType') - State = apps.get_model('doc', 'State') - - StateType.objects.create(slug='procmaterials', label='Proceedings Materials State') - active = State.objects.create(type_id='procmaterials', slug='active', name='Active', used=True, desc='The material is active', order=0) - removed = State.objects.create(type_id='procmaterials', slug='removed', name='Removed', used=True, desc='The material is removed', order=1) - - active.next_states.set([removed]) - removed.next_states.set([active]) - -def reverse(apps, schema_editor): - StateType = apps.get_model('doc', 'StateType') - State = apps.get_model('doc', 'State') - State.objects.filter(type_id='procmaterials').delete() - StateType.objects.filter(slug='procmaterials').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0043_bofreq_docevents'), - ('name', '0031_add_procmaterials'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/doc/migrations/0045_docstates_chatlogs_polls.py b/ietf/doc/migrations/0045_docstates_chatlogs_polls.py deleted file mode 100644 index 044cc60de..000000000 --- a/ietf/doc/migrations/0045_docstates_chatlogs_polls.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved -from django.db import migrations - -def forward(apps, schema_editor): - StateType = apps.get_model("doc", "StateType") - State = apps.get_model("doc", "State") - for slug in ("chatlog", "polls"): - StateType.objects.create(slug=slug, label="State") - for state_slug in ("active", "deleted"): - State.objects.create( - type_id = slug, - slug = state_slug, - name = state_slug.capitalize(), - used = True, - desc = "", - order = 0, - ) - -def reverse(apps, schema_editor): - StateType = apps.get_model("doc", "StateType") - State = apps.get_model("doc", "State") - State.objects.filter(type_id__in=("chatlog", "polls")).delete() - StateType.objects.filter(slug__in=("chatlog", "polls")).delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0044_procmaterials_states'), - ('name', '0045_polls_and_chatlogs'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0046_use_timezone_now_for_doc_models.py b/ietf/doc/migrations/0046_use_timezone_now_for_doc_models.py deleted file mode 100644 index 3749fd973..000000000 --- a/ietf/doc/migrations/0046_use_timezone_now_for_doc_models.py +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-12 11:24 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0045_docstates_chatlogs_polls'), - ] - - operations = [ - migrations.AlterField( - model_name='deletedevent', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='docevent', - name='time', - field=models.DateTimeField(db_index=True, default=django.utils.timezone.now, help_text='When the event happened'), - ), - migrations.AlterField( - model_name='dochistory', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='document', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='documentactionholder', - name='time_added', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - ] diff --git a/ietf/doc/migrations/0047_tzaware_deletedevents.py b/ietf/doc/migrations/0047_tzaware_deletedevents.py deleted file mode 100644 index bf258de6e..000000000 --- a/ietf/doc/migrations/0047_tzaware_deletedevents.py +++ /dev/null @@ -1,61 +0,0 @@ -# Generated by Django 2.2.28 on 2022-08-31 20:26 - -import datetime -import json - -from zoneinfo import ZoneInfo - -from django.db import migrations - - -TZ_BEFORE = ZoneInfo('PST8PDT') - - -def forward(apps, schema_editor): - DeletedEvent = apps.get_model('doc', 'DeletedEvent') - for deleted_event in DeletedEvent.objects.all(): - fields = json.loads(deleted_event.json) - replacements = {} - for k, v in fields.items(): - if isinstance(v, str): - try: - dt = datetime.datetime.strptime(v, '%Y-%m-%d %H:%M:%S') - except: - pass - else: - replacements[k] = dt.replace(tzinfo=TZ_BEFORE).astimezone(datetime.timezone.utc).isoformat() - if len(replacements) > 0: - fields.update(replacements) - deleted_event.json = json.dumps(fields) - deleted_event.save() - - -def reverse(apps, schema_editor): - DeletedEvent = apps.get_model('doc', 'DeletedEvent') - for deleted_event in DeletedEvent.objects.all(): - fields = json.loads(deleted_event.json) - replacements = {} - for k, v in fields.items(): - if isinstance(v, str) and 'T' in v: - try: - dt = datetime.datetime.fromisoformat(v) - except: - pass - else: - replacements[k] = dt.astimezone(TZ_BEFORE).replace(tzinfo=None).strftime('%Y-%m-%d %H:%M:%S') - if len(replacements) > 0: - fields.update(replacements) - deleted_event.json = json.dumps(fields) - deleted_event.save() - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0046_use_timezone_now_for_doc_models'), - ('utils', '0003_pause_to_change_use_tz'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0048_allow_longer_notify.py b/ietf/doc/migrations/0048_allow_longer_notify.py deleted file mode 100644 index f2c6959d8..000000000 --- a/ietf/doc/migrations/0048_allow_longer_notify.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.2.28 on 2022-12-05 17:53 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0047_tzaware_deletedevents'), - ] - - operations = [ - migrations.AlterField( - model_name='dochistory', - name='notify', - field=models.TextField(blank=True, max_length=1023), - ), - migrations.AlterField( - model_name='document', - name='notify', - field=models.TextField(blank=True, max_length=1023), - ), - ] diff --git a/ietf/doc/migrations/0049_add_rsab_doc_positions.py b/ietf/doc/migrations/0049_add_rsab_doc_positions.py deleted file mode 100644 index fd02a6bfb..000000000 --- a/ietf/doc/migrations/0049_add_rsab_doc_positions.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved -# -*- coding: utf-8 -*- - -from django.db import migrations - - -def forward(apps, schema_editor): - State = apps.get_model("doc", "State") - State.objects.create( - type_id="draft-stream-editorial", - slug="rsab_review", - name="RSAB Review", - desc="RSAB Review", - used=True, - ) - BallotPositionName = apps.get_model("name", "BallotPositionName") - BallotPositionName.objects.create(slug="concern", name="Concern", blocking=True) - - BallotType = apps.get_model("doc", "BallotType") - bt = BallotType.objects.create( - doc_type_id="draft", - slug="rsab-approve", - name="RSAB Approve", - question="Is this draft ready for publication in the Editorial stream?", - ) - bt.positions.set( - ["yes", "concern", "recuse"] - ) # See RFC9280 section 3.2.2 list item 9. - - -def reverse(apps, schema_editor): - State = apps.get_model("doc", "State") - State.objects.filter(type_id="draft-stream-editorial", slug="rsab_review").delete() - - Position = apps.get_model("name", "BallotPositionName") - Position.objects.filter(slug="concern").delete() - - BallotType = apps.get_model("doc", "BallotType") - BallotType.objects.filter(slug="irsg-approve").delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ("doc", "0048_allow_longer_notify"), - ("name", "0045_polls_and_chatlogs"), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/doc/migrations/0050_editorial_stream_states.py b/ietf/doc/migrations/0050_editorial_stream_states.py deleted file mode 100644 index 44f3216c8..000000000 --- a/ietf/doc/migrations/0050_editorial_stream_states.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved -from django.db import migrations - - -def forward(apps, schema_editor): - State = apps.get_model("doc", "State") - StateType = apps.get_model("doc", "StateType") - StateType.objects.create( - slug="draft-stream-editorial", label="Editorial stream state" - ) - for slug, name, order in ( - ("repl", "Replaced editorial stream document", 0), - ("active", "Active editorial stream document", 2), - ("rsabpoll", "Editorial stream document under RSAB review", 3), - ("pub", "Published RFC", 4), - ("dead", "Dead editorial stream document", 5), - ): - State.objects.create( - type_id="draft-stream-editorial", - slug=slug, - name=name, - order=order, - used=True, - ) - State.objects.filter(type_id="draft-stream-editorial", slug="rsab_review").delete() - - - -def reverse(apps, schema_editor): - State = apps.get_model("doc", "State") - StateType = apps.get_model("doc", "StateType") - State.objects.filter(type_id="draft-stream-editorial").delete() - StateType.objects.filter(slug="draft-stream-editorial").delete() - # Intentionally not trying to return broken rsab_review State object - - -class Migration(migrations.Migration): - - dependencies = [ - ("doc", "0049_add_rsab_doc_positions"), - ] - - operations = [migrations.RunPython(forward, reverse)] diff --git a/ietf/doc/models.py b/ietf/doc/models.py index 5d638c742..ee56c0dc3 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -6,6 +6,8 @@ import datetime import logging import io import os + +import django.db import rfc2html from pathlib import Path @@ -56,16 +58,22 @@ class StateType(models.Model): @checks.register('db-consistency') def check_statetype_slugs(app_configs, **kwargs): errors = [] - state_type_slugs = [ t.slug for t in StateType.objects.all() ] - for type in DocTypeName.objects.all(): - if not type.slug in state_type_slugs: - errors.append(checks.Error( - "The document type '%s (%s)' does not have a corresponding entry in the doc.StateType table" % (type.name, type.slug), - hint="You should add a doc.StateType entry with a slug '%s' to match the DocTypeName slug."%(type.slug), - obj=type, - id='datatracker.doc.E0015', - )) - return errors + try: + state_type_slugs = [ t.slug for t in StateType.objects.all() ] + except django.db.ProgrammingError: + # When running initial migrations on an empty DB, attempting to retrieve StateType will raise a + # ProgrammingError. Until Django 3, there is no option to skip the checks. + return [] + else: + for type in DocTypeName.objects.all(): + if not type.slug in state_type_slugs: + errors.append(checks.Error( + "The document type '%s (%s)' does not have a corresponding entry in the doc.StateType table" % (type.name, type.slug), + hint="You should add a doc.StateType entry with a slug '%s' to match the DocTypeName slug."%(type.slug), + obj=type, + id='datatracker.doc.E0015', + )) + return errors class State(models.Model): type = ForeignKey(StateType) diff --git a/ietf/doc/templatetags/active_groups_menu.py b/ietf/doc/templatetags/active_groups_menu.py index dd97c8e45..af8f268eb 100644 --- a/ietf/doc/templatetags/active_groups_menu.py +++ b/ietf/doc/templatetags/active_groups_menu.py @@ -8,20 +8,16 @@ from ietf.name.models import GroupTypeName register = template.Library() -parents = GroupTypeName.objects.filter( - slug__in=["ag", "area", "rag", "team", "dir", "program"] -) - -others = [] -for group in Group.objects.filter(acronym__in=("rsoc",), state_id="active"): - group.menu_url = reverse("ietf.group.views.group_home", kwargs=dict(acronym=group.acronym)) # type: ignore - # could use group.about_url() instead - others.append(group) - @register.simple_tag def active_groups_menu(flavor): - global parents, others + parents = GroupTypeName.objects.filter(slug__in=["ag", "area", "rag", "team", "dir", "program"]) + others = [] + for group in Group.objects.filter(acronym__in=("rsoc",), state_id="active"): + group.menu_url = reverse("ietf.group.views.group_home", kwargs=dict(acronym=group.acronym)) # type: ignore + # could use group.about_url() instead + others.append(group) + for p in parents: p.menu_url = "/%s/" % p.slug return render_to_string( diff --git a/ietf/group/migrations/0001_initial.py b/ietf/group/migrations/0001_initial.py index 740d5315b..57a6e6e15 100644 --- a/ietf/group/migrations/0001_initial.py +++ b/ietf/group/migrations/0001_initial.py @@ -1,12 +1,13 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 +# Generated by Django 2.2.28 on 2023-03-20 19:22 - -import datetime from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone +import ietf.name.models +import ietf.utils.db import ietf.utils.models +import ietf.utils.validators +import jsonfield.fields class Migration(migrations.Migration): @@ -24,13 +25,16 @@ class Migration(migrations.Migration): name='Group', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), ('name', models.CharField(max_length=80)), ('description', models.TextField(blank=True)), ('list_email', models.CharField(blank=True, max_length=64)), ('list_subscribe', models.CharField(blank=True, max_length=255)), ('list_archive', models.CharField(blank=True, max_length=255)), ('comments', models.TextField(blank=True)), + ('meeting_seen_as_area', models.BooleanField(default=False, help_text='For meeting scheduling, should be considered an area meeting, even if the type is WG')), + ('used_roles', jsonfield.fields.JSONField(blank=True, default=[], help_text="Leave an empty list to get the group_type's default used roles", max_length=256)), + ('uses_milestone_dates', models.BooleanField(default=True)), ('acronym', models.SlugField(max_length=40, unique=True)), ('charter', ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chartered_group', to='doc.Document')), ('parent', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='group.Group')), @@ -47,9 +51,11 @@ class Migration(migrations.Migration): name='GroupEvent', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now, help_text='When the event happened')), + ('time', models.DateTimeField(default=django.utils.timezone.now, help_text='When the event happened')), ('type', models.CharField(choices=[('changed_state', 'Changed state'), ('added_comment', 'Added comment'), ('info_changed', 'Changed metadata'), ('requested_close', 'Requested closing group'), ('changed_milestone', 'Changed milestone'), ('sent_notification', 'Sent notification'), ('status_update', 'Status update')], max_length=50)), ('desc', models.TextField()), + ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), ], options={ 'ordering': ['-time', 'id'], @@ -59,13 +65,16 @@ class Migration(migrations.Migration): name='GroupHistory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), ('name', models.CharField(max_length=80)), ('description', models.TextField(blank=True)), ('list_email', models.CharField(blank=True, max_length=64)), ('list_subscribe', models.CharField(blank=True, max_length=255)), ('list_archive', models.CharField(blank=True, max_length=255)), ('comments', models.TextField(blank=True)), + ('meeting_seen_as_area', models.BooleanField(default=False, help_text='For meeting scheduling, should be considered an area meeting, even if the type is WG')), + ('used_roles', jsonfield.fields.JSONField(blank=True, default=[], help_text="Leave an empty list to get the group_type's default used roles", max_length=256)), + ('uses_milestone_dates', models.BooleanField(default=True)), ('acronym', models.CharField(max_length=40)), ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history_set', to='group.Group')), ('parent', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='group.Group')), @@ -83,7 +92,8 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('desc', models.CharField(max_length=500, verbose_name='Description')), - ('due', models.DateField()), + ('due', models.DateField(blank=True, null=True)), + ('order', models.IntegerField(blank=True, null=True)), ('resolved', models.CharField(blank=True, help_text='Explanation of why milestone is resolved (usually "Done"), or empty if still due.', max_length=50)), ('time', models.DateTimeField(auto_now=True)), ('docs', models.ManyToManyField(blank=True, to='doc.Document')), @@ -91,58 +101,16 @@ class Migration(migrations.Migration): ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.GroupMilestoneStateName')), ], options={ - 'ordering': ['due', 'id'], + 'ordering': ['order', 'due', 'id'], 'abstract': False, }, ), migrations.CreateModel( - name='GroupMilestoneHistory', + name='ChangeStateGroupEvent', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('desc', models.CharField(max_length=500, verbose_name='Description')), - ('due', models.DateField()), - ('resolved', models.CharField(blank=True, help_text='Explanation of why milestone is resolved (usually "Done"), or empty if still due.', max_length=50)), - ('time', models.DateTimeField()), - ('docs', models.ManyToManyField(blank=True, to='doc.Document')), - ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ('milestone', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history_set', to='group.GroupMilestone')), - ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.GroupMilestoneStateName')), + ('groupevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='group.GroupEvent')), ], - options={ - 'ordering': ['due', 'id'], - 'abstract': False, - }, - ), - migrations.CreateModel( - name='GroupStateTransitions', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ('next_states', models.ManyToManyField(related_name='previous_groupstatetransitions_states', to='doc.State')), - ('state', ietf.utils.models.ForeignKey(help_text='State for which the next states should be overridden', on_delete=django.db.models.deletion.CASCADE, to='doc.State')), - ], - ), - migrations.CreateModel( - name='GroupURL', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255)), - ('url', models.URLField()), - ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ], - ), - migrations.CreateModel( - name='Role', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('email', ietf.utils.models.ForeignKey(help_text='Email address used by person for this role.', on_delete=django.db.models.deletion.CASCADE, to='person.Email')), - ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.RoleName')), - ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ], - options={ - 'ordering': ['name_id'], - }, + bases=('group.groupevent',), ), migrations.CreateModel( name='RoleHistory', @@ -158,12 +126,101 @@ class Migration(migrations.Migration): }, ), migrations.CreateModel( - name='ChangeStateGroupEvent', + name='Role', fields=[ - ('groupevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='group.GroupEvent')), - ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.GroupStateName')), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('email', ietf.utils.models.ForeignKey(help_text='Email address used by person for this role.', on_delete=django.db.models.deletion.CASCADE, to='person.Email')), + ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.RoleName')), + ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + options={ + 'ordering': ['name_id'], + }, + ), + migrations.CreateModel( + name='GroupURL', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('url', models.URLField()), + ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ], + ), + migrations.CreateModel( + name='GroupStateTransitions', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('next_states', models.ManyToManyField(related_name='previous_groupstatetransitions_states', to='doc.State')), + ('state', ietf.utils.models.ForeignKey(help_text='State for which the next states should be overridden', on_delete=django.db.models.deletion.CASCADE, to='doc.State')), + ], + ), + migrations.CreateModel( + name='GroupMilestoneHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('desc', models.CharField(max_length=500, verbose_name='Description')), + ('due', models.DateField(blank=True, null=True)), + ('order', models.IntegerField(blank=True, null=True)), + ('resolved', models.CharField(blank=True, help_text='Explanation of why milestone is resolved (usually "Done"), or empty if still due.', max_length=50)), + ('time', models.DateTimeField()), + ('docs', models.ManyToManyField(blank=True, to='doc.Document')), + ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('milestone', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history_set', to='group.GroupMilestone')), + ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.GroupMilestoneStateName')), + ], + options={ + 'ordering': ['order', 'due', 'id'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='GroupFeatures', + fields=[ + ('type', ietf.utils.models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='features', serialize=False, to='name.GroupTypeName')), + ('need_parent', models.BooleanField(default=False, help_text='Does this group type require a parent group?', verbose_name='Need Parent')), + ('default_parent', models.CharField(blank=True, default='', help_text='Default parent group acronym for this group type', max_length=40, verbose_name='Default Parent')), + ('has_milestones', models.BooleanField(default=False, verbose_name='Milestones')), + ('has_chartering_process', models.BooleanField(default=False, verbose_name='Chartering')), + ('has_documents', models.BooleanField(default=False, verbose_name='Documents')), + ('has_session_materials', models.BooleanField(default=False, verbose_name='Sess Matrl.')), + ('has_nonsession_materials', models.BooleanField(default=False, verbose_name='Other Matrl.')), + ('has_meetings', models.BooleanField(default=False, verbose_name='Meetings')), + ('has_reviews', models.BooleanField(default=False, verbose_name='Reviews')), + ('has_default_chat', models.BooleanField(default=False, verbose_name='Chat')), + ('acts_like_wg', models.BooleanField(default=False, verbose_name='WG-Like')), + ('create_wiki', models.BooleanField(default=False, verbose_name='Wiki')), + ('custom_group_roles', models.BooleanField(default=False, verbose_name='Cust. Roles')), + ('customize_workflow', models.BooleanField(default=False, verbose_name='Workflow')), + ('is_schedulable', models.BooleanField(default=False, verbose_name='Schedulable')), + ('show_on_agenda', models.BooleanField(default=False, verbose_name='On Agenda')), + ('req_subm_approval', models.BooleanField(default=False, verbose_name='Subm. Approval')), + ('about_page', models.CharField(default='ietf.group.views.group_about', max_length=64)), + ('default_tab', models.CharField(default='ietf.group.views.group_about', max_length=64)), + ('material_types', ietf.utils.db.IETFJSONField(default=['slides'], max_length=64)), + ('default_used_roles', ietf.utils.db.IETFJSONField(default=[], max_length=256)), + ('admin_roles', ietf.utils.db.IETFJSONField(default=['chair'], max_length=64)), + ('docman_roles', ietf.utils.db.IETFJSONField(default=['ad', 'chair', 'delegate', 'secr'], max_length=128)), + ('groupman_roles', ietf.utils.db.IETFJSONField(default=['ad', 'chair'], max_length=128)), + ('groupman_authroles', ietf.utils.db.IETFJSONField(default=['Secretariat'], max_length=128)), + ('matman_roles', ietf.utils.db.IETFJSONField(default=['ad', 'chair', 'delegate', 'secr'], max_length=128)), + ('role_order', ietf.utils.db.IETFJSONField(default=['chair', 'secr', 'member'], help_text='The order in which roles are shown, for instance on photo pages. Enter valid JSON.', max_length=128)), + ('session_purposes', ietf.utils.db.IETFJSONField(default=[], help_text='Allowed session purposes for this group type', max_length=256, validators=[ietf.utils.validators.JSONForeignKeyListValidator(ietf.name.models.SessionPurposeName)])), + ('agenda_filter_type', models.ForeignKey(default='none', on_delete=django.db.models.deletion.PROTECT, to='name.AgendaFilterTypeName')), + ('agenda_type', models.ForeignKey(default='ietf', null=True, on_delete=django.db.models.deletion.CASCADE, to='name.AgendaTypeName')), + ('parent_types', models.ManyToManyField(blank=True, help_text='Group types allowed as parent of this group type', related_name='child_features', to='name.GroupTypeName')), + ], + ), + migrations.CreateModel( + name='GroupExtResource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('display_name', models.CharField(blank=True, default='', max_length=255)), + ('value', models.CharField(max_length=2083)), + ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceName')), ], - bases=('group.groupevent',), ), migrations.CreateModel( name='MilestoneGroupEvent', @@ -173,14 +230,13 @@ class Migration(migrations.Migration): ], bases=('group.groupevent',), ), - migrations.AddField( + migrations.AddIndex( model_name='groupevent', - name='by', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + index=models.Index(fields=['-time', '-id'], name='group_group_time_ee7c7c_idx'), ), migrations.AddField( - model_name='groupevent', - name='group', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group'), + model_name='changestategroupevent', + name='state', + field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.GroupStateName'), ), ] diff --git a/ietf/group/migrations/0002_groupfeatures_historicalgroupfeatures.py b/ietf/group/migrations/0002_groupfeatures_historicalgroupfeatures.py deleted file mode 100644 index 7828722cc..000000000 --- a/ietf/group/migrations/0002_groupfeatures_historicalgroupfeatures.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.13 on 2018-07-10 15:58 - - -import django.core.validators -import django.db.models.deletion - -from django.conf import settings -from django.db import migrations, models - - -import debug # pyflakes:ignore - -import ietf.utils.models - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('name', '0002_agendatypename'), - ('group', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='GroupFeatures', - fields=[ - ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='name.GroupTypeName', related_name='features')), - ('has_milestones', models.BooleanField(default=False, verbose_name='Milestones')), - ('has_chartering_process', models.BooleanField(default=False, verbose_name='Chartering')), - ('has_documents', models.BooleanField(default=False, verbose_name='Documents')), - ('has_dependencies', models.BooleanField(default=False, verbose_name='Dependencies')), - ('has_nonsession_materials', models.BooleanField(default=False, verbose_name='Materials')), - ('has_meetings', models.BooleanField(default=False, verbose_name='Meetings')), - ('has_reviews', models.BooleanField(default=False, verbose_name='Reviews')), - ('has_default_jabber', models.BooleanField(default=False, verbose_name='Jabber')), - ('customize_workflow', models.BooleanField(default=False, verbose_name='Workflow')), - ('about_page', models.CharField(default='ietf.group.views.group_about', max_length=64)), - ('default_tab', models.CharField(default='ietf.group.views.group_about', max_length=64)), - ('material_types', models.CharField(default='slides', max_length=64, validators=[django.core.validators.RegexValidator(code=b'invalid', message=b'Enter a comma-separated list of material types', regex=b'[a-z0-9_-]+(,[a-z0-9_-]+)*')])), - # type: ignore - ('admin_roles', models.CharField(default='chair', max_length=64, validators=[django.core.validators.RegexValidator(code=b'invalid', message=b'Enter a comma-separated list of role slugs', regex=b'[a-z0-9_-]+(,[a-z0-9_-]+)*')])), - ('agenda_type', models.ForeignKey(default='ietf', null=True, on_delete=django.db.models.deletion.CASCADE, to='name.AgendaTypeName')), - ], - ), - migrations.CreateModel( - name='HistoricalGroupFeatures', - fields=[ - ('has_milestones', models.BooleanField(default=False, verbose_name='Milestones')), - ('has_chartering_process', models.BooleanField(default=False, verbose_name='Chartering')), - ('has_documents', models.BooleanField(default=False, verbose_name='Documents')), - ('has_dependencies', models.BooleanField(default=False, verbose_name='Dependencies')), - ('has_nonsession_materials', models.BooleanField(default=False, verbose_name='Materials')), - ('has_meetings', models.BooleanField(default=False, verbose_name='Meetings')), - ('has_reviews', models.BooleanField(default=False, verbose_name='Reviews')), - ('has_default_jabber', models.BooleanField(default=False, verbose_name='Jabber')), - ('customize_workflow', models.BooleanField(default=False, verbose_name='Workflow')), - ('about_page', models.CharField(default='ietf.group.views.group_about', max_length=64)), - ('default_tab', models.CharField(default='ietf.group.views.group_about', max_length=64)), - ('material_types', models.CharField(default='slides', max_length=64, validators=[django.core.validators.RegexValidator(code=b'invalid', message=b'Enter a comma-separated list of material types', regex=b'[a-z0-9_-]+(,[a-z0-9_-]+)*')])), - ('admin_roles', models.CharField(default='chair', max_length=64, validators=[django.core.validators.RegexValidator(code=b'invalid', message=b'Enter a comma-separated list of role slugs', regex=b'[a-z0-9_-]+(,[a-z0-9_-]+)*')])), - ('history_id', models.AutoField(primary_key=True, serialize=False)), - ('history_change_reason', models.CharField(max_length=100, null=True)), - ('history_date', models.DateTimeField()), - ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), - ('agenda_type', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.AgendaTypeName')), - ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), - ('type', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.GroupTypeName')), - ], - options={ - 'ordering': ('-history_date', '-history_id'), - 'get_latest_by': 'history_date', - 'verbose_name': 'historical group features', - }, - ), - ] diff --git a/ietf/group/migrations/0003_groupfeatures_data.py b/ietf/group/migrations/0003_groupfeatures_data.py deleted file mode 100644 index 1e46f1df5..000000000 --- a/ietf/group/migrations/0003_groupfeatures_data.py +++ /dev/null @@ -1,299 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.13 on 2018-07-10 15:58 - - -from django.conf import settings -from django.db import migrations - -import debug # pyflakes:ignore - -from ietf.review.utils import active_review_teams - -group_type_features = { - 'ag': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'ietf', - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': True, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'area': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'ietf', - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'dir': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair,secr', - 'agenda_type': None, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'review': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair,secr', - 'agenda_type': None, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.review_requests', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': True, - 'material_types': 'slides'}, - 'iab': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'ietf', - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': True, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'ietf': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'ietf', - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': True, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'individ': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': None, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'irtf': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'ietf', - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'isoc': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': None, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'nomcom': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'side', - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'program': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'lead', - 'agenda_type': None, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': True, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': True, - 'has_reviews': False, - 'material_types': 'slides'}, - 'rfcedtyp': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'side', - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'rg': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'ietf', - 'customize_workflow': True, - 'default_tab': 'ietf.group.views.group_documents', - 'has_chartering_process': True, - 'has_default_jabber': True, - 'has_dependencies': True, - 'has_documents': True, - 'has_meetings': True, - 'has_nonsession_materials': False, - 'has_milestones': True, - 'has_reviews': False, - 'material_types': 'slides'}, - 'sdo': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': None, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': False, - 'has_nonsession_materials': False, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'team': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'ietf', - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_dependencies': False, - 'has_documents': False, - 'has_meetings': True, - 'has_nonsession_materials': True, - 'has_milestones': False, - 'has_reviews': False, - 'material_types': 'slides'}, - 'wg': { - 'about_page': 'ietf.group.views.group_about', - 'admin_roles': 'chair', - 'agenda_type': 'ietf', - 'customize_workflow': True, - 'default_tab': 'ietf.group.views.group_documents', - 'has_chartering_process': True, - 'has_default_jabber': True, - 'has_dependencies': True, - 'has_documents': True, - 'has_meetings': True, - 'has_nonsession_materials': False, - 'has_milestones': True, - 'has_reviews': False, - 'material_types': 'slides'}, -} - - -def forward(apps, schema_editor): - Group = apps.get_model('group', 'Group') - GroupTypeName = apps.get_model('name', 'GroupTypeName') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - AgendaTypeName = apps.get_model('name', 'AgendaTypeName') - for type in group_type_features: - features = group_type_features[type] - features['type_id'] = type - if features['agenda_type']: - features['agenda_type'] = AgendaTypeName.objects.get(slug=features['agenda_type']) - GroupFeatures.objects.create(**features) - dir = GroupTypeName.objects.get(slug='dir') - review = GroupTypeName.objects.create(slug='review', name='Directorate (with reviews)', desc='', used=True, order=0) - review_teams = [ g.acronym for g in active_review_teams() ] - for group in Group.objects.filter(type=dir): - if group.acronym in review_teams: - group.type = review - group.save() - -def reverse(apps, schema_editor): - Group = apps.get_model('group', 'Group') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - GroupTypeName = apps.get_model('name', 'GroupTypeName') - dir = GroupTypeName.objects.get(slug='dir') - review = GroupTypeName.objects.get(slug='review') - for group in Group.objects.filter(type=review): - group.type = dir - group.save() - for entry in GroupFeatures.objects.all(): - entry.delete() - review.delete() - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('group', '0002_groupfeatures_historicalgroupfeatures'), - ('name', '0003_agendatypename_data'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0004_add_group_feature_fields.py b/ietf/group/migrations/0004_add_group_feature_fields.py deleted file mode 100644 index 681232f6c..000000000 --- a/ietf/group/migrations/0004_add_group_feature_fields.py +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2019-01-10 07:51 - - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0003_groupfeatures_data'), - ] - - operations = [ - migrations.AddField( - model_name='groupfeatures', - name='acts_like_wg', - field=models.BooleanField(default=False, verbose_name='WG-Like'), - ), - migrations.AddField( - model_name='groupfeatures', - name='create_wiki', - field=models.BooleanField(default=False, verbose_name='Wiki'), - ), - migrations.AddField( - model_name='groupfeatures', - name='custom_group_roles', - field=models.BooleanField(default=False, verbose_name='Group Roles'), - ), - migrations.AddField( - model_name='groupfeatures', - name='has_session_materials', - field=models.BooleanField(default=False, verbose_name='Materials'), - ), - migrations.AddField( - model_name='groupfeatures', - name='is_schedulable', - field=models.BooleanField(default=False, verbose_name='Schedulable'), - ), - migrations.AddField( - model_name='groupfeatures', - name='role_order', - field=models.CharField(default='chair,secr,member', help_text='The order in which roles are shown, for instance on photo pages', max_length=128, validators=[django.core.validators.RegexValidator(code=b'invalid', message=b'Enter a comma-separated list of role slugs', regex=b'[a-z0-9_-]+(,[a-z0-9_-]+)*')]), - # type: ignore - ), - migrations.AddField( - model_name='groupfeatures', - name='show_on_agenda', - field=models.BooleanField(default=False, verbose_name='On Agenda'), - ), - migrations.AddField( - model_name='groupfeatures', - name='req_subm_approval', - field=models.BooleanField(default=False, verbose_name='Subm. Approval'), - ), - migrations.AddField( - model_name='groupfeatures', - name='matman_roles', - field=models.CharField(default='ad,chair,delegate,secr', max_length=64, validators=[django.core.validators.RegexValidator(code=b'invalid', message=b'Enter a comma-separated list of role slugs', regex=b'[a-z0-9_-]+(,[a-z0-9_-]+)*')]), - # type: ignore - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='acts_like_wg', - field=models.BooleanField(default=False, verbose_name='WG-Like'), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='create_wiki', - field=models.BooleanField(default=False, verbose_name='Wiki'), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='custom_group_roles', - field=models.BooleanField(default=False, verbose_name='Group Roles'), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='has_session_materials', - field=models.BooleanField(default=False, verbose_name='Materials'), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='is_schedulable', - field=models.BooleanField(default=False, verbose_name='Schedulable'), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='role_order', - field=models.CharField(default='chair,secr,member', help_text='The order in which roles are shown, for instance on photo pages', max_length=128, validators=[django.core.validators.RegexValidator(code=b'invalid', message=b'Enter a comma-separated list of role slugs', regex=b'[a-z0-9_-]+(,[a-z0-9_-]+)*')]), - # type: ignore - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='show_on_agenda', - field=models.BooleanField(default=False, verbose_name='On Agenda'), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='req_subm_approval', - field=models.BooleanField(default=False, verbose_name='Subm. Approval'), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='matman_roles', - field=models.CharField(default='ad,chair,delegate,secr', max_length=64, validators=[django.core.validators.RegexValidator(code=b'invalid', message=b'Enter a comma-separated list of role slugs', regex=b'[a-z0-9_-]+(,[a-z0-9_-]+)*')]), - # type: ignore - ), - ] diff --git a/ietf/group/migrations/0005_group_features_list_data_to_json.py b/ietf/group/migrations/0005_group_features_list_data_to_json.py deleted file mode 100644 index 68727ffe4..000000000 --- a/ietf/group/migrations/0005_group_features_list_data_to_json.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2019-01-09 09:02 - - -import json -import re - -from django.db import migrations - -import debug # pyflakes:ignore - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - for f in GroupFeatures.objects.all(): - for a in ['material_types', 'admin_roles', 'matman_roles', 'role_order']: - v = getattr(f, a, None) - if v != None: - v = re.sub(r'[][\\"\' ]+', '', v) - v = v.split(',') - v = json.dumps(v) - setattr(f, a, v) - f.save() -# This migration changes existing data fields in an incompatible manner, and -# would not be interleavable if we hadn't added compatibility code in -# Group.features() beforehand. With that patched in, we permit interleaving. -forward.interleavable = True # type: ignore # https://github.com/python/mypy/issues/2087 - -def reverse(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - for f in GroupFeatures.objects.all(): - for a in ['material_types', 'admin_roles', 'matman_roles', 'role_order']: - v = getattr(f, a, None) - if v != None: - v = getattr(f, a) - v = json.loads(v) - v = ','.join(v) - setattr(f, a, v) - f.save() - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0004_add_group_feature_fields'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0006_group_features_lists_to_jsonfield.py b/ietf/group/migrations/0006_group_features_lists_to_jsonfield.py deleted file mode 100644 index 76412c821..000000000 --- a/ietf/group/migrations/0006_group_features_lists_to_jsonfield.py +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2019-01-16 05:53 - - -from django.db import migrations, models -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0005_group_features_list_data_to_json'), - ] - - operations = [ - migrations.AddField( - model_name='groupfeatures', - name='docman_roles', - field=jsonfield.fields.JSONField(default=['ad', 'chair', 'delegate', 'secr'], max_length=128), - ), - migrations.AddField( - model_name='groupfeatures', - name='groupman_roles', - field=jsonfield.fields.JSONField(default=['ad', 'chair'], max_length=128), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='docman_roles', - field=jsonfield.fields.JSONField(default=['ad', 'chair', 'delegate', 'secr'], max_length=128), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='groupman_roles', - field=jsonfield.fields.JSONField(default=['ad', 'chair'], max_length=128), - ), - migrations.AlterField( - model_name='groupfeatures', - name='admin_roles', - field=jsonfield.fields.JSONField(default=['chair'], max_length=64), - ), - migrations.AlterField( - model_name='groupfeatures', - name='custom_group_roles', - field=models.BooleanField(default=False, verbose_name='Cust. Roles'), - ), - migrations.AlterField( - model_name='groupfeatures', - name='has_nonsession_materials', - field=models.BooleanField(default=False, verbose_name='Other Matrl.'), - ), - migrations.AlterField( - model_name='groupfeatures', - name='has_session_materials', - field=models.BooleanField(default=False, verbose_name='Sess Matrl.'), - ), - migrations.AlterField( - model_name='groupfeatures', - name='material_types', - field=jsonfield.fields.JSONField(default=['slides'], max_length=64), - ), - migrations.AlterField( - model_name='groupfeatures', - name='matman_roles', - field=jsonfield.fields.JSONField(default=['ad', 'chair', 'delegate', 'secr'], max_length=128), - ), - migrations.AlterField( - model_name='groupfeatures', - name='role_order', - field=jsonfield.fields.JSONField(default=['chair', 'secr', 'member'], help_text='The order in which roles are shown, for instance on photo pages. Enter valid JSON.', max_length=128), - ), - migrations.AlterField( - model_name='historicalgroupfeatures', - name='admin_roles', - field=jsonfield.fields.JSONField(default=['chair'], max_length=64), - ), - migrations.AlterField( - model_name='historicalgroupfeatures', - name='custom_group_roles', - field=models.BooleanField(default=False, verbose_name='Cust. Roles'), - ), - migrations.AlterField( - model_name='historicalgroupfeatures', - name='has_nonsession_materials', - field=models.BooleanField(default=False, verbose_name='Other Matrl.'), - ), - migrations.AlterField( - model_name='historicalgroupfeatures', - name='has_session_materials', - field=models.BooleanField(default=False, verbose_name='Sess Matrl.'), - ), - migrations.AlterField( - model_name='historicalgroupfeatures', - name='material_types', - field=jsonfield.fields.JSONField(default=['slides'], max_length=64), - ), - migrations.AlterField( - model_name='historicalgroupfeatures', - name='matman_roles', - field=jsonfield.fields.JSONField(default=['ad', 'chair', 'delegate', 'secr'], max_length=128), - ), - migrations.AlterField( - model_name='historicalgroupfeatures', - name='role_order', - field=jsonfield.fields.JSONField(default=['chair', 'secr', 'member'], help_text='The order in which roles are shown, for instance on photo pages. Enter valid JSON.', max_length=128), - ), - ] diff --git a/ietf/group/migrations/0007_new_group_features_data.py b/ietf/group/migrations/0007_new_group_features_data.py deleted file mode 100644 index b08e7f8ae..000000000 --- a/ietf/group/migrations/0007_new_group_features_data.py +++ /dev/null @@ -1,244 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2019-01-09 09:02 - - -from django.db import migrations - -import debug # pyflakes:ignore - -group_type_features = { - 'ag': { - 'custom_group_roles': True, - 'has_session_materials': True, - 'acts_like_wg': True, - 'create_wiki': True, - 'is_schedulable': True, - 'req_subm_approval': True, - 'show_on_agenda': True, - 'docman_roles': ['chair', 'delegate', 'secr'], - 'groupman_roles': ['ad', 'chair', 'delegate'], - 'matman_roles': ['ad', 'chair', 'delegate', 'secr'], - 'role_order': ['chair', 'secr'], - }, - 'area': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': True, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': ['ad', 'delegate', 'secr'], - 'groupman_roles': ['ad',], - 'matman_roles': ['ad', 'chair', 'delegate', 'secr'], - 'role_order': ['chair', 'secr'], - }, - 'dir': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': True, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': [], - 'groupman_roles': ['ad', 'secr', ], - 'matman_roles': ['ad', 'chair', 'delegate', 'secr'], - 'role_order': ['chair', 'secr'], - }, - 'review': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': True, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': ['secr'], - 'groupman_roles': ['ad', 'secr'], - 'matman_roles': ['ad', 'secr'], - 'role_order': ['chair', 'secr'], - }, - 'iab': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': False, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': True, - 'docman_roles': ['chair'], - 'groupman_roles': [], - 'matman_roles': ['chair', 'delegate'], - 'role_order': ['chair', 'secr'], - }, - 'ietf': { - 'custom_group_roles': True, - 'has_session_materials': True, - 'acts_like_wg': False, - 'create_wiki': False, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': ['chair', ], - 'groupman_roles': ['chair', 'delegate'], - 'matman_roles': ['chair', 'delegate'], - 'role_order': ['chair', 'secr'], - }, - 'individ': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': False, - 'is_schedulable': False, - 'req_subm_approval': False, - 'show_on_agenda': False, - 'docman_roles': ['auth'], - 'groupman_roles': [], - 'matman_roles': [], - 'role_order': ['chair', 'secr'], - }, - 'irtf': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': False, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': [], - 'groupman_roles': ['chair', 'delegate'], - 'matman_roles': ['chair', 'delegate', 'secr'], - 'role_order': ['chair', 'secr'], - }, - 'isoc': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': False, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': [], - 'groupman_roles': ['chair', ], - 'matman_roles': ['chair', 'secr'], - 'role_order': ['chair', 'secr'], - }, - 'nomcom': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': True, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': [], - 'groupman_roles': ['chair', 'advisor'], - 'matman_roles': ['chair'], - 'role_order': ['chair', 'member', 'advisor'], - }, - 'program': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': False, - 'is_schedulable': False, - 'req_subm_approval': False, - 'show_on_agenda': False, - 'docman_roles': ['chair', 'secr'], - 'groupman_roles': ['chair', 'secr'], - 'matman_roles': ['chair', 'secr'], - 'role_order': ['chair', 'secr'], - }, - 'rfcedtyp': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': False, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': [], - 'groupman_roles': [], - 'matman_roles': [], - 'role_order': ['chair', 'secr'], - }, - 'rg': { - 'custom_group_roles': False, - 'has_session_materials': True, - 'acts_like_wg': True, - 'create_wiki': True, - 'is_schedulable': True, - 'req_subm_approval': True, - 'show_on_agenda': True, - 'docman_roles': ['chair', 'delegate', 'secr'], - 'groupman_roles': ['chair', 'secr'], - 'matman_roles': ['chair', 'secr'], - 'role_order': ['chair', 'secr'], - }, - 'sdo': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': False, - 'is_schedulable': False, - 'req_subm_approval': True, - 'show_on_agenda': False, - 'docman_roles': ['liaiman', 'matman'], - 'groupman_roles': [], - 'matman_roles': [], - 'role_order': ['liaiman'], - }, - 'team': { - 'custom_group_roles': True, - 'has_session_materials': False, - 'acts_like_wg': False, - 'create_wiki': True, - 'is_schedulable': False, - 'req_subm_approval': False, - 'show_on_agenda': False, - 'docman_roles': [], - 'groupman_roles': ['chair', ], - 'matman_roles': [], - 'role_order': ['chair', 'member', 'matman'], - }, - 'wg': { - 'custom_group_roles': False, - 'has_session_materials': True, - 'acts_like_wg': True, - 'create_wiki': True, - 'is_schedulable': True, - 'req_subm_approval': True, - 'show_on_agenda': True, - 'docman_roles': ['chair', 'delegate', 'secr'], - 'groupman_roles': ['ad', 'chair', 'delegate', 'secr'], - 'matman_roles': ['ad', 'chair', 'delegate', 'secr'], - 'role_order': ['chair', 'secr', 'delegate'], - }, -} - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - for type in group_type_features: - features = group_type_features[type] - gf = GroupFeatures.objects.get(type=type) - for k,v in features.items(): - setattr(gf, k, v) - gf.save() -# This migration does not remove or change any previous fields, and executes -# swirftly, so we permit it to be interleaved with schema migrations -forward.interleavable = True # type: ignore # https://github.com/python/mypy/issues/2087 - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0006_group_features_lists_to_jsonfield') - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0008_group_features_onetoone.py b/ietf/group/migrations/0008_group_features_onetoone.py deleted file mode 100644 index 86bfacc1e..000000000 --- a/ietf/group/migrations/0008_group_features_onetoone.py +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2019-01-19 10:08 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0007_new_group_features_data'), - ] - - operations = [ - migrations.AlterField( - model_name='groupfeatures', - name='type', - field=ietf.utils.models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='features', serialize=False, to='name.GroupTypeName'), - ), - migrations.AlterField( - model_name='historicalgroupfeatures', - name='type', - field=models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.GroupTypeName'), - ), - ] diff --git a/ietf/group/migrations/0009_auto_20190122_1012.py b/ietf/group/migrations/0009_auto_20190122_1012.py deleted file mode 100644 index 397757404..000000000 --- a/ietf/group/migrations/0009_auto_20190122_1012.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.18 on 2019-01-22 10:12 - - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0008_group_features_onetoone'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalgroupfeatures', - name='agenda_type', - field=models.ForeignKey(blank=True, db_constraint=False, default='ietf', null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.AgendaTypeName'), - ), - ] diff --git a/ietf/group/migrations/0010_add_group_types.py b/ietf/group/migrations/0010_add_group_types.py deleted file mode 100644 index 59c2c07f7..000000000 --- a/ietf/group/migrations/0010_add_group_types.py +++ /dev/null @@ -1,156 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2019-01-09 09:02 - - -from django.db import migrations - -import debug # pyflakes:ignore - -group_type_features = { - 'adhoc': { - 'grouptypename': { - "slug": 'adhoc', - "desc": 'Ad Hoc schedulable Group Type, for instance HotRfc', - "name": "Ad Hoc", - "order": 0, - "used": True, - "verbose_name": "Ad Hoc Group Type", - }, - 'groupfeatures': { - 'about_page': 'ietf.group.views.group_about', - 'acts_like_wg': False, - 'admin_roles': '["chair"]', - 'agenda_type_id': 'ietf', - 'create_wiki': True, - 'custom_group_roles': False, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'docman_roles': '["chair"]', - 'groupman_roles': '["chair","delegate"]', - 'has_chartering_process': False, - 'has_default_jabber': True, - 'has_documents': False, - 'has_dependencies': False, - 'has_meetings': True, - 'has_milestones': False, - 'has_nonsession_materials': False, - 'has_reviews': False, - 'has_session_materials': True, - 'is_schedulable': True, - 'material_types': '["slides"]', - 'matman_roles': '["chair","delegate"]', - 'req_subm_approval': True, - 'role_order': '["chair","delegate"]', - 'show_on_agenda': True, - }, - }, - 'iesg': { - 'grouptypename': { - "slug": 'iesg', - "desc": '', - "name": "IESG", - "order": 0, - "used": True, - "verbose_name": "Internet Engineering Steering Group" - }, - 'groupfeatures': { - 'about_page': 'ietf.group.views.group_about', - 'acts_like_wg': False, - 'admin_roles': '["chair"]', - 'agenda_type_id': None, - 'create_wiki': False, - 'custom_group_roles': True, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'docman_roles': '["chair"]', - 'groupman_roles': '["chair","delegate"]', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_documents': False, - 'has_dependencies': False, - 'has_meetings': False, - 'has_milestones': False, - 'has_nonsession_materials': False, - 'has_reviews': False, - 'has_session_materials': False, - 'is_schedulable': False, - 'material_types': '[]', - 'matman_roles': '["chair","delegate"]', - 'req_subm_approval': True, - 'role_order': '["chair","secr"]', - 'show_on_agenda': False - }, - }, - 'ise': { - 'grouptypename': { - "slug": 'ise', - "desc": '', - "name": "ISE", - "order": 0, - "used": True, - "verbose_name": "Independent Stream Editor", - }, - 'groupfeatures': { - 'about_page': 'ietf.group.views.group_about', - 'acts_like_wg': False, - 'admin_roles': '["chair","lead"]', - 'agenda_type_id': None, - 'create_wiki': False, - 'custom_group_roles': True, - 'customize_workflow': False, - 'default_tab': 'ietf.group.views.group_about', - 'docman_roles': '["chair"]', - 'groupman_roles': '["chair","delegate"]', - 'has_chartering_process': False, - 'has_default_jabber': False, - 'has_documents': False, - 'has_dependencies': False, - 'has_meetings': False, - 'has_milestones': False, - 'has_nonsession_materials': False, - 'has_reviews': False, - 'has_session_materials': False, - 'is_schedulable': False, - 'material_types': '[]', - 'matman_roles': '["chair","delegate"]', - 'req_subm_approval': True, - 'role_order': '["chair"]', - 'show_on_agenda': False - }, - }, -} - -def forward(apps, schema_editor): - GroupTypeName = apps.get_model('name', 'GroupTypeName') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - for slug in group_type_features: - typename = group_type_features[slug]['grouptypename'] - gt, _ = GroupTypeName.objects.get_or_create(slug=slug) - for k,v in typename.items(): - setattr(gt, k, v) - gt.save() - # - features = group_type_features[slug]['groupfeatures'] - gf, _ = GroupFeatures.objects.get_or_create(type_id=slug) - for k,v in features.items(): - setattr(gf, k, v) - gf.save() - - -# This migration does not remove or change any previous fields, and executes -# swirftly, so we permit it to be interleaved with schema migrations -forward.interleavable = True # type: ignore # https://github.com/python/mypy/issues/2087 - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0009_auto_20190122_1012'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0011_auto_20190225_1302.py b/ietf/group/migrations/0011_auto_20190225_1302.py deleted file mode 100644 index 1b5e45e2e..000000000 --- a/ietf/group/migrations/0011_auto_20190225_1302.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-02-25 13:02 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0010_add_group_types'), - ] - - operations = [ - migrations.RemoveField( - model_name='groupfeatures', - name='has_dependencies', - ), - migrations.RemoveField( - model_name='historicalgroupfeatures', - name='has_dependencies', - ), - ] diff --git a/ietf/group/migrations/0012_add_old_nomcom_announcements.py b/ietf/group/migrations/0012_add_old_nomcom_announcements.py deleted file mode 100644 index 3aa65bc91..000000000 --- a/ietf/group/migrations/0012_add_old_nomcom_announcements.py +++ /dev/null @@ -1,1308 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-23 17:50 - - -from django.db import migrations - -from ietf.group.models import Group -from ietf.person.models import Person -from ietf.message.models import Message -from datetime import datetime - -def forward(apps, schema_editor): - - p=Person.objects.filter(name="Jim Fenton")[0] - -# Unfortunately, get_nomcom_by_year only works for 2013 and later, so we need to do things the hard way. - - n = Group.objects.filter(acronym="nomcom2002")[0] - - n.message_set.create(by=p, subject="nomcom call for volunteers", time=datetime(2002,7,30), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" -This is the call for volunteers to participate in the 2002 IETF -Nominations Committee, the committee that will select this year's -nominees for the IAB and the IESG. Details about the Nominations -Committee process can be found in RFC 2727. - -The NomCom is the IETF's way of choosing its leadership. Typically, -half of the IAB and half of the IESG is selected each year. It is -possible that the NomCom will have to fill more or fewer slots than -this, due to the creation or elimination of positions by the IESG, -resignations, transfers, etc. IESG members whose terms are up are -Harald Alvestrand, IETF Chair; Scott Bradner, Transport; Randy Bush, -Operations & Management; Patrik Faltstrom, Applications; Thomas Narten, -Internet; Bill Fenner, Routing; and Jeff Schiller, Security. IAB -members whose terms are up are: Ran Atkinson, Rob Austein, Fred Baker, -Steve Deering, Sally Floyd, and Geoff Huston. - -For the NomCom to work as it should, the pool from which the volunteers -are chosen should be as large as possible. The more people who -volunteer, the better chance we have of choosing a random yet -representative cross section of the IETF population. Volunteering for -the NomCom is also a good way of serving the IETF community. So please -volunteer. - -NomCom members are barred from nomination during the year they serve, -even if they later resign. Therefore being selected for the NomCom -provides complete immunity against selection for the IAB or IESG during -that year. - -People who volunteer should be sure they can the afford the time, -several hours per week for the next 4-5 months. The task basically -involves the following activities: - - - Reading candidate's statements - - Participating in a weekly 2 hour conference call. - - Attending the IETF meetings held during the selection process. - - Doing several interviews. - - Speaking to IETF participants about the candidates, the job - requirements or the process. - -All NomCom deliberations and supporting information that relates to -specific nominees, candidates, and confirmed candidates are -confidential. The NomCom members will be exposed to confidential -information as a result of their deliberations, their interactions with -those they consult, and from those who provide requested supporting -information. All members are expected to handle this information in a -manner consistent with its sensitivity. - -To qualify as a volunteer, a person needs to have attended 2 out of the -last 3 IETF meetings. Anyone who meets this requirement is invited to -volunteer by emailing your name, telephone number(s), and email address -to proberts@megisto.com no later than September 6, 2002. Please put -"NOMCOM VOLUNTEER" in the subject line. - -Once the list closes, I'll provide the list to the IETF secretariat who -will verify the eligibility of the each of the volunteers (e.g. has -attended at least 2 of the last 3 IETFs). I will also ask them to -publish the list prior to verification for volunteers to confirm that I -actually received their email volunteering. This list will be -published at: http://www.ietf.org/nomcom/index.html - -We will then run the selection process and announce the results the -week of September 16, 2002. Ten (10) NomCom voting members will be -chosen from the pool of volunteers according to the procedure described -by Donald Eastlake in RFC 2777, "Publicly Verifiable Nomcom Random -Selection". The source of randomness will be based on the shares traded -number of 12 stocks selected by the NomCom chair. - -The official shares traded numbers (denoted in 000s) will be drawn from -the September 16, 2002 Wall Street Journal which reports the sales -figures from the previous trading day - September 13, 2002. If trading -in any of the stocks is suspended, then the shares traded will be -assumed to be 0. - -Please volunteer. - -Thank you, - -Phil Roberts <proberts@megisto.com> - -STOCKS USED IN THE NOMCOM SELECTION PROCESS: - -Martha Stewart Living (MSO) -Harley-Davidson (HDI) -Motorola (MOT) -Sony (SNE) -Metlife (MET) -Home Depot (HD) -Wrigely (WWY) -Granite Construction, Inc (GVA) -UPS (UPS) -Marriott International (MAR) -Quest Diagnostics (DGX) -Nordstrom (JWN) - -""") - - n.message_set.create(by=p, subject="Selection of the Nominations Committee", time=datetime(2002,9,17), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" -STOCKS USED IN THE NOMCOM SELECTION PROCESS, published result (in 100s), -number used as input (using 000s, rounded): - -Martha Stewart Living (MSO), 1562, 156, -Harley-Davidson (HDI), 12575, 1258, -Motorola (MOT), 86406, 8641, -Sony (SNE), 4061, 406, -Metlife (MET), 26384, 2638, -Home Depot (HD), 77244, 7724, -Wrigely (WWY), 2422, 242, -Granite Construction, Inc (GVA), 2134, 213, -UPS (UPS), 25343, 2534, -Marriott International (MAR), 20820, 2082, -Quest Diagnostics (DGX), 6471, 647, -Nordstrom (JWN), 3598, 360. - - -Output of selection run: ------------------------- - -Type size of pool: -(or 'exit' to exit) 146 -Type number of items to be selected: -(or 'exit' to exit) 10 -Approximately 49.8 bits of entropy needed. - -Type #1 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -156 -Type #2 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -1258 -Type #3 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -8641 -Type #4 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -406 -Type #5 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -2638 -Type #6 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -7724 -Type #7 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -242 -Type #8 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -213 -Type #9 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -2534 -Type #10 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -2082 -Type #11 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -647 -Type #12 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -360 -Type #13 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -Key is: - 156./1258./8641./406./2638./7724./242./213./2534./2082./647./360./ -index hex value of MD5 div selected - 1 E220923B36A9DC02559AD9D8A2A3788E 146 -> 23 <- - 2 4DA923C4AB28A35840731A3BC7FD6FED 145 -> 75 <- - 3 C15AC23F9DDA50A178749955C7DB4C53 144 -> 86 <- - 4 CF0F40F7AD1346B3DA357793950D7E01 143 -> 47 <- - 5 1FB9FDBD56707A1B656F095A3CF0ACEF 142 -> 74 <- - 6 C530071D6CD9E5FA83AA719D28C4013A 141 -> 127 <- - 7 9E9F928E84A3BF6DE15E336C9AF0EB14 140 -> 118 <- - 8 8668415B21041948BE0EE91A69724B4C 139 -> 15 <- - 9 26338CA7ED8FB029E20B1AD0DD34BEC4 138 -> 9 <- -10 369D706DC4051ADFD4259C287E78AAE7 137 -> 140 <- - -Done, type any character to exit. - ----------------------------------- -Nominations committee: - 23. Edward Lewis - 75. Alec Brusilovsky - 86. Michael Richardson - 47. Eva Jonsson - 74. Stephen Trowbridge -127. Frank Alfano -118. Thomas Kurien - 15. Dennis Beard - 9. Richard Draves -140. Eva Gustaffson - -""" - ) - - n.message_set.create(by=p, subject="Announcement of the Nominations Committee", time=datetime(2002,9,18), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" -We have completed selection of the 2002 -Nominations committee. - -Please welcome the voting members of this -year's Nomcom: - -Edward Lewis -Alec Brusilovsky -Michael Richardson -Eva Jonsson -Stephen Trowbridge -Frank Alfano -Thomas Kurien -Dennis Beard -Richard Draves -Eva Gustafsson - -The non-voting members are: - -Phil Roberts (chair) -Allison Mankin (IETF liaison) -Eric Rescorla (IAB liaison) -Theodore Ts'o (previous nomcom chair) - -Information on this year's selection process is available at: - -""" - ) - - n.message_set.create(by=p, subject="Announcement of IESG and IAB Nominations Requests", time=datetime(2002,10,21), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" -The 2002-2003 Nominations Committee is now -soliciting nominations for the open -slots on the IESG and IAB. - -Please take the time, even if it is -only a few moments, to send us your -thoughts. - -Members of the community are encouraged to -nominate candidates for any of the positions -which are up for re-filling: - -IESG Terms ending in March, 2003: -Harald Alvestrand IETF Chair -Scott Bradner Transport -Randy Bush Operations & Management -Patrik Faltstrom Applications -Thomas Narten Internet -Bill Fenner Routing -Jeff Schiller Security - -IAB Terms ending in March, 2003: -Ran Atkinson -Rob Austein -Fred Baker -Steve Deering -Sally Floyd -Geoff Huston - -Members of the community are encouraged to contact the nomcom confidentially -1) to nominate someone for any of these positions (please provide the email -address of any nominee), -2) to provide input relating to potential candidates, or -3) to provide comments regarding the past performance of incumbents. -All of this information will be considered during the deliberations of -the nominating committee and will be held in confidence by the nominating -committee. - -We emphasize that comments sent to the nominations committee will be kept -in confidence. As noted in RFC 2727 "all deliberations and supporting -information that relates to specific nominees, candidates, and confirmed -candidates are confidential." - -Self-nominations are accepted. The deadline for nominations is midnight -Friday, November 22, 2002. Early input is desirable so that candidates -may be interviewed during the Atlanta IETF meeting. - -The members of the NomCom can be contacted individually at the addresses -below or collectively at . Additionally, the members of -the NomCom will be identified at the IETF by a small orange dot -on their name tags. People are encouraged to take advantage of the -opportunity to talk to the members of the NomCom about nominations -and other issues related to the IAB and IESG membership. - -The 2002-2003 Nominations Committee -Edward Lewis -Alec Brusilovsky -Michael Richardson -Eva Jonsson -Stephen Trowbridge -Frank Alfano -Thomas Kurien -Dennis Beard -Richard Draves -Eva Gustafsson - -Non-voting members: -Phil Roberts (chair) -Allison Mankin (IESG liaison) -Eric Rescorla (IAB liaison) -Theodore Ts'o (previous nomcom chair) - -The role of non-voting members (from RFC 2727): - -"The nominations committee comprises at least a non-voting Chair, -10 voting volunteers, and 3 non-voting liaisons. The sitting IAB -and IESG members each appoint a non-voting liaison to the nominating -committee from their current membership who are not sitting in an -open position. The Chair of the prior year's nominating committee -also serves as a non-voting liaison. - -""") - - n.message_set.create(by=p, subject="Announcement of IESG and IAB Nominations Requests", time=datetime(2002,11,0o5), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" -The 2002-2003 Nominations Committee is now -soliciting nominations for the open -slots on the IESG and IAB. - -Please take the time, even if it is -only a few moments, to send us your -thoughts. - -Members of the community are encouraged to -nominate candidates for any of the positions -which are up for re-filling: - -IESG Terms ending in March, 2003: -Harald Alvestrand IETF Chair -Scott Bradner Transport -Randy Bush Operations & Management -Patrik Faltstrom Applications -Thomas Narten Internet -Bill Fenner Routing -Jeff Schiller Security - -IAB Terms ending in March, 2003: -Ran Atkinson -Rob Austein -Fred Baker -*Steve Deering -Sally Floyd -Geoff Huston - -*Please note that Steve Deering is on sabbatical and will not be a candidate -to return to the IAB. - -Members of the community are encouraged to contact the nomcom confidentially -1) to nominate someone for any of these positions (please provide the email -address of any nominee), -2) to provide input relating to potential candidates, or -3) to provide comments regarding the past performance of incumbents. -All of this information will be considered during the deliberations of -the nominating committee and will be held in confidence by the nominating -committee. - -We emphasize that comments sent to the nominations committee will be kept -in confidence. As noted in RFC 2727 "all deliberations and supporting -information that relates to specific nominees, candidates, and confirmed -candidates are confidential." - -Self-nominations are accepted. The deadline for nominations is midnight -Friday, November 22, 2002. Early input is desirable so that candidates -may be interviewed during the Atlanta IETF meeting. - -The members of the NomCom can be contacted individually at the addresses -below or collectively at nomcom@ietf.org. Additionally, the members of -the NomCom will be identified at the IETF by a small orange dot -on their name tags. People are encouraged to take advantage of the -opportunity to talk to the members of the NomCom about nominations -and other issues related to the IAB and IESG membership. - -The 2002-2003 Nominations Committee -Edward Lewis -Alec Brusilovsky -Michael Richardson -Eva Jonsson -Stephen Trowbridge -Frank Alfano -Thomas Kurien -Dennis Beard -Richard Draves -Eva Gustafsson - -Non-voting members: -Phil Roberts (chair) -Allison Mankin (IESG liaison) -Eric Rescorla (IAB liaison) -Theodore Ts'o (previous nomcom chair) - -The role of non-voting members (from RFC 2727): - -"The nominations committee comprises at least a non-voting Chair, -10 voting volunteers, and 3 non-voting liaisons. The sitting IAB -and IESG members each appoint a non-voting liaison to the nominating -committee from their current membership who are not sitting in an -open position. The Chair of the prior year's nominating committee -also serves as a non-voting liaison. -""") - - n.message_set.create(by=p, subject="Announcement of IESG and IAB Nominations Requests", time=datetime(2002,11,12), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" -The 2002-2003 Nominations Committee is now -soliciting nominations for the open -slots on the IESG and IAB. - -Please take the time, even if it is -only a few moments, to send us your -thoughts. - -Members of the community are encouraged to -nominate candidates for any of the positions -which are up for re-filling: - -IESG Terms ending in March, 2003: -Harald Alvestrand IETF Chair -Scott Bradner Transport -Randy Bush Operations & Management -Patrik Faltstrom Applications -Thomas Narten Internet -Bill Fenner Routing -Jeff Schiller Security - -IAB Terms ending in March, 2003: -Ran Atkinson -Rob Austein -Fred Baker -*Steve Deering -Sally Floyd -Geoff Huston - -*Please note that Steve Deering is on sabbatical and will not be a candidate -to return to the IAB. - -Members of the community are encouraged to contact the nomcom confidentially -1) to nominate someone for any of these positions (please provide the email -address of any nominee), -2) to provide input relating to potential candidates, or -3) to provide comments regarding the past performance of incumbents. -All of this information will be considered during the deliberations of -the nominating committee and will be held in confidence by the nominating -committee. - -We emphasize that comments sent to the nominations committee will be kept -in confidence. As noted in RFC 2727 "all deliberations and supporting -information that relates to specific nominees, candidates, and confirmed -candidates are confidential." - -Self-nominations are accepted. The deadline for nominations is midnight -Friday, November 22, 2002. Early input is desirable so that candidates -may be interviewed during the Atlanta IETF meeting. - -The members of the NomCom can be contacted individually at the addresses -below or collectively at nomcom@ietf.org. Additionally, the members of -the NomCom will be identified at the IETF by a small orange dot -on their name tags. People are encouraged to take advantage of the -opportunity to talk to the members of the NomCom about nominations -and other issues related to the IAB and IESG membership. - -The 2002-2003 Nominations Committee -Edward Lewis -Alec Brusilovsky -Michael Richardson -Eva Jonsson -Stephen Trowbridge -Frank Alfano -Thomas Kurien -Dennis Beard -Richard Draves -Eva Gustafsson - -Non-voting members: -Phil Roberts (chair) -Allison Mankin (IESG liaison) -Eric Rescorla (IAB liaison) -Theodore Ts'o (previous nomcom chair) - -The role of non-voting members (from RFC 2727): - -"The nominations committee comprises at least a non-voting Chair, -10 voting volunteers, and 3 non-voting liaisons. The sitting IAB -and IESG members each appoint a non-voting liaison to the nominating -committee from their current membership who are not sitting in an -open position. The Chair of the prior year's nominating committee -also serves as a non-voting liaison. -""" - ) - - n.message_set.create(by=p, subject="IETF Nomcom Announcement", time=datetime(2003,2,27), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" -The nomcom is pleased to announce the results of the 2002-2003 -selection process. The IAB has approved the IESG candidates and -the ISOC has approved the IAB candidates. Please welcome them -in their roles. - - -The IESG selections are as follows: -Harald Alvestrand IETF Chair -Ted Hardie Applications -Thomas Narten Internet -Randy Bush Operations and Management -Bill Fenner Routing -Russ Housley Security -Jon Peterson Transport - -The IAB selections are as follows: -Bernard Aboba -Rob Austein -Sally Floyd -Jun-ichiro Itojun Hagino -Mark Handley -Geoff Huston - -And also Patrik Faltstrom has been selected to fill -the vacancy left by Ted Hardie, a one year term. - -Many people deserve to be thanked. First thanks are due to -all of those who volunteered to serve on the nomcom, and especially -to those who were randomly selected and served as voting members -of the nomcom. They contributed considerable time from their busy -schedules to participate in weekly calls, to conduct interviews, to -read questionnaires, and to make the selection of candidates. - -Thanks to those in the community who volunteered to serve on the IESG -and the IAB, both to those who were selected and those not chosen this -time around. Thanks very much for completing the questionnaires, the -follow-up questionnaires, and participating in interviews. - -Thanks are also due to the IETF as a whole for providing input to the -process through nominations, recommendations, and feedback on -potential candidates. - -The voting members of the nomcom are: -Edward Lewis -Alec Brusilovsky -Michael Richardson -Eva Jonsson -Stephen Trowbridge -Frank Alfano -Thomas Kurien -Dennis Beard -Richard Draves -Eva Gustafsson - -The nonvoting members are: -Phil Roberts - chair -Allison Mankin - IESG liaison -Eric Rescorla - IAB liaison -Ted Ts'o - past chair -""") - - n.message_set.create(by=p, subject="Announcement of IESG and IAB Nominations Request", time=datetime(2003,6,11), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" - The nominations committee has received notice to fill the vacancy in the - Internet Area created with Erik Nordmark's departure. The nominations - committee is seeking nominees to fill the open position. The chosen - candidate - will serve out the rest of the current term, which ends in March 2004, - and the two year term following, according to the rules documented in RFC - 2727. - - Members of the community are encouraged to contact the nomcom confidentially - - 1) to nominate someone for this position (please provide the email - address of any nominee), or 2) to provide input relating to potential - candidates. - - All of this information will be considered during the deliberations of - the nominating committee and will be held in confidence by the nominating - committee. - - We emphasize that comments sent to the nominations committee will be kept - in confidence. As noted in RFC 2727 "all deliberations and supporting - information that relates to specific nominees, candidates, and confirmed - candidates are confidential." - - Self-nominations are accepted. The deadline for nominations is midnight - Tuesday, June 17, 2003. - - The members of the NomCom can be contacted individually at the addresses - below or collectively at . - - The 2002-2003 Nominations Committee - Edward Lewis - Alec Brusilovsky - Michael Richardson - Eva Jonsson - Stephen Trowbridge - Frank Alfano - Thomas Kurien - Dennis Beard - - Richard Draves - Eva Gustafsson - - Non-voting members: - Phil Roberts (chair) - Allison Mankin (IESG liaison) - Eric Rescorla (IAB liaison) - Theodore Ts'o (previous nomcom chair) - - The role of non-voting members (from RFC 2727): - - "The nominations committee comprises at least a non-voting Chair, - 10 voting volunteers, and 3 non-voting liaisons. The sitting IAB - and IESG members each appoint a non-voting liaison to the nominating - committee from their current membership who are not sitting in an - open position. The Chair of the prior year's nominating committee - also serves as a non-voting liaison. -""") - - n.message_set.create(by=p, subject="Nomcom result announcement", time=datetime(2003,7,15), - frm="Phil Roberts ", to="IETF Announcement list ", body=""" - The nomcom is pleased to announce that it has selected Margaret Wasserman - to fill the mid-term vacancy left by Erik Nordmark's resignation. - - Thanks are due again to many folks. First thanks are due to - all of those who volunteered to serve on the nomcom, and especially - to those who were randomly selected and served as voting members - of the nomcom. They contributed considerable time from their busy - schedules to participate in weekly calls, to conduct interviews, to - read questionnaires, and to make the selection of candidates. - - Thanks to those in the community who volunteered to serve on the IESG - and the IAB, both to those who were selected and those not chosen this - time around. Thanks very much for completing the questionnaires, the - follow-up questionnaires, and participating in interviews. - - Thanks are also due to the IETF as a whole for providing input to the - process through nominations, recommendations, and feedback on - potential candidates. - - The voting members of the nomcom are: - Edward Lewis - Alec Brusilovsky - Michael Richardson - Eva Jonsson - Stephen Trowbridge - Frank Alfano - Thomas Kurien - Dennis Beard - Richard Draves - Eva Gustafsson - - The nonvoting members are: - Phil Roberts - chair - Allison Mankin - IESG liaison - Eric Rescorla - IAB liaison - Ted Ts'o - past chair -""") - - n = Group.objects.filter(acronym="nomcom2003")[0] - - n.message_set.create(by=p, subject="IETF Nominations Committee Chair Announcement", time=datetime(2003,8,25), - frm="Lynn St. Amour", to="IETF Announcement list ", body=""" - One of the roles of the ISOC President is to appoint the IETF Nominations -Committee chair. This is done through consultation with the IETF and IAB Chairs -as well as the ISOC Executive Committee and it gives us great pleasure to announce -that Rich Draves has agreed to serve as the 2003 IETF Nominations Committee chair. -Rich can be reached at . - -A Call for Nominations for this committee will be sent shortly to the IETF -Announcement list; and a list of the IESG and IAB seats to be filled will also be -published shortly. Please give serious consideration to possible candidates for these -posts and in the interim, make your suggestions known to Rich, who will share them -with the committee when seated. - -This is an ambitious undertaking and it is important that the entire IETF community -assist as much as possible. Thank you in advance for your support and a sincere thank -you to Rich for agreeing to take on this important responsibility. - -Lynn St. Amour -President & CEO -The Internet Society -""") - - n.message_set.create(by=p, subject="NomCom call for volunteers", time=datetime(2003,9,22), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -This is the call for volunteers to participate in the 2003 IETF Nominations Committee, -the committee that will select this year's nominees for the IAB and the IESG. - -The NomCom is the IETF's way of choosing its leadership. Typically, half of the IAB -and half of the IESG is selected each year. It is possible that the NomCom will have -to fill more or fewer slots than this, due to the creation or elimination of positions -by the IESG, resignations, transfers, etc. IESG members whose terms are up are: -Ned Freed, Applications; Bert Wijnen, Operations and Management; Alex Zinin, -Routing; Steve Bellovin, Security; and Allison Mankin, Transport. -IAB members whose terms are up are: Leslie Daigle, Patrik Faltstrom, -Charlie Kaufman, James Kempf, Eric Rescorla, and Mike St. Johns. - -For the NomCom to work as it should, the pool from which the volunteers are chosen -should be as large as possible. The more people who volunteer, the better chance -we have of choosing a random yet representative cross section of the IETF population. -Volunteering for the NomCom is also a good way of serving the IETF community. -So please volunteer. - -NomCom members are barred from nomination during the year they serve, even if they -later resign. Therefore being selected for the NomCom provides complete immunity against -selection for the IAB or IESG during that year. - -People who volunteer should be sure they can the afford the time, several hours per week -for the next 4-5 months. The task basically involves the following activities: - -- Reading candidate's statements -- Participating in a weekly 2 hour conference call. -- Attending the IETF meetings held during the selection process. -- Doing several interviews. -- Speaking to IETF participants about the candidates, the job requirements, or the process. - -All NomCom deliberations and supporting information that relates to specific nominees, -candidates, and confirmed candidates are confidential. The NomCom members will be exposed -to confidential information as a result of their deliberations, their interactions with -those they consult, and from those who provide requested supporting information. -All members are expected to handle this information in a manner consistent with -its sensitivity. - -Details about the Nominations Committee process can be found in RFC 2727 and -draft-ietf-nomcom-rfc2727bis-07.txt. The 2003 NomCom will use RFC 2727 until 2727bis -is approved as an RFC, at which time we will switch (as much as possible) to 2727bis. - -To qualify as a volunteer, a person needs to have attended 2 out of the last 3 IETF meetings -(according to RFC 2727) or 3 out of the last 5 IETF meetings (according to 2727bis). -Anyone who meets either of these requirements is invited to volunteer by emailing your name, -telephone number(s), and email address to richdr@microsoft.com no later than noon in Seattle -on October 3, 2003. Please put "NOMCOM VOLUNTEER" in the subject line. - -I will check the eligibility of volunteers against both criteria and publish a up-to-date -list of verified volunteers at http://www.ietf.org/nomcom/index.html. On October 3, -I will decide whether to use the 2-of-3 or 3-of-5 rule, depending on whether 2727bis -has been approved by that date. This will result in a final list of volunteers. - -I will then run the selection process and announce the results on October 10, 2003. -Ten NomCom voting members will be chosen from the pool of volunteers according to the -procedure described by Donald Eastlake in RFC 2777, "Publicly Verifiable Nomcom Random -Selection". The source of randomness will be based on the shares-traded number of 12 stocks -selected by the NomCom chair. - -The official shares-traded numbers (denoted in 000s) will be drawn from the October 10, 2003 -Wall Street Journal which reports the sales figures from the previous trading day - October 9, -2003. If trading in any of the stocks is suspended, then the shares traded will be assumed -to be 0. - -The NomCom voting members will start their term on October 17, after the IETF community -has had a chance to review the random selection process. - -Please volunteer. - -Thank you, - -Rich Draves - -STOCKS USED IN THE NOMCOM SELECTION PROCESS: - -Motorola (MOT) -Lucent (LU) -Nortel (NT) -Liberty (L) -Pfizer (PFE) -General Electric (GE) -Nokia (NOK) -EMC Corp (EMC) -FTI Consulting (FCN) -Citigroup (C) -Corning (GLW) -Tyco International (TYC) -""") - - n.message_set.create(by=p, subject="NomCom volunteer list", time=datetime(2003,10,6), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -The final list of volunteers for the 2003 NomCom can be found at -http://www.ietf.org/nomcom. I would like to thank everyone who -volunteered. - -I will run the selection process and announce the results on October 10, -2003. Ten NomCom voting members will be chosen from the pool of -volunteers according to the procedure described by Donald Eastlake in -RFC 2777, "Publicly Verifiable Nomcom Random Selection". The source of -randomness will be based on the shares-traded number of the 12 stocks -specified below. - -At this time, 2727bis has not yet been approved as an RFC. Hence I will -use RFC 2727's eligibility criteria (attended 2 of the last 3 IETF -meetings) when performing the random selection. I will not check the -primary affiliation of the volunteers. If the RFC 2777 algorithm selects -an ineligible volunteer, I will repeat the method until I have ten -eligible and willing volunteers. - -The official shares-traded numbers (denoted in 000s) will be drawn from -the October 10, 2003 Wall Street Journal which reports the sales figures -from the previous trading day - October 9, 2003. If trading in any of -the stocks is suspended, then the shares traded will be assumed to be 0. - -The NomCom voting members will start their term on October 17, after the -IETF community has had a chance to review the random selection process. - -Thank you, - -Rich Draves - -STOCKS USED IN THE NOMCOM SELECTION PROCESS: - -Motorola (MOT) -Lucent (LU) -Nortel (NT) -Liberty (L) -Pfizer (PFE) -General Electric (GE) -Nokia (NOK) -EMC Corp (EMC) -FTI Consulting (FCN) -Citigroup (C) -Corning (GLW) -Tyco International (TYC) -""") - - n.message_set.create(by=p, subject="Selection of the Nominations Committee", time=datetime(2003,10,10), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -STOCKS USED IN THE NOMCOM SELECTION PROCESS, published result (in 100s), -number used as input (using 000s, rounded): - -Motorola (MOT) 143319 14332 -Lucent (LU) 636797 63680 -Nortel (NT) 266832 26683 -Liberty (L) 83877 8388 -Pfizer (PFE) 175698 17570 -General Electric (GE) 266052 26605 -Nokia (NOK) 137837 13784 -EMC Corp (EMC) 108120 10812 -FTI Consulting (FCN) 9765 977 -Citigroup (C) 145963 14596 -Corning (GLW) 116000 11600 -Tyco International (TYC) 107024 10702 - -Output of selection run: ------------------------- - -Type size of pool: -(or 'exit' to exit) 114 -Type number of items to be selected: -(or 'exit' to exit) 15 -Approximately 61.0 bits of entropy needed. - -Type #1 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -14332 -14332 -Type #2 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -63680 -63680 -Type #3 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -26683 -26683 -Type #4 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -8388 -8388 -Type #5 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -17570 -17570 -Type #6 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -26605 -26605 -Type #7 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -13784 -13784 -Type #8 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -10812 -10812 -Type #9 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -977 -977 -Type #10 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -14596 -14596 -Type #11 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -11600 -11600 -Type #12 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -10702 -10702 -Type #13 randomness or 'end' followed by new line. -Up to 16 integers or the word 'float' followed by up -to 16 x.y format reals. -end -Key is: -14332./63680./26683./8388./17570./26605./13784./10812./977./14596./11600./10702./ -index hex value of MD5 div selected - 1 F9B4D100A3CC11E9F996D3806ACF1E29 114 -> 56 <- - 2 319E2A14967C870FC89FDA06E21CB1A5 113 -> 44 <- - 3 2F0E1E14F6659112390388D06D5DC395 112 -> 88 <- - 4 D2D99A5EA018EF669293B370BE1F841A 111 -> 57 <- - 5 53AD4E59C1E64FBA45FD2686186DD855 110 -> 114 <- - 6 BBFF136BBE4E3580424039F6DB489300 109 -> 81 <- - 7 69748D37FC816759F04F6660672050E9 108 -> 55 <- - 8 CFE98B12654474DB49F0F224FD79AE0B 107 -> 84 <- - 9 0A7ADA8D4B330BDA96CE570E9ACACF72 106 -> 100 <- -10 B67F3A637817D2391A68FD0068D09A10 105 -> 82 <- -11 84F8A3A7EEC6C0EAB68233E3144CC892 104 -> 108 <- -12 C59B0A56531A8B9A280040E5FF9CF899 103 -> 47 <- -13 FB4AD25533FA8DC99ED7113A3A388BCD 102 -> 28 <- -14 D6CD94F1E92DAFE569FF0835063E5495 101 -> 105 <- -15 6C22311D8EB6F2298EB201DFFD1AFE22 100 -> 89 <- - -Done, type any character to exit. - ----------------------------------- -Nominations committee: -56. Kireeti Kompella -44. Abdul-jabbar Asiri -88. Jin Seek Choi -57. Richard Shockey -114. Ralph Droms -81. David E. Martin -55. NOT ELIGIBLE -84. Dan Forsberg -100. Ole J. Jacobsen -82. Basavaraj Patil -108. Andrew Thiessen -""") - - n.message_set.create(by=p, subject="NomCom Selection", time=datetime(2003,10,10), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -Please welcome the voting members of this year's nomcom: - -Kireeti Kompella -Abdul-jabbar Asiri -Jin Seek Choi -Richard Shockey -Ralph Droms -David E. Martin -Dan Forsberg -Ole J. Jacobsen -Basavaraj Patil -Andrew Thiessen - -The non-voting members are: - -Rich Draves (chair) -Phil Roberts (previous chair) -Bill Fenner (IESG liaison) - -The IAB has not yet selected its liaison - that should happen next week. - -The ISOC has appointed Brian Carpenter as its -liaison. Because 2727bis has not yet been approved, following the -procedures of RFC 2727 I will propose the addition of Brian as a -liaison, subject to the nomcom's approval. - -The nomcom's term will start on October 17, 2003, after the IETF -community has had a chance to review the selection process. - -Information on this year's selection process is available at -http://www.ietf.org/nomcom. I used the RFC 2727 eligibility rules. - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="Call for Nominees", time=datetime(2003,10,17), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -Please send the NomCom nominations for the open IESG -and IAB positions: - -IESG members whose terms are up are: -Ned Freed, Applications -Bert Wijnen, Operations and Management -Alex Zinin, Routing -Steve Bellovin, Security -Allison Mankin, Transport - -IAB members whose terms are up are: -Leslie Daigle -Patrik Faltstrom -Charlie Kaufman -James Kempf -Eric Rescorla -Mike St. Johns - -The nomination period will end at noon Pacific Time on Friday November 14. - -Any member of the IETF community may nominate any member of the IETF -community for any open position. Self-nominations are permitted. - -Please also send the NomCom your feedback on the past performance of the -incumbents. - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="NomCom members", time=datetime(2003,10,24), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -AB has appointed Geoff Huston as its non-voting liaison to the -nomcom. - -Following RFC 2727's provisions, the nomcom has voted to add Brian -Carpenter as a non-voting liaison with the ISOC board. - -To recap, the nomcom voting members are: - -Kireeti Kompella -Abdul-jabbar Asiri -Jin Seek Choi -Richard Shockey -Ralph Droms -David E. Martin -Dan Forsberg -Ole J. Jacobsen -Basavaraj Patil -Andrew Thiessen - -The non-voting members are: - -Rich Draves (chair) -Phil Roberts (previous chair) -Bill Fenner (IESG liaison) -Geoff Huston (IAB liaison) -Brian Carpenter (ISOC liaison) - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="NomCom at IETF", time=datetime(2003,11,7), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -Members of the nomcom at IETF will be happy to chat with you in person -about what the nomcom should look for in candidates for the IESG and -IAB, specific feedback about the incumbents or potential nominees, -suggestions for nominees, etc. - -Note that all such information and feedback is kept strictly -confidential within the nomcom. - -You can easily spot nomcom members because we will have orange dots on -our registration badges. Also, the nomcom will be holding "office -hours." You can drop by the "Directors Row 2" room, Tuesday through -Thursday, to find someone to chat with. Or you can always send email to -nomcom@ietf.org. - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="NomCom News", time=datetime(2003,11,14), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -Randy Bush has resigned from his position as O&M Area Director. Hence, -the nomcom will be filling Randy's position in addition to the -previously announced positions. - -Please submit nominations for Randy's O&M Area Director position to -nomcom@ietf.org. The deadline for these nominations is noon (Pacific -Time) on December 1. - -I am extending the deadline for nominations for the other positions to -noon (Pacific Time) on November 17. - -Any member of the IETF community may nominate any member of the IETF -community for any open position. Self-nominations are permitted. - -Please also send the NomCom your feedback on the past performance of the -incumbents, or feedback on potential nominees. - -All input to the nomcom will be kept strictly confidential. - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="reminder - nominations to replace Randy Bush", time=datetime(2003,11,26), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -At IETF Randy Bush resigned from his position as Operations & Management -Area Director for the IETF. This creates a mid-term vacancy that the -IETF NomCom needs to fill. Randy's replacement will have a one-year -term. - -Please submit nominations for Randy's O&M Area Director position to -nomcom@ietf.org. The deadline for these nominations is noon (Pacific -Time) on December 1. - -Any member of the IETF community may nominate any member of the IETF -community for any open position. Self-nominations are permitted. - -Please also send the NomCom your feedback on the past performance of the -incumbents, feedback on potential nominees, or your thoughts on what the -NomCom should keep in mind when considering candidates. - -All input to the nomcom will be kept strictly confidential. - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="Randy Bush replacement schedule", time=datetime(2003,12,1), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -For mid-term vacancies, RFC 2727 says "the selection and confirmation -process is expected to be completed within 1 month." However, there are -several factors that make a one-month schedule impractical in this -situation. - -1. Some nominees for Randy's O&M AD position are also under -consideration for other positions. -2. The two O&M ADs need to have complementary skills. -3. Candidates with operational experience & relationships are rare. -4. The Thanksgiving and Christmas holiday seasons. - -To have the best chance of producing a high-quality result, the NomCom -(after consulting with ISOC and the IAB as confirming body) has arrived -at the following schedule for filling Randy Bush's O&M AD position: - -1. Nominations due to NomCom by Dec 1, 2003. -2. NomCom produces confidential short-list by Dec 10. -3. NomCom makes decision by Dec 22. -4. NomCom notifies IAB on Jan 5, 2004. -5. IAB confirms (or rejects) by Jan 19. - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="Randy Bush replacement", time=datetime(2004,1,14), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -I am pleased to announce that the IAB has confirmed the NomCom's -selection of David Kessens for a one-year term as O&M Area Director, -filling the mid-term vacancy left by Randy Bush's resignation. - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="NomCom results", time=datetime(2004,2,13), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -I am pleased to announce the results of the 2003-2004 NomCom selection -process. The IAB has approved the IESG candidates and the ISOC board has -approved the IAB candidates. Please welcome them in their roles: - -The IESG selections are: -Scott Hollenbeck, Applications -Bert Wijnen, Operations and Management -Alex Zinin, Routing -Steve Bellovin, Security -Allison Mankin, Transport - -The IAB selections are: -Leslie Daigle -Patrik Faltstrom -Bob Hinden -Eric Rescorla -Pete Resnick -Jonathan Rosenberg - -Many people deserve to be thanked. First thanks are due to all of those -who volunteered to serve on the NomCom, and especially to those who were -randomly selected and served as voting members of the NomCom. They -contributed considerable time from their busy schedules to participate -in weekly calls, to conduct interviews, to read questionnaires, and to -make the selection of candidates. - -Thanks to those in the community who volunteered to serve on the IESG -and the IAB, both to those who were selected and those not chosen this -time around. Thanks very much for completing the questionnaires and -participating in interviews. - -Thanks are also due to the IETF as a whole for providing input to the -process through nominations, recommendations, and feedback on potential -candidates. - -The voting members of the nomcom are: -Kireeti Kompella -Abdul-jabbar Asiri -Jin Seek Choi -Richard Shockey -Ralph Droms -David Martin -Dan Forsberg -Ole Jacobsen -Basavaraj Patil -Andrew Thiessen - -The nonvoting members are: -Richard Draves, chair -Phil Roberts, past chair -Bill Fenner, IESG liaison -Geoff Huston, IAB liaison -Brian Carpenter, ISOC liaison - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="call for Security AD nominations", time=datetime(2004,9,28), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -Steve Bellovin has resigned from his position as Security Area Director, -effective the end of the November IETF meeting. The IESG has asked the -2003-2004 NomCom to fill the mid-term vacancy. Steve's replacement will -serve the remainder of Steve's two-year term. - -Please submit nominations for Steve's Security AD position to -nomcom03@ietf.org. The deadline for these nominations is noon (Pacific -Time) on October 11, 2004. Please include the nominee's email address or -other contact information. Feel free to comment on the nominee's -qualifications and the needs of the Security Area. - -Any member of the IETF community may nominate any member of the IETF -community. Self-nominations are permitted. - -Even if you do not wish to make a nomination, please send the NomCom any -input on the Security Area and/or potential nominees. - -All input to the NomCom will be kept strictly confidential. - -Thanks, -Rich -""") - - n.message_set.create(by=p, subject="Steve Bellovin replacement", time=datetime(2004,11,7), - frm="Richard Draves ", to="IETF Announcement list ", body=""" -I am pleased to announce that the IAB has confirmed the NomCom's -selection of Sam Hartman for a one-year term as Security Area Director, -filling the mid-term vacancy left by Steve Bellovin's resignation. - -I would like to thank everyone who volunteered their time and energy -for this process, including all the candidates, the members of the -community -who provided feedback, and the members of the nomcom. - -Thanks, -Rich -""") - - return - - -def reverse(apps, schema_editor): - n = Group.objects.filter(acronym="nomcom2002")[0] - - announcements = Message.objects.filter(related_groups=n) - announcements.delete() - - n = Group.objects.filter(acronym="nomcom2003")[0] - announcements = Message.objects.filter(related_groups=n) - announcements.delete() - - return - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0011_auto_20190225_1302'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/group/migrations/0013_add_groupmilestone_docs2_m2m.py b/ietf/group/migrations/0013_add_groupmilestone_docs2_m2m.py deleted file mode 100644 index dd1eba669..000000000 --- a/ietf/group/migrations/0013_add_groupmilestone_docs2_m2m.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-02-25 13:02 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0012_add_old_nomcom_announcements'), - ] - - operations = [ - migrations.CreateModel( - name='GroupMilestoneDocs', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id')), - ('groupmilestone', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.GroupMilestone')), - ], - ), - migrations.CreateModel( - name='GroupMilestoneHistoryDocs', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id')), - ('groupmilestonehistory', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.GroupMilestoneHistory')), - ], - ), - migrations.AddField( - model_name='group', - name='charter2', - field=ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='chartered_group', to='doc.Document', to_field='id'), - ), - migrations.AlterField( - model_name='group', - name='charter', - field=ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='old_group', to='doc.Document', to_field='name'), - ), - migrations.AddField( - model_name='groupmilestone', - name='docs2', - field=models.ManyToManyField(blank=True, related_name='groupmilestones', through='group.GroupMilestoneDocs', to='doc.Document'), - ), - migrations.AddField( - model_name='groupmilestonehistory', - name='docs2', - field=models.ManyToManyField(blank=True, related_name='groupmilestoneshistory', through='group.GroupMilestoneHistoryDocs', to='doc.Document'), - ), - ] diff --git a/ietf/group/migrations/0014_set_document_m2m_keys.py b/ietf/group/migrations/0014_set_document_m2m_keys.py deleted file mode 100644 index f886a9006..000000000 --- a/ietf/group/migrations/0014_set_document_m2m_keys.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-10 06:48 - - -import sys - -from tqdm import tqdm - -from django.db import migrations - - -def forward(apps, schema_editor): - - Document = apps.get_model('doc','Document') - GroupMilestone = apps.get_model('group', 'GroupMilestone') - GroupMilestoneDocs = apps.get_model('group', 'GroupMilestoneDocs') - GroupMilestoneHistory = apps.get_model('group', 'GroupMilestoneHistory') - GroupMilestoneHistoryDocs = apps.get_model('group', 'GroupMilestoneHistoryDocs') - - # Document id fixup ------------------------------------------------------------ - - objs = Document.objects.in_bulk() - nameid = { o.name: o.id for id, o in objs.items() } - - sys.stderr.write('\n') - - sys.stderr.write(' %s.%s:\n' % (GroupMilestone.__name__, 'docs')) - count = 0 - for m in tqdm(GroupMilestone.objects.all()): - for d in m.docs.all(): - count += 1 - GroupMilestoneDocs.objects.get_or_create(groupmilestone=m, document_id=nameid[d.name]) - sys.stderr.write(' %s GroupMilestoneDocs objects created\n' % (count, )) - - sys.stderr.write(' %s.%s:\n' % (GroupMilestoneHistory.__name__, 'docs')) - count = 0 - for m in tqdm(GroupMilestoneHistory.objects.all()): - for d in m.docs.all(): - count += 1 - GroupMilestoneHistoryDocs.objects.get_or_create(GroupMilestoneHistory=m, document_id=nameid[d.name]) - sys.stderr.write(' %s GroupMilestoneHistoryDocs objects created\n' % (count, )) - - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0013_add_groupmilestone_docs2_m2m'), - ('doc', '0014_set_document_docalias_id'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0015_1_del_docs_m2m_table.py b/ietf/group/migrations/0015_1_del_docs_m2m_table.py deleted file mode 100644 index 717eccaa7..000000000 --- a/ietf/group/migrations/0015_1_del_docs_m2m_table.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-22 08:00 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0014_set_document_m2m_keys'), - ] - - # The implementation of AlterField in Django 1.11 applies - # 'ALTER TABLE
MODIFY ...;' in order to fix foregn keys - # to the altered field, but as it seems does _not_ fix up m2m - # intermediary tables in an equivalent manner, so here we remove and - # then recreate the m2m tables so they will have the appropriate field - # types. - - operations = [ - migrations.RemoveField( - model_name='groupmilestone', - name='docs', - ), - migrations.RemoveField( - model_name='groupmilestonehistory', - name='docs', - ), - migrations.AddField( - model_name='groupmilestone', - name='docs', - field=models.ManyToManyField(to='doc.Document'), - ), - migrations.AddField( - model_name='groupmilestonehistory', - name='docs', - field=models.ManyToManyField(to='doc.Document'), - ), - ] diff --git a/ietf/group/migrations/0015_2_add_docs_m2m_table.py b/ietf/group/migrations/0015_2_add_docs_m2m_table.py deleted file mode 100644 index e7c0e3bfb..000000000 --- a/ietf/group/migrations/0015_2_add_docs_m2m_table.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-22 08:00 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0015_1_del_docs_m2m_table'), - ] - - # The implementation of AlterField in Django 1.11 applies - # 'ALTER TABLE
MODIFY ...;' in order to fix foregn keys - # to the altered field, but as it seems does _not_ fix up m2m - # intermediary tables in an equivalent manner, so here we remove and - # then recreate the m2m tables so they will have the appropriate field - # types. - - operations = [ - migrations.RemoveField( - model_name='groupmilestone', - name='docs', - ), - migrations.RemoveField( - model_name='groupmilestonehistory', - name='docs', - ), - migrations.AddField( - model_name='groupmilestone', - name='docs', - field=models.ManyToManyField(blank=True, to='doc.Document'), - ), - migrations.AddField( - model_name='groupmilestonehistory', - name='docs', - field=models.ManyToManyField(blank=True, to='doc.Document'), - ), - ] diff --git a/ietf/group/migrations/0016_copy_docs_m2m_table.py b/ietf/group/migrations/0016_copy_docs_m2m_table.py deleted file mode 100644 index 2871c34a9..000000000 --- a/ietf/group/migrations/0016_copy_docs_m2m_table.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-27 05:57 - - -import sys, time - -from tqdm import tqdm - -from django.db import migrations - - -def forward(apps, schema_editor): - - GroupMilestone = apps.get_model('group', 'GroupMilestone') - GroupMilestoneDocs = apps.get_model('group', 'GroupMilestoneDocs') - GroupMilestoneHistory = apps.get_model('group', 'GroupMilestoneHistory') - GroupMilestoneHistoryDocs = apps.get_model('group', 'GroupMilestoneHistoryDocs') - - # Document id fixup ------------------------------------------------------------ - - sys.stderr.write('\n') - - sys.stderr.write(' %s.%s:\n' % (GroupMilestone.__name__, 'docs')) - for m in tqdm(GroupMilestone.objects.all()): - m.docs.set([ d.document for d in GroupMilestoneDocs.objects.filter(groupmilestone=m) ]) - - sys.stderr.write(' %s.%s:\n' % (GroupMilestoneHistory.__name__, 'docs')) - for m in tqdm(GroupMilestoneHistory.objects.all()): - m.docs.set([ d.document for d in GroupMilestoneHistoryDocs.objects.filter(groupmilestonehistory=m) ]) - - -def reverse(apps, schema_editor): - pass - -def timestamp(apps, schema_editor): - sys.stderr.write('\n %s' % time.strftime('%Y-%m-%d %H:%M:%S')) - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0015_2_add_docs_m2m_table'), - ] - - operations = [ - #migrations.RunPython(forward, reverse), - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO group_groupmilestone_docs SELECT * FROM group_groupmilestonedocs;", - "" - ), - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO group_groupmilestonehistory_docs SELECT * FROM group_groupmilestonehistorydocs;", - "" - ), - migrations.RunPython(timestamp, timestamp), - ] diff --git a/ietf/group/migrations/0017_remove_docs2_m2m.py b/ietf/group/migrations/0017_remove_docs2_m2m.py deleted file mode 100644 index 00a44303d..000000000 --- a/ietf/group/migrations/0017_remove_docs2_m2m.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-30 03:23 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0016_copy_docs_m2m_table'), - ] - - operations = [ - migrations.RemoveField( - model_name='groupmilestonedocs', - name='document', - ), - migrations.RemoveField( - model_name='groupmilestonedocs', - name='groupmilestone', - ), - migrations.RemoveField( - model_name='groupmilestonehistorydocs', - name='document', - ), - migrations.RemoveField( - model_name='groupmilestonehistorydocs', - name='groupmilestonehistory', - ), - migrations.RemoveField( - model_name='groupmilestone', - name='docs2', - ), - migrations.RemoveField( - model_name='groupmilestonehistory', - name='docs2', - ), - migrations.DeleteModel( - name='GroupMilestoneDocs', - ), - migrations.DeleteModel( - name='GroupMilestoneHistoryDocs', - ), - ] diff --git a/ietf/group/migrations/0018_remove_old_document_field.py b/ietf/group/migrations/0018_remove_old_document_field.py deleted file mode 100644 index 5a47e545c..000000000 --- a/ietf/group/migrations/0018_remove_old_document_field.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-25 06:51 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0017_remove_docs2_m2m'), - ] - - operations = [ - migrations.RemoveField( - model_name='group', - name='charter', - ), - ] diff --git a/ietf/group/migrations/0019_rename_field_document2.py b/ietf/group/migrations/0019_rename_field_document2.py deleted file mode 100644 index 438c669d2..000000000 --- a/ietf/group/migrations/0019_rename_field_document2.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-25 06:52 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0019_rename_field_document2'), - ('group', '0018_remove_old_document_field'), - ] - - operations = [ - migrations.RenameField( - model_name='group', - old_name='charter2', - new_name='charter', - ), - ] diff --git a/ietf/group/migrations/0020_add_uses_milestone_dates.py b/ietf/group/migrations/0020_add_uses_milestone_dates.py deleted file mode 100644 index a14b49fbe..000000000 --- a/ietf/group/migrations/0020_add_uses_milestone_dates.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-30 11:41 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0019_rename_field_document2'), - ] - - operations = [ - migrations.AddField( - model_name='group', - name='uses_milestone_dates', - field=models.BooleanField(default=False), - ), - migrations.AddField( - model_name='grouphistory', - name='uses_milestone_dates', - field=models.BooleanField(default=False), - ), - ] diff --git a/ietf/group/migrations/0021_add_order_to_milestones.py b/ietf/group/migrations/0021_add_order_to_milestones.py deleted file mode 100644 index 22f40af6c..000000000 --- a/ietf/group/migrations/0021_add_order_to_milestones.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-30 13:37 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0020_add_uses_milestone_dates'), - ] - - operations = [ - migrations.AlterModelOptions( - name='groupmilestone', - options={'ordering': ['order', 'due', 'id']}, - ), - migrations.AlterModelOptions( - name='groupmilestonehistory', - options={'ordering': ['order', 'due', 'id']}, - ), - migrations.AddField( - model_name='groupmilestone', - name='order', - field=models.IntegerField(blank=True, null=True), - ), - migrations.AddField( - model_name='groupmilestonehistory', - name='order', - field=models.IntegerField(blank=True, null=True), - ), - migrations.AlterField( - model_name='groupmilestone', - name='due', - field=models.DateField(blank=True, null=True), - ), - migrations.AlterField( - model_name='groupmilestonehistory', - name='due', - field=models.DateField(blank=True, null=True), - ), - ] diff --git a/ietf/group/migrations/0022_populate_uses_milestone_dates.py b/ietf/group/migrations/0022_populate_uses_milestone_dates.py deleted file mode 100644 index a7b7d3eaa..000000000 --- a/ietf/group/migrations/0022_populate_uses_milestone_dates.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-30 11:42 - - -from django.db import migrations - -def forward(apps, schema_editor): - Group = apps.get_model('group','Group') - GroupHistory = apps.get_model('group','GroupHistory') - - Group.objects.filter(type__features__has_milestones=True).update(uses_milestone_dates=True) - GroupHistory.objects.filter(type__features__has_milestones=True).update(uses_milestone_dates=True) - -def reverse(apps, schema_editor): - Group = apps.get_model('group','Group') - GroupHistory = apps.get_model('group','GroupHistory') - - Group.objects.filter(type__features__has_milestones=True).update(uses_milestone_dates=False) - GroupHistory.objects.filter(type__features__has_milestones=True).update(uses_milestone_dates=False) - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0021_add_order_to_milestones'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/group/migrations/0023_use_milestone_dates_default_to_true.py b/ietf/group/migrations/0023_use_milestone_dates_default_to_true.py deleted file mode 100644 index 440fce54a..000000000 --- a/ietf/group/migrations/0023_use_milestone_dates_default_to_true.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright The IETF Trust 2020, All Rights Reserved -# Generated by Django 1.11.28 on 2020-02-11 07:47 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0022_populate_uses_milestone_dates'), - ] - - operations = [ - migrations.AlterField( - model_name='group', - name='uses_milestone_dates', - field=models.BooleanField(default=True), - ), - migrations.AlterField( - model_name='grouphistory', - name='uses_milestone_dates', - field=models.BooleanField(default=True), - ), - ] diff --git a/ietf/group/migrations/0024_add_groupman_authroles.py b/ietf/group/migrations/0024_add_groupman_authroles.py deleted file mode 100644 index 5c6461805..000000000 --- a/ietf/group/migrations/0024_add_groupman_authroles.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-05-04 13:10 -from __future__ import unicode_literals - -from django.db import migrations -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0023_use_milestone_dates_default_to_true'), - ] - - operations = [ - migrations.AddField( - model_name='groupfeatures', - name='groupman_authroles', - field=jsonfield.fields.JSONField(default=['Secretariat'], max_length=128), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='groupman_authroles', - field=jsonfield.fields.JSONField(default=['Secretariat'], max_length=128), - ), - ] diff --git a/ietf/group/migrations/0025_populate_groupman_authroles.py b/ietf/group/migrations/0025_populate_groupman_authroles.py deleted file mode 100644 index d024c8bd2..000000000 --- a/ietf/group/migrations/0025_populate_groupman_authroles.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-05-01 12:54 -from __future__ import unicode_literals - -from django.db import migrations - -authroles_map = { - 'adhoc': ['Secretariat'], - 'admin': ['Secretariat'], - 'ag': ['Secretariat', 'Area Director'], - 'area': ['Secretariat'], - 'dir': ['Secretariat'], - 'iab': ['Secretariat'], - 'iana': ['Secretariat'], - 'iesg': ['Secretariat'], - 'ietf': ['Secretariat'], - 'individ': [], - 'irtf': ['Secretariat'], - 'ise': ['Secretariat'], - 'isoc': ['Secretariat'], - 'nomcom': ['Secretariat'], - 'program': ['Secretariat', 'IAB'], - 'review': ['Secretariat'], - 'rfcedtyp': ['Secretariat'], - 'rg': ['Secretariat', 'IRTF Chair'], - 'sdo': ['Secretariat'], - 'team': ['Secretariat'], - 'wg': ['Secretariat', 'Area Director'], -} - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - for type_id, authroles in authroles_map.items(): - GroupFeatures.objects.filter(type_id=type_id).update(groupman_authroles=authroles) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0024_add_groupman_authroles'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0026_programs_meet.py b/ietf/group/migrations/0026_programs_meet.py deleted file mode 100644 index 4fb6fda06..000000000 --- a/ietf/group/migrations/0026_programs_meet.py +++ /dev/null @@ -1,36 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-05-01 12:54 -from __future__ import unicode_literals - -from django.db import migrations - - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - program = GroupFeatures.objects.get(type_id='program') - program.has_meetings = True - program.matman_roles = ['lead', 'chair', 'secr'] - program.docman_roles = ['lead', 'chair', 'secr'] - program.groupman_roles = ['lead', 'chair', 'secr'] - program.role_order = ['lead', 'chair', 'secr'] - program.save() - -def reverse(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - program = GroupFeatures.objects.get(type_id='program') - program.has_meetings = False - program.matman_roles = ['lead', 'secr'] - program.docman_roles = ['lead', 'secr'] - program.groupman_roles = ['lead', 'secr'] - program.role_order = ['lead', 'secr'] - program.save() - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0025_populate_groupman_authroles'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0027_programs_have_parents.py b/ietf/group/migrations/0027_programs_have_parents.py deleted file mode 100644 index d05d02009..000000000 --- a/ietf/group/migrations/0027_programs_have_parents.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-05-08 09:02 -from __future__ import unicode_literals - -from django.db import migrations - -def forward(apps, schema_editor): - Group = apps.get_model('group','Group') - iab = Group.objects.get(acronym='iab') - Group.objects.filter(type_id='program').update(parent=iab) - -def reverse(apps, schema_editor): - pass # No point in removing the parents - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0026_programs_meet'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0028_add_robots.py b/ietf/group/migrations/0028_add_robots.py deleted file mode 100644 index ab4c8749b..000000000 --- a/ietf/group/migrations/0028_add_robots.py +++ /dev/null @@ -1,72 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-05-01 12:54 -from __future__ import unicode_literals - -from django.db import migrations -from django.utils.text import slugify - -robots = [ - ('Mail Archive', '/api/v2/person/person', 'secretariat', 'mailarchive@ietf.org'), - ('Registration System', '/api/notify/meeting/registration', 'secretariat', 'registration@ietf.org'), -] - -def forward(apps, schema_editor): - RoleName = apps.get_model('name', 'RoleName') - Role = apps.get_model('group', 'Role') - Group = apps.get_model('group', 'Group') - User = apps.get_model('auth', 'User') - Person = apps.get_model('person', 'Person') - Email = apps.get_model('person', 'Email') - PersonalApiKey = apps.get_model('person', 'PersonalApiKey') - # - rname, __ = RoleName.objects.get_or_create(slug='robot') - # - for (name, endpoint, acronym, address) in robots: - first_name, last_name = name.rsplit(None, 1) - user, created = User.objects.get_or_create(username=slugify(name)) - if created: - user.first_name=first_name - user.last_name=last_name - user.is_staff=True - user.is_active=True - user.save() - # - person, created = Person.objects.get_or_create(name=name) - if created: - person.user = user - person.ascii = name - person.consent = True - person.save() - else: - assert person.user == user - # - email, created = Email.objects.get_or_create(address=address) - if created: - email.origin = 'registration' - email.person = person - email.active = True - email.save() - else: - assert email.person == person - # - group = Group.objects.get(acronym=acronym) - role, created = Role.objects.get_or_create(person=person, name=rname, group=group, email=email) - # - key, created = PersonalApiKey.objects.get_or_create(person=person, endpoint=endpoint, valid=True) - -def reverse(apps, schema_editor): - Person = apps.get_model('person', 'Person') - for (name, endpoint, acronym, address) in robots: - deleted = Person.objects.filter(name=name).delete() - print('deleted: %s' % deleted) - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0027_programs_have_parents'), - ('name', '0012_role_name_robots'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0029_add_used_roles_and_default_used_roles.py b/ietf/group/migrations/0029_add_used_roles_and_default_used_roles.py deleted file mode 100644 index 6f4a562c6..000000000 --- a/ietf/group/migrations/0029_add_used_roles_and_default_used_roles.py +++ /dev/null @@ -1,34 +0,0 @@ -# Generated by Django 2.0.13 on 2020-05-22 12:00 - -from django.db import migrations -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0028_add_robots'), - ] - - operations = [ - migrations.AddField( - model_name='group', - name='used_roles', - field=jsonfield.fields.JSONField(default=[], help_text="Leave an empty list to get the group_type's default used roles", max_length=128), - ), - migrations.AddField( - model_name='groupfeatures', - name='default_used_roles', - field=jsonfield.fields.JSONField(default=[], max_length=128), - ), - migrations.AddField( - model_name='grouphistory', - name='used_roles', - field=jsonfield.fields.JSONField(default=[], help_text="Leave an empty list to get the group_type's default used roles", max_length=128), - ), - migrations.AddField( - model_name='historicalgroupfeatures', - name='default_used_roles', - field=jsonfield.fields.JSONField(default=[], max_length=128), - ), - ] diff --git a/ietf/group/migrations/0030_populate_default_used_roles.py b/ietf/group/migrations/0030_populate_default_used_roles.py deleted file mode 100644 index e6ba3a0fc..000000000 --- a/ietf/group/migrations/0030_populate_default_used_roles.py +++ /dev/null @@ -1,46 +0,0 @@ -# Generated by Django 2.0.13 on 2020-05-22 11:41 - -from django.db import migrations - -grouptype_defaults = { - 'adhoc': ['matman', 'ad', 'chair', 'lead'], - 'admin': ['member', 'chair'], - 'ag': ['ad', 'chair', 'secr'], - 'area': ['ad'], - 'dir': ['ad', 'chair', 'reviewer', 'secr'], - 'review': ['ad', 'chair', 'reviewer', 'secr'], - 'iab': ['chair'], - 'iana': ['auth'], - 'iesg': [], - 'ietf': ['ad', 'member', 'comdir', 'delegate', 'execdir', 'recman', 'secr', 'trac-editor', 'trac-admin', 'chair'], - 'individ': ['ad'], - 'irtf': ['member', 'atlarge', 'chair'], - 'ise': ['chair'], - 'isoc': ['chair', 'ceo'], - 'nomcom': ['member', 'advisor', 'liaison', 'chair', 'techadv'], - 'program': ['member', 'chair', 'lead'], - 'rfcedtyp': ['auth', 'chair'], - 'rg': ['chair', 'techadv', 'secr', 'delegate'], - 'sdo': ['liaiman', 'ceo', 'coord', 'auth', 'chair'], - 'team': ['ad', 'member', 'delegate', 'secr', 'liaison', 'atlarge', 'chair', 'matman', 'techadv'], - 'wg': ['ad', 'editor', 'delegate', 'secr', 'chair', 'matman', 'techadv'], -} - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group','GroupFeatures') - for type_id, roles in grouptype_defaults.items(): - GroupFeatures.objects.filter(type_id=type_id).update(default_used_roles=roles) - -def reverse(apps, schema_editor): - pass # intentional - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0029_add_used_roles_and_default_used_roles'), - ('stats', '0003_meetingregistration_attended'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0031_allow_blank_used_roles.py b/ietf/group/migrations/0031_allow_blank_used_roles.py deleted file mode 100644 index 331727f6f..000000000 --- a/ietf/group/migrations/0031_allow_blank_used_roles.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.0.13 on 2020-06-15 11:10 - -from django.db import migrations -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0030_populate_default_used_roles'), - ] - - operations = [ - migrations.AlterField( - model_name='group', - name='used_roles', - field=jsonfield.fields.JSONField(blank=True, default=[], help_text="Leave an empty list to get the group_type's default used roles", max_length=128), - ), - migrations.AlterField( - model_name='grouphistory', - name='used_roles', - field=jsonfield.fields.JSONField(blank=True, default=[], help_text="Leave an empty list to get the group_type's default used roles", max_length=128), - ), - ] diff --git a/ietf/group/migrations/0032_add_meeting_seen_as_area.py b/ietf/group/migrations/0032_add_meeting_seen_as_area.py deleted file mode 100644 index 9be9ebe0f..000000000 --- a/ietf/group/migrations/0032_add_meeting_seen_as_area.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright The IETF Trust 2020', 'All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-02-12 07:11 -from __future__ import unicode_literals - -from django.db import migrations, models - - -def forward(apps, schema_editor): - Group = apps.get_model('group', 'Group') - initial_area_groups = ['dispatch', 'gendispatch', 'intarea', 'opsarea', 'opsawg', 'rtgarea', 'rtgwg', 'saag', 'secdispatch', 'tsvarea', 'irtfopen'] - Group.objects.filter(acronym__in=initial_area_groups).update(meeting_seen_as_area=True) - - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0031_allow_blank_used_roles'), - ] - - operations = [ - migrations.AddField( - model_name='group', - name='meeting_seen_as_area', - field=models.BooleanField(default=False, help_text='For meeting scheduling, should be considered an area meeting, even if the type is WG'), - ), - migrations.AddField( - model_name='grouphistory', - name='meeting_seen_as_area', - field=models.BooleanField(default=False, help_text='For meeting scheduling, should be considered an area meeting, even if the type is WG'), - ), - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0033_extres.py b/ietf/group/migrations/0033_extres.py deleted file mode 100644 index 2e3d037a2..000000000 --- a/ietf/group/migrations/0033_extres.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-04-15 10:20 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0014_extres'), - ('group', '0032_add_meeting_seen_as_area'), - ] - - operations = [ - migrations.CreateModel( - name='GroupExtResource', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('display_name', models.CharField(blank=True, default='', max_length=255)), - ('value', models.CharField(max_length=2083)), - ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceName')), - ], - ), - ] diff --git a/ietf/group/migrations/0034_populate_groupextresources.py b/ietf/group/migrations/0034_populate_groupextresources.py deleted file mode 100644 index a8c0e1b98..000000000 --- a/ietf/group/migrations/0034_populate_groupextresources.py +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-03-19 13:06 -from __future__ import unicode_literals - -import re - -import debug # pyflakes:ignore - -from collections import OrderedDict, Counter -from io import StringIO - -from django.db import migrations -from django.core.exceptions import ValidationError - - -from ietf.utils.validators import validate_external_resource_value - -name_map = { - "Issue.*": "tracker", - ".*FAQ.*": "faq", - ".*Area Web Page": "webpage", - ".*Wiki": "wiki", - "Home Page": "webpage", - "Slack.*": "slack", - "Additional .* Web Page": "webpage", - "Additional .* Page": "webpage", - "Yang catalog entry.*": "yc_entry", - "Yang impact analysis.*": "yc_impact", - "GitHub": "github_repo", - "Github page": "github_repo", - "GitHub repo.*": "github_repo", - "Github repository.*": "github_repo", - "GitHub org.*": "github_org", - "GitHub User.*": "github_username", - "GitLab User": "gitlab_username", - "GitLab User Name": "gitlab_username", -} - -url_map = OrderedDict({ - "https?://github\\.com": "github_repo", - "https?://trac\\.ietf\\.org/.*/wiki": "wiki", - "ietf\\.org.*/trac/wiki": "wiki", - "trac.*wiki": "wiki", - "www\\.ietf\\.org/mailman" : "mailing_list", - "www\\.ietf\\.org/mail-archive" : "mailing_list_archive", - "ietf\\.org/logs": "jabber_log", - "ietf\\.org/jabber/logs": "jabber_log", - "xmpp:.*?join": "jabber_room", - "https?://.*": "webpage" -}) - -def forward(apps, schema_editor): - GroupExtResource = apps.get_model('group', 'GroupExtResource') - ExtResourceName = apps.get_model('name', 'ExtResourceName') - GroupUrl = apps.get_model('group', 'GroupUrl') - - stats = Counter() - stats_file = StringIO() - - for group_url in GroupUrl.objects.all(): - group_url.url = group_url.url.strip() - match_found = False - for regext,slug in name_map.items(): - if re.fullmatch(regext, group_url.name): - match_found = True - stats['mapped'] += 1 - name = ExtResourceName.objects.get(slug=slug) - try: - validate_external_resource_value(name, group_url.url) - GroupExtResource.objects.create(group=group_url.group, name_id=slug, value=group_url.url, display_name=group_url.name) - except ValidationError as e: # pyflakes:ignore - print("Failed validation:", group_url.url, e, file=stats_file) - stats['failed_validation'] +=1 - break - if not match_found: - for regext, slug in url_map.items(): - if re.search(regext, group_url.url): - match_found = True - if slug: - stats['mapped'] +=1 - name = ExtResourceName.objects.get(slug=slug) - # Munge the URL if it's the first github repo match - # Remove "/tree/master" substring if it exists - # Remove trailing "/issues" substring if it exists - # Remove "/blob/master/.*" pattern if present - if regext == "https?://github\\.com": - group_url.url = group_url.url.replace("/tree/master","") - group_url.url = re.sub('/issues$', '', group_url.url) - group_url.url = re.sub('/blob/master.*$', '', group_url.url) - try: - validate_external_resource_value(name, group_url.url) - GroupExtResource.objects.create(group=group_url.group, name=name, value=group_url.url, display_name=group_url.name) - except ValidationError as e: # pyflakes:ignore - print("Failed validation:", group_url.url, e, file=stats_file) - stats['failed_validation'] +=1 - else: - stats['ignored'] +=1 - break - if not match_found: - print("Not Mapped:",group_url.group.acronym, group_url.name, group_url.url, file=stats_file) - stats['not_mapped'] += 1 - print('') - print(stats_file.getvalue()) - print(stats) - -def reverse(apps, schema_editor): - GroupExtResource = apps.get_model('group', 'GroupExtResource') - GroupExtResource.objects.all().delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0033_extres'), - ('name', '0015_populate_extres'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/group/migrations/0035_add_research_area_groups.py b/ietf/group/migrations/0035_add_research_area_groups.py deleted file mode 100644 index 212ef30f7..000000000 --- a/ietf/group/migrations/0035_add_research_area_groups.py +++ /dev/null @@ -1,56 +0,0 @@ -# Generated by Django 2.2.14 on 2020-07-28 09:30 - -from django.db import migrations - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group','GroupFeatures') - GroupFeatures.objects.create( - about_page = 'ietf.group.views.group_about', - acts_like_wg = True, - admin_roles = ['chair'], - agenda_type_id = 'ietf', - create_wiki = True, - custom_group_roles = True, - customize_workflow = False, - default_tab = 'ietf.group.views.group_about', - default_used_roles = ['chair', 'secr'], - docman_roles = ['chair', 'delegate', 'secr'], - groupman_authroles = ['Secretariat', 'IRTF Chair'], - groupman_roles = ['chair', 'delegate'], - has_chartering_process = False, - has_default_jabber = False, - has_documents = True, - has_meetings = True, - has_milestones = False, - has_nonsession_materials = False, - has_reviews = False, - has_session_materials = True, - is_schedulable = True, - material_types = ['slides'], - matman_roles = ['chair', 'delegate', 'secr'], - req_subm_approval = True, - role_order = ['chair', 'secr'], - show_on_agenda = True, - type_id = 'rag', - ) - - Group = apps.get_model('group','Group') - Group.objects.filter(type_id='ag',parent__acronym='irtf').update(type_id='rag') - -def reverse(apps, schema_editor): - Group = apps.get_model('group','Group') - Group.objects.filter(type_id='rag',parent__acronym='irtf').update(type_id='ag') - - GroupFeatures = apps.get_model('group','GroupFeatures') - GroupFeatures.objects.filter(type_id='rag').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0034_populate_groupextresources'), - ('name', '0016_add_research_area_groups'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/group/migrations/0036_orgs_vs_repos.py b/ietf/group/migrations/0036_orgs_vs_repos.py deleted file mode 100644 index b764b86f4..000000000 --- a/ietf/group/migrations/0036_orgs_vs_repos.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved - -from urllib.parse import urlparse -from django.db import migrations - -def categorize(url): - # This will categorize a few urls pointing into files in a repo as a repo, but that's better than calling them an org - element_count = len(urlparse(url).path.strip('/').split('/')) - if element_count < 1: - print("Bad github resource:",url) - return 'github_org' if element_count == 1 else 'github_repo' - -def forward(apps, schema_editor): - GroupExtResource = apps.get_model('group','GroupExtResource') - - for resource in GroupExtResource.objects.filter(name_id__in=('github_org','github_repo',)): - category = categorize(resource.value) - if resource.name_id != category: - resource.name_id = category - resource.save() - -def reverse(apps, schema_editor): - # Intentionally don't try to return to former worse state - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0035_add_research_area_groups'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0037_initial_yc_roles.py b/ietf/group/migrations/0037_initial_yc_roles.py deleted file mode 100644 index 20eb471d6..000000000 --- a/ietf/group/migrations/0037_initial_yc_roles.py +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright The IETF Trust 2020 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - RoleName = apps.get_model('name','RoleName') - Group = apps.get_model('group','Group') - Role = apps.get_model('group','Role') - Person = apps.get_model('person','Person') - - RoleName.objects.create( - slug = 'yc_operator', - name = 'YangCatalog Operator', - desc = 'Can grant user api rights and browse the YangCatalog directory structure', - ) - - ycsupport = Group.objects.create( - acronym='ycsupport', - name="YangCatalog Support", - state_id='active', - type_id='team', - parent = Group.objects.get(acronym='ops'), - description = "Team for supporting YangCatalog.org operations", - ) - - RoleName.objects.create( - slug = 'yc_admin', - name = 'YangCatalog Administrator', - desc = 'Can operate the YangCatalog, change its configuration, and edit its data', - ) - - for name,role_name_id in ( - ('Robert Sparks','yc_operator'), - ('Benoit Claise','yc_operator'), - ('Eric Vyncke','yc_operator'), - ('Miroslav Kovac','yc_admin'), - ('Slavomir Mazur','yc_admin'), - ): - person = Person.objects.get(name=name) - email = person.email_set.filter(primary=True).first() - if not email: - email = person.email_set.filter(active=True).order_by("-time").first() - Role.objects.create( - name_id = role_name_id, - group = ycsupport, - person = person, - email = email, - ) - -def reverse(apps, schema_editor): - RoleName = apps.get_model('name','RoleName') - Group = apps.get_model('group','Group') - Role = apps.get_model('group','Role') - - Role.objects.filter(name_id__in = ( 'yc_operator' , 'yc_admin' )).delete() - Group.objects.filter(acronym='ycsupport').delete() - RoleName.objects.filter(slug__in=( 'yc_operator' , 'yc_admin' )).delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0036_orgs_vs_repos'), - ('name', '0020_add_rescheduled_session_name'), - ('person','0016_auto_20200807_0750'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0038_auto_20201109_0439.py b/ietf/group/migrations/0038_auto_20201109_0439.py deleted file mode 100644 index 26bfd03ed..000000000 --- a/ietf/group/migrations/0038_auto_20201109_0439.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0037_initial_yc_roles'), - ] - - operations = [ - migrations.AddIndex( - model_name='groupevent', - index=models.Index(fields=['-time', '-id'], name='group_group_time_ee7c7c_idx'), - ), - ] diff --git a/ietf/group/migrations/0039_remove_historicalgroupfeatures.py b/ietf/group/migrations/0039_remove_historicalgroupfeatures.py deleted file mode 100644 index 669cde875..000000000 --- a/ietf/group/migrations/0039_remove_historicalgroupfeatures.py +++ /dev/null @@ -1,48 +0,0 @@ -# Generated by Django 2.2.17 on 2020-12-18 08:54 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0038_auto_20201109_0439'), - ] - - operations = [ - migrations.DeleteModel( - name='HistoricalGroupFeatures', - ), - ] - -# In case these are ever needed again, here's what had been captured. -# Note that many of the values are not well formed as JSONFields and need to be manually corrected if they are brought back. -# -# -- Table structure for table `group_historicalgroupfeatures` -# DROP TABLE IF EXISTS `group_historicalgroupfeatures`; -# CREATE TABLE `group_historicalgroupfeatures` ( -# KEY `group_historicalgroupfeatures_agenda_type_id_089e752b` (`agenda_type_id`), -# KEY `group_historicalgroupfeatures_history_user_id_0d1368d2` (`history_user_id`), -# KEY `group_historicalgroupfeatures_type_id_4ed21f10` (`type_id`) -# -- Dumping data for table `group_historicalgroupfeatures` -# LOCK TABLES `group_historicalgroupfeatures` WRITE; -# /*!40000 ALTER TABLE `group_historicalgroupfeatures` DISABLE KEYS */; -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,1,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','slides','chair,lead',1,NULL,'2018-07-15 08:23:57.183851','~','ietf',433,'ietf',0,0,0,0,0,'chair,secr,member',0,0,'ad,chair,delegate,secr','[\"ad\",\"chair\",\"delegate\",\"secr\"]','[\"ad\",\"chair\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,0,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','slides','ad',2,NULL,'2018-07-19 13:07:33.440449','~','ietf',433,'area',0,0,0,0,0,'chair,secr,member',0,0,'ad,chair,delegate,secr','[\"ad\",\"chair\",\"delegate\",\"secr\"]','[\"ad\",\"chair\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,1,0,1,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\"]',3,NULL,'2019-02-04 07:41:05.566267','~','ietf',433,'ag',1,1,1,1,1,'[\"chair\",\"secr\"]',1,1,'[\"ad\",\"chair\",\"delegate\",\"secr\"]','[\"chair\",\"delegate\",\"secr\"]','[\"ad\",\"chair\",\"delegate\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,1,0,1,0,'ietf.group.views.group_about','ietf.group.views.group_about','\"[\\\"slides\\\"]\"','\"[\\\"chair\\\"]\"',4,NULL,'2019-03-07 14:32:17.595737','~','ietf',433,'adhoc',0,1,0,1,1,'\"[\\\"chair\\\",\\\"delegate\\\",\\\"matman\\\"]\"',1,1,'\"[\\\"chair\\\",\\\"delegate\\\",\\\"matman\\\"]\"','\"[\\\"chair\\\"]\"','\"[\\\"chair\\\",\\\"delegate\\\"]\"','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,1,0,1,0,'ietf.group.views.group_about','ietf.group.views.group_about','\"[\\\"slides\\\"]\"','\"[\\\"chair\\\"]\"',5,NULL,'2019-03-07 15:13:37.631043','~','ietf',433,'adhoc',0,1,0,1,1,'\"[\\\"chair\\\",\\\"lead\\\",\\\"delegate\\\",\\\"matman\\\"]\"',1,1,'\"[\\\"chair\\\",\\\"lead\\\",\\\"delegate\\\",\\\"matman\\\"]\"','\"[\\\"chair\\\"]\"','\"[\\\"chair\\\",\\\"lead\\\",\\\"delegate\\\"]\"','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,1,1,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\"]',6,NULL,'2019-03-13 11:02:32.696034','~','ietf',433,'team',0,1,1,0,0,'[\"chair\",\"member\",\"matman\"]',0,0,'[\"chair\",\"matman\"]','[\"chair\"]','[\"chair\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,1,1,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\"]',7,NULL,'2019-03-13 13:59:38.964013','~','ietf',433,'team',0,1,1,0,0,'[\"chair\",\"member\",\"matman\"]',0,0,'[\"chair\",\"matman\"]','[\"chair\"]','[\"chair\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,1,0,1,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\"]',8,NULL,'2019-03-13 14:02:03.061530','~','ietf',433,'adhoc',0,1,0,1,1,'[\"chair\",\"lead\",\"delegate\",\"matman\"]',1,1,'[\"chair\",\"lead\",\"delegate\",\"matman\"]','[\"chair\"]','[\"chair\",\"lead\",\"delegate\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,0,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','\"[]\"','[\"chair\"]',9,NULL,'2019-03-13 14:04:12.810180','~','ad',433,'iesg',0,0,1,0,0,'[\"chair\",\"delegate\",\"member\"]',0,1,'[\"chair\",\"delegate\",\"member\"]','[\"chair\"]','[\"chair\",\"delegate\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,0,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\",\"lead\"]',10,NULL,'2019-03-13 14:05:47.617726','~','ad',433,'ise',0,0,1,0,0,'[\"chair\",\"delegate\"]',0,1,'[\"chair\",\"delegate\"]','[\"chair\"]','[\"chair\",\"delegate\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (1,1,1,0,1,0,1,1,'ietf.group.views.group_about','ietf.group.views.group_documents','[\"slides\"]','[\"chair\"]',11,NULL,'2019-04-23 04:11:30.770056','~','ietf',433,'rg',1,1,0,1,1,'[\"chair\",\"delegate\",\"secr\"]',1,1,'[\"chair\",\"delegate\",\"secr\"]','[\"chair\",\"delegate\",\"secr\"]','[\"chair\",\"delegate\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (1,0,1,0,0,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"lead\"]',12,NULL,'2019-04-24 04:03:41.967314','~','ad',433,'program',0,0,1,0,0,'[\"lead\",\"secr\"]',0,0,'[\"lead\",\"secr\"]','[\"lead\",\"secr\"]','[\"lead\",\"secr\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,0,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\",\"advisor\"]',13,NULL,'2019-04-29 04:44:26.522936','~','side',433,'nomcom',0,1,1,0,0,'[\"chair\",\"member\",\"advisor\"]',0,1,'[\"chair\"]','[\"chair\"]','[\"chair\",\"advisor\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,0,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\"]',14,NULL,'2019-06-26 13:28:11.695889','+','ietf',433,'admin',0,0,0,0,0,'[\"chair\"]',0,0,'[\"chair\"]','[\"chair\"]','[\"chair\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,0,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\"]',15,NULL,'2019-06-26 13:29:29.706999','+','ietf',433,'iana',0,0,0,0,0,'[\"chair\"]',0,0,'[\"chair\"]','[\"chair\"]','[\"chair\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,1,0,0,0,0,0,'ietf.group.views.group_about','ietf.group.views.group_about','[\"slides\"]','[\"chair\",\"lead\"]',16,NULL,'2019-07-17 04:20:03.049554','~','ad',433,'ise',0,0,1,0,0,'[\"chair\",\"delegate\"]',0,1,'[\"chair\",\"delegate\"]','[\"chair\"]','[\"chair\",\"delegate\"]','[\"Secretariat\"]','[]'); -# INSERT INTO `group_historicalgroupfeatures` (`has_milestones`, `has_chartering_process`, `has_documents`, `has_nonsession_materials`, `has_meetings`, `has_reviews`, `has_default_jabber`, `customize_workflow`, `about_page`, `default_tab`, `material_types`, `admin_roles`, `history_id`, `history_change_reason`, `history_date`, `history_type`, `agenda_type_id`, `history_user_id`, `type_id`, `acts_like_wg`, `create_wiki`, `custom_group_roles`, `has_session_materials`, `is_schedulable`, `role_order`, `show_on_agenda`, `req_subm_approval`, `matman_roles`, `docman_roles`, `groupman_roles`, `groupman_authroles`, `default_used_roles`) VALUES (0,0,0,0,1,1,0,0,'ietf.group.views.group_about','ietf.group.views.review_requests','[\n \"slides\"\n]','[\n \"chair\",\n \"secr\"\n]',17,NULL,'2020-11-23 10:19:39.119039','~','ietf',420,'review',0,1,1,0,0,'[\n \"chair\",\n \"secr\"\n]',0,1,'[\n \"ad\",\n \"secr\"\n]','[\n \"secr\"\n]','[\n \"ad\",\n \"secr\"\n]','[\n \"Secretariat\"\n]','[\n \"ad\",\n \"chair\",\n \"reviewer\",\n \"secr\"\n]'); -# /*!40000 ALTER TABLE `group_historicalgroupfeatures` ENABLE KEYS */; -# \ No newline at end of file diff --git a/ietf/group/migrations/0040_lengthen_used_roles_fields.py b/ietf/group/migrations/0040_lengthen_used_roles_fields.py deleted file mode 100644 index d33310495..000000000 --- a/ietf/group/migrations/0040_lengthen_used_roles_fields.py +++ /dev/null @@ -1,35 +0,0 @@ -# Generated by Django 2.2.17 on 2020-12-11 08:48 - -from django.db import migrations -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0039_remove_historicalgroupfeatures'), - ] - - operations = [ - migrations.AlterField( - model_name='group', - name='used_roles', - field=jsonfield.fields.JSONField(blank=True, default=[], help_text="Leave an empty list to get the group_type's default used roles", max_length=256), - ), - migrations.AlterField( - model_name='groupfeatures', - name='default_used_roles', - field=jsonfield.fields.JSONField(default=[], max_length=256), - ), - migrations.AlterField( - model_name='grouphistory', - name='used_roles', - field=jsonfield.fields.JSONField(blank=True, default=[], help_text="Leave an empty list to get the group_type's default used roles", max_length=256), - ), - # historicalgroupfeatures has been removed - # migrations.AlterField( - # model_name='historicalgroupfeatures', - # name='default_used_roles', - # field=jsonfield.fields.JSONField(default=[], max_length=256), - # ), - ] diff --git a/ietf/group/migrations/0041_create_liaison_contact_roles.py b/ietf/group/migrations/0041_create_liaison_contact_roles.py deleted file mode 100644 index 0194cc077..000000000 --- a/ietf/group/migrations/0041_create_liaison_contact_roles.py +++ /dev/null @@ -1,158 +0,0 @@ -# Generated by Django 2.2.17 on 2020-12-09 06:59 - -from django.db import migrations - -from ietf.person.name import plain_name -from ietf.utils.mail import parseaddr - - -def find_or_create_email(email_model, person_model, formatted_email, group): - """Look up an email address or create if needed - - Also creates a Person if the email does not have one. Created Email will have - the origin field set to the origin parameter to this method. - """ - name, address = parseaddr(formatted_email) - if not address: - raise ValueError('Could not parse email "%s"' % formatted_email) - email, _ = email_model.objects.get_or_create( - address=address, - defaults=dict(origin='liaison contact: ' + group.acronym) - ) - - if not email.person: - person = person_model.objects.create(name=name if name else address) - email.person = person - email.save() - - # Display an alert if the formatted address sent from the Role will differ - # from what was in the original contacts list - if not email.person.plain and email.person.name == email.address: - recreated_contact_email = email.address - else: - person_plain = email.person.plain if email.person.plain else plain_name(email.person.name) - recreated_contact_email = "%s <%s>" % (person_plain, email.address) - if recreated_contact_email != formatted_email: - print('>> Note: address "%s" is now "%s" (%s)' % ( - formatted_email, - recreated_contact_email, - group.acronym, - )) - return email - - -def forward(apps, schema_editor): - """Perform forward migration - - Creates liaison_contact and liaison_cc_contact Roles corresponding to existing - LiaisonStatementGroupContact instances. - """ - Group = apps.get_model('group', 'Group') - Role = apps.get_model('group', 'Role') - Email = apps.get_model('person', 'Email') - Person = apps.get_model('person', 'Person') - - RoleName = apps.get_model('name', 'RoleName') - contact_role_name = RoleName.objects.get(slug='liaison_contact') - cc_contact_role_name = RoleName.objects.get(slug='liaison_cc_contact') - - print() - LiaisonStatementGroupContacts = apps.get_model('liaisons', 'LiaisonStatementGroupContacts') - for lsgc in LiaisonStatementGroupContacts.objects.all(): - group = lsgc.group - for contact_email in lsgc.contacts.split(','): - if contact_email: - email = find_or_create_email(Email, Person, - contact_email.strip(), - group) - Role.objects.create( - group=group, - name=contact_role_name, - person=email.person, - email=email, - ) - - for contact_email in lsgc.cc_contacts.split(','): - if contact_email: - email = find_or_create_email(Email, Person, - contact_email.strip(), - group) - Role.objects.create( - group=group, - name=cc_contact_role_name, - person=email.person, - email=email, - ) - - # Now validate that we got them all. As much as possible, use independent code - # to avoid replicating any bugs from the original migration. - for group in Group.objects.all(): - lsgc = LiaisonStatementGroupContacts.objects.filter(group_id=group.pk).first() - - if not lsgc: - if group.role_set.filter(name__in=[contact_role_name, cc_contact_role_name]).exists(): - raise ValueError('%s group has contact roles after migration but had no LiaisonStatementGroupContacts' % ( - group.acronym, - )) - else: - contacts = group.role_set.filter(name=contact_role_name) - num_lsgc_contacts = len(lsgc.contacts.split(',')) if lsgc.contacts else 0 - if len(contacts) != num_lsgc_contacts: - raise ValueError( - '%s group has %d contact(s) but only %d address(es) in its LiaisonStatementGroupContacts (contact addresses = "%s", LSGC.contacts="%s")' % ( - group.acronym, len(contacts), num_lsgc_contacts, - '","'.join([c.email.address for c in contacts]), - lsgc.contacts, - ) - ) - for contact in contacts: - email = contact.email.address - if email.lower() not in lsgc.contacts.lower(): - raise ValueError( - '%s group has "%s" contact but not found in LiaisonStatementGroupContacts.contacts = "%s"' % ( - group.acronym, email, lsgc.contacts, - ) - ) - - cc_contacts = group.role_set.filter(name=cc_contact_role_name) - num_lsgc_cc_contacts = len(lsgc.cc_contacts.split(',')) if lsgc.cc_contacts else 0 - if len(cc_contacts) != num_lsgc_cc_contacts: - raise ValueError( - '%s group has %d CC contact(s) but %d address(es) in its LiaisonStatementGroupContacts (cc_contact addresses = "%s", LSGC.cc_contacts="%s")' % ( - group.acronym, len(cc_contacts), num_lsgc_cc_contacts, - '","'.join([c.email.address for c in cc_contacts]), - lsgc.cc_contacts, - ) - ) - for cc_contact in cc_contacts: - email = cc_contact.email.address - if email.lower() not in lsgc.cc_contacts.lower(): - raise ValueError( - '%s group has "%s" CC contact but not found in LiaisonStatementGroupContacts.cc_contacts = "%s"' % ( - group.acronym, email, lsgc.cc_contacts, - ) - ) - -def reverse(apps, schema_editor): - """Perform reverse migration - - Removes liaison_contact and liaison_cc_contact Roles. The forward migration creates missing - Email and Person instances, but these are not removed because it's difficult to do this - safely and correctly. - """ - Role = apps.get_model('group', 'Role') - Role.objects.filter( - name_id__in=['liaison_contact', 'liaison_cc_contact'] - ).delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0040_lengthen_used_roles_fields'), - ('name', '0022_add_liaison_contact_rolenames'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0042_add_liaison_contact_roles_to_used_roles.py b/ietf/group/migrations/0042_add_liaison_contact_roles_to_used_roles.py deleted file mode 100644 index 2b16d7485..000000000 --- a/ietf/group/migrations/0042_add_liaison_contact_roles_to_used_roles.py +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by Django 2.2.17 on 2020-12-11 08:52 - -from django.db import migrations - - -def forward(apps, schema_editor): - role_names_to_add = ['liaison_contact', 'liaison_cc_contact'] - - Group = apps.get_model('group', 'Group') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - Role = apps.get_model('group', 'Role') - - # Add new liaison contact roles to default_used_fields for wg, sdo, and area groups - for group_type in ['wg', 'sdo', 'area']: - gf = GroupFeatures.objects.get(type_id=group_type) - for role_name in role_names_to_add: - if role_name not in gf.default_used_roles: - gf.default_used_roles.append(role_name) - gf.save() - - # Add new role names to any groups that both have liaison contacts - # and use a custom used_roles list. - for group in Group.objects.filter(type_id=group_type): - used_roles_is_set = len(group.used_roles) > 0 - has_contacts = Role.objects.filter(name_id__in=role_names_to_add).exists() - if used_roles_is_set and has_contacts: - for role_name in role_names_to_add: - if role_name not in group.used_roles: - print('>> Adding %s to used_roles for %s' % (role_name, group.acronym)) - group.used_roles.append(role_name) - group.save() - - -def reverse(apps, schema_editor): - role_names_to_remove = ['liaison_contact', 'liaison_cc_contact'] - - Group = apps.get_model('group', 'Group') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - - for group in Group.objects.all(): - for role_name in role_names_to_remove: - if role_name in group.used_roles: - print('>> Removing %s from used_roles for %s' % (role_name, group.acronym)) - group.used_roles.remove(role_name) - group.save() - - for gf in GroupFeatures.objects.all(): - for role_name in role_names_to_remove: - if role_name in gf.default_used_roles: - print('>> Removing %s from default_used_roles for %s' % (role_name, gf.type_id)) - gf.default_used_roles.remove(role_name) - gf.save() - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0041_create_liaison_contact_roles'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0043_add_groupfeatures_parent_type_fields.py b/ietf/group/migrations/0043_add_groupfeatures_parent_type_fields.py deleted file mode 100644 index 82cb0990f..000000000 --- a/ietf/group/migrations/0043_add_groupfeatures_parent_type_fields.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 2.2.19 on 2021-04-13 05:17 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0023_change_stream_descriptions'), - ('group', '0042_add_liaison_contact_roles_to_used_roles'), - ] - - operations = [ - migrations.AddField( - model_name='groupfeatures', - name='parent_types', - field=models.ManyToManyField(blank=True, help_text='Group types allowed as parent of this group type', related_name='child_features', to='name.GroupTypeName'), - ), - migrations.AddField( - model_name='groupfeatures', - name='need_parent', - field=models.BooleanField(default=False, help_text='Does this group type require a parent group?', verbose_name='Need Parent'), - ), - migrations.AddField( - model_name='groupfeatures', - name='default_parent', - field=models.CharField(blank=True, default='', help_text='Default parent group acronym for this group type', max_length=40, verbose_name='Default Parent'), - ), - ] diff --git a/ietf/group/migrations/0044_populate_groupfeatures_parent_type_fields.py b/ietf/group/migrations/0044_populate_groupfeatures_parent_type_fields.py deleted file mode 100644 index 855b47c90..000000000 --- a/ietf/group/migrations/0044_populate_groupfeatures_parent_type_fields.py +++ /dev/null @@ -1,92 +0,0 @@ -# Generated by Django 2.2.19 on 2021-04-13 09:17 - -from django.db import migrations - -def populate_parent_types(apps, schema_editor): - """Add default parent_types entries - - Data were determined from existing groups via this query: - {t.slug: list( - Group.objects.filter(type=t, parent__isnull=False).values_list('parent__type', flat=True).distinct() - ) for t in GroupTypeName.objects.all()} - """ - GroupFeatures = apps.get_model('group', 'GroupFeatures') - GroupTypeName = apps.get_model('name', 'GroupTypeName') - type_map = { - 'adhoc': ['ietf'], - 'admin': [], - 'ag': ['area', 'ietf'], - 'area': ['ietf'], - 'dir': ['area'], - 'iab': ['ietf'], - 'iana': [], - 'iesg': [], - 'ietf': ['ietf'], - 'individ': ['area'], - 'irtf': ['irtf'], - 'ise': [], - 'isoc': ['isoc'], - 'nomcom': ['area'], - 'program': ['ietf'], - 'rag': ['irtf'], - 'review': ['area'], - 'rfcedtyp': [], - 'rg': ['irtf'], - 'sdo': ['sdo', 'area'], - 'team': ['area'], - 'wg': ['area'] - } - for type_slug, parent_slugs in type_map.items(): - if len(parent_slugs) > 0: - features = GroupFeatures.objects.get(type__slug=type_slug) - features.parent_types.add(*GroupTypeName.objects.filter(slug__in=parent_slugs)) - - # validate - for gtn in GroupTypeName.objects.all(): - slugs_in_db = set(type.slug for type in gtn.features.parent_types.all()) - assert(slugs_in_db == set(type_map[gtn.slug])) - - -def set_need_parent_values(apps, schema_editor): - """Set need_parent values - - Data determined from existing groups using: - - GroupTypeName.objects.exclude(pk__in=Group.objects.filter(parent__isnull=True).values('type')) - - 'iesg' has been removed because there are no groups of this type, so no parent types have - been made available to it. - """ - GroupFeatures = apps.get_model('group', 'GroupFeatures') - - GroupFeatures.objects.filter( - type_id__in=('area', 'dir', 'individ', 'review', 'rg',) - ).update(need_parent=True) - - -def set_default_parents(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - - # rg-typed groups are children of the irtf group - rg_features = GroupFeatures.objects.filter(type_id='rg').first() - if rg_features: - rg_features.default_parent = 'irtf' - rg_features.save() - - -def empty_reverse(apps, schema_editor): - pass # nothing to do, field will be dropped - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0043_add_groupfeatures_parent_type_fields'), - ('person', '0019_auto_20210604_1443'), - ] - - operations = [ - migrations.RunPython(populate_parent_types, empty_reverse), - migrations.RunPython(set_need_parent_values, empty_reverse), - migrations.RunPython(set_default_parents, empty_reverse), - ] diff --git a/ietf/group/migrations/0045_iabasg.py b/ietf/group/migrations/0045_iabasg.py deleted file mode 100644 index 371b7c45b..000000000 --- a/ietf/group/migrations/0045_iabasg.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - Group = apps.get_model('group', 'Group') - - # Copy program to iabasg - feat = GroupFeatures.objects.get(pk='program') - feat.pk = 'iabasg' - feat.save() - feat.parent_types.add('ietf') - - # List provided by Cindy on 30Aug2021 - Group.objects.filter(acronym__in=['iana-evolution','iproc','liaison-oversight','ietfiana','plenary-planning','rfcedprog']).update(type_id='iabasg') - - Group.objects.filter(acronym='model-t').update(parent=Group.objects.get(acronym='iab')) - -def reverse(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - Group = apps.get_model('group', 'Group') - Group.objects.filter(type_id='iabasg').update(type_id='program') - # Intentionally not removing the parent of model-t - GroupFeatures.objects.filter(pk='iabasg').delete() - - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0044_populate_groupfeatures_parent_type_fields'), - ('name', '0028_iabasg'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/group/migrations/0046_grouptypename_admin_to_adm.py b/ietf/group/migrations/0046_grouptypename_admin_to_adm.py deleted file mode 100644 index 73c268993..000000000 --- a/ietf/group/migrations/0046_grouptypename_admin_to_adm.py +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - GroupTypeName = apps.get_model('name','GroupTypeName') - Group = apps.get_model('group', 'Group') - GroupHistory = apps.get_model('group', 'GroupHistory') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - - a = GroupTypeName.objects.get(pk='admin') - a.pk='adm' - a.order=1 - a.save() - f = GroupFeatures.objects.get(pk='admin') - f.pk='adm' - f.save() - - Group.objects.filter(type_id='admin').update(type_id='adm') - GroupHistory.objects.filter(type_id='admin').update(type_id='adm') - - GroupFeatures.objects.filter(pk='admin').delete() - GroupTypeName.objects.filter(pk='admin').delete() - -def reverse(apps, schema_editor): - GroupTypeName = apps.get_model('name','GroupTypeName') - Group = apps.get_model('group', 'Group') - GroupHistory = apps.get_model('group','GroupHistory') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - - a = GroupTypeName.objects.get(pk='adm') - a.pk='admin' - a.order=0 - a.save() - f = GroupFeatures.objects.get(pk='adm') - f.pk='admin' - f.save() - - Group.objects.filter(type_id='adm').update(type_id='admin') - GroupHistory.objects.filter(type_id='adm').update(type_id='admin') - - GroupFeatures.objects.filter(type_id='adm').delete() - GroupTypeName.objects.filter(pk='adm').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0045_iabasg'), - ('name', '0028_iabasg'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/group/migrations/0047_ietfllc.py b/ietf/group/migrations/0047_ietfllc.py deleted file mode 100644 index a946e2bf0..000000000 --- a/ietf/group/migrations/0047_ietfllc.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -from django.db import migrations - -def email(person): - e = person.email_set.filter(primary=True).first() - if not e: - e = person.email_set.filter(active=True).order_by("-time").first() - return e - -def forward(apps, schema_editor): - Group = apps.get_model('group', 'Group') - Person = apps.get_model('person', 'Person') - llc = Group.objects.create( - acronym='ietfadminllc', - name="IETF Administration LLC", - state_id='active', - type_id='adm', - description="The IETF Administration LLC (IETF LLC) provides the corporate legal home for the IETF, the Internet Architecture Board (IAB), and the Internet Research Task Force (IRTF). The Administration (https://www.ietf.org/about/administration/) section of the website has full details of the LLC and is where the various policies and reports produced by the LLC are published.", - ) - Group.objects.filter(acronym='llc-board').update(parent=llc, description="The IETF Administration LLC (IETF LLC) provides the corporate legal home for the IETF, the Internet Architecture Board (IAB), and the Internet Research Task Force (IRTF). The Administration (https://www.ietf.org/about/administration/) section of the website has full details of the LLC and is where the various policies and reports produced by the LLC are published.") - llc_staff= Group.objects.create( - acronym='llc-staff', - name="IETF LLC employees", - state_id='active', - type_id='adm', - parent=llc, - description="The IETF Administration LLC (IETF LLC) provides the corporate legal home for the IETF, the Internet Architecture Board (IAB), and the Internet Research Task Force (IRTF). The Administration (https://www.ietf.org/about/administration/) section of the website has full details of the LLC and is where the various policies and reports produced by the LLC are published.", - ) - legal = Group.objects.create( - acronym='legal-consult', - name="Legal consultation group", - state_id='active', - type_id='adm', - parent=llc, - description="The legal-consult list is a group of community participants who provide their views to the IETF Administration LLC in private on various legal matters. This was first established under the IAOC and has not been reviewed since. Legal advice is provided separately to the LLC by contracted external counsel.", - ) - - for email_addr in ('jay@ietf.org', 'ghwood@ietf.org', 'lbshaw@ietf.org', 'krathnayake@ietf.org'): - p = Person.objects.get(email__address=email_addr) - llc_staff.role_set.create(name_id='member',person=p,email=email(p)) - - for email_addr in ( - 'amorris@amsl.com', - 'brad@biddle.law', - 'David.Wilson@thompsonhine.com', - 'glenn.deen@nbcuni.com', - 'hall@isoc.org', - 'Jason_Livingood@comcast.com', - 'jay@ietf.org', - 'jmh@joelhalpern.com', - 'johnl@taugh.com', - 'kathleen.moriarty.ietf@gmail.com', - 'lars@eggert.org', - 'lflynn@amsl.com', - 'stewe@stewe.org', - 'vigdis@biddle.law', - 'wendy@seltzer.org', - ): - p = Person.objects.filter(email__address=email_addr).first() - if p: - legal.role_set.create(name_id='member', person=p, email=email(p)) - - -def reverse(apps, schema_editor): - Group = apps.get_model('group', 'Group') - Group.objects.filter(acronym='llc-board').update(parent=None) - Group.objects.filter(acronym__in=['llc_staff','legal-consult']).delete() - Group.objects.filter(acronym='ietfadminllc').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0046_grouptypename_admin_to_adm'), - ('person', '0019_auto_20210604_1443'), - # The below are needed for reverse migrations to work - ('name','0028_iabasg'), - ('doc', '0043_bofreq_docevents'), - ('liaisons','0009_delete_liaisonstatementgroupcontacts_model'), - ('meeting', '0018_document_primary_key_cleanup'), - ('review', '0014_document_primary_key_cleanup'), - ('submit', '0008_submissionextresource'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/group/migrations/0048_has_session_materials.py b/ietf/group/migrations/0048_has_session_materials.py deleted file mode 100644 index 3a081275d..000000000 --- a/ietf/group/migrations/0048_has_session_materials.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -from django.db import migrations - -# Not adding team at this time - need to untangle the nonsession_materials mess first - -types_to_change = [ - 'program', - 'dir', - 'review', -] - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - GroupFeatures.objects.filter(type__in=types_to_change).update(has_session_materials=True) - -def reverse(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - GroupFeatures.objects.filter(type__in=types_to_change).update(has_session_materials=False) - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0047_ietfllc'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0049_auto_20211019_1136.py b/ietf/group/migrations/0049_auto_20211019_1136.py deleted file mode 100644 index b9464f817..000000000 --- a/ietf/group/migrations/0049_auto_20211019_1136.py +++ /dev/null @@ -1,54 +0,0 @@ -# Generated by Django 2.2.24 on 2021-10-19 11:36 - -from django.db import migrations -import ietf.utils.db - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0048_has_session_materials'), - ] - - operations = [ - migrations.AlterField( - model_name='groupfeatures', - name='admin_roles', - field=ietf.utils.db.IETFJSONField(default=['chair'], max_length=64), - ), - migrations.AlterField( - model_name='groupfeatures', - name='default_used_roles', - field=ietf.utils.db.IETFJSONField(default=[], max_length=256), - ), - migrations.AlterField( - model_name='groupfeatures', - name='docman_roles', - field=ietf.utils.db.IETFJSONField(default=['ad', 'chair', 'delegate', 'secr'], max_length=128), - ), - migrations.AlterField( - model_name='groupfeatures', - name='groupman_authroles', - field=ietf.utils.db.IETFJSONField(default=['Secretariat'], max_length=128), - ), - migrations.AlterField( - model_name='groupfeatures', - name='groupman_roles', - field=ietf.utils.db.IETFJSONField(default=['ad', 'chair'], max_length=128), - ), - migrations.AlterField( - model_name='groupfeatures', - name='material_types', - field=ietf.utils.db.IETFJSONField(default=['slides'], max_length=64), - ), - migrations.AlterField( - model_name='groupfeatures', - name='matman_roles', - field=ietf.utils.db.IETFJSONField(default=['ad', 'chair', 'delegate', 'secr'], max_length=128), - ), - migrations.AlterField( - model_name='groupfeatures', - name='role_order', - field=ietf.utils.db.IETFJSONField(default=['chair', 'secr', 'member'], help_text='The order in which roles are shown, for instance on photo pages. Enter valid JSON.', max_length=128), - ), - ] diff --git a/ietf/group/migrations/0050_groupfeatures_agenda_filter_type.py b/ietf/group/migrations/0050_groupfeatures_agenda_filter_type.py deleted file mode 100644 index e7cdc64de..000000000 --- a/ietf/group/migrations/0050_groupfeatures_agenda_filter_type.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0033_populate_agendafiltertypename'), - ('group', '0049_auto_20211019_1136'), - ] - - operations = [ - migrations.AddField( - model_name='groupfeatures', - name='agenda_filter_type', - field=models.ForeignKey(default='none', on_delete=django.db.models.deletion.PROTECT, to='name.AgendaFilterTypeName'), - ), - ] diff --git a/ietf/group/migrations/0051_populate_groupfeatures_agenda_filter_type.py b/ietf/group/migrations/0051_populate_groupfeatures_agenda_filter_type.py deleted file mode 100644 index fa5025902..000000000 --- a/ietf/group/migrations/0051_populate_groupfeatures_agenda_filter_type.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -from django.db import migrations - - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - - # map AgendaFilterTypeName slug to group types - unlisted get 'none' - filter_types = dict( - # list previously hard coded in agenda view, plus 'review' - normal={'wg', 'ag', 'rg', 'rag', 'iab', 'program', 'review'}, - heading={'area', 'ietf', 'irtf'}, - special={'team', 'adhoc'}, - ) - - for ft, group_types in filter_types.items(): - for gf in GroupFeatures.objects.filter(type__slug__in=group_types): - gf.agenda_filter_type_id = ft - gf.save() - - -def reverse(apps, schema_editor): - pass # nothing to do, model will be deleted anyway - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0050_groupfeatures_agenda_filter_type'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0052_groupfeatures_session_purposes.py b/ietf/group/migrations/0052_groupfeatures_session_purposes.py deleted file mode 100644 index 8a3668e7e..000000000 --- a/ietf/group/migrations/0052_groupfeatures_session_purposes.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.24 on 2021-09-26 11:29 - -from django.db import migrations -import ietf.name.models -import ietf.utils.db -import ietf.utils.validators - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0051_populate_groupfeatures_agenda_filter_type'), - ('name', '0034_sessionpurposename'), - ] - - operations = [ - migrations.AddField( - model_name='groupfeatures', - name='session_purposes', - field=ietf.utils.db.IETFJSONField(default=[], help_text='Allowed session purposes for this group type', max_length=256, validators=[ietf.utils.validators.JSONForeignKeyListValidator(ietf.name.models.SessionPurposeName)]), - ), - ] diff --git a/ietf/group/migrations/0053_populate_groupfeatures_session_purposes.py b/ietf/group/migrations/0053_populate_groupfeatures_session_purposes.py deleted file mode 100644 index 642aa5f21..000000000 --- a/ietf/group/migrations/0053_populate_groupfeatures_session_purposes.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.24 on 2021-09-26 11:29 - -from django.db import migrations - - -default_purposes = dict( - adhoc=['presentation'], - adm=['closed_meeting', 'officehours'], - ag=['regular'], - area=['regular'], - dir=['open_meeting', 'presentation', 'regular', 'social', 'tutorial'], - iab=['closed_meeting', 'regular'], - iabasg=['closed_meeting', 'officehours', 'open_meeting'], - iana=['officehours'], - iesg=['closed_meeting', 'open_meeting'], - ietf=['admin', 'plenary', 'presentation', 'social'], - irtf=[], - ise=['officehours'], - isoc=['officehours', 'open_meeting', 'presentation'], - nomcom=['closed_meeting', 'officehours'], - program=['regular', 'tutorial'], - rag=['regular'], - review=['open_meeting', 'social'], - rfcedtyp=['officehours'], - rg=['regular'], - team=['coding', 'presentation', 'social', 'tutorial'], - wg=['regular'], -) - - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - SessionPurposeName = apps.get_model('name', 'SessionPurposeName') - - # verify that we're not about to use an invalid purpose - for purposes in default_purposes.values(): - for purpose in purposes: - SessionPurposeName.objects.get(pk=purpose) # throws an exception unless exists - - for type_, purposes in default_purposes.items(): - GroupFeatures.objects.filter( - type=type_ - ).update( - session_purposes=purposes - ) - -def reverse(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - GroupFeatures.objects.update(session_purposes=[]) # clear back out to default - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0052_groupfeatures_session_purposes'), - ('name', '0035_populate_sessionpurposename'), - - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0054_enable_delegation.py b/ietf/group/migrations/0054_enable_delegation.py deleted file mode 100644 index 9655f819e..000000000 --- a/ietf/group/migrations/0054_enable_delegation.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2022 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group','GroupFeatures') - for type_id in ('dir', 'iabasg', 'program', 'review', 'team'): - f = GroupFeatures.objects.get(type_id=type_id) - if 'delegate' not in f.groupman_roles: - f.groupman_roles.append('delegate') - f.save() - for type_id in ('adhoc', 'ag', 'iesg', 'irtf', 'ise', 'rag', 'dir', 'iabasg', 'program', 'review'): - f = GroupFeatures.objects.get(type_id=type_id) - if 'delegate' not in f.default_used_roles: - f.default_used_roles.append('delegate') - f.save() - -def reverse (apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0053_populate_groupfeatures_session_purposes'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - ] diff --git a/ietf/group/migrations/0055_editorial_stream.py b/ietf/group/migrations/0055_editorial_stream.py deleted file mode 100644 index a7dc9ca9c..000000000 --- a/ietf/group/migrations/0055_editorial_stream.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright The IETF Trust 2022 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - Group = apps.get_model('group', 'Group') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - Group.objects.create( - acronym='editorial', - name='Editorial Stream', - state_id='active', - type_id='editorial', - parent=None, - ) - templ = GroupFeatures.objects.get(type='rfcedtyp') - templ.pk = None - templ.type_id='editorial' - templ.save() - - - -def reverse(apps, schema_editor): - Group = apps.get_model('group', 'Group') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - GroupFeatures.objects.filter(type='editorial').delete() - Group.objects.filter(acronym='editorial').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0054_enable_delegation'), - ('name', '0043_editorial_stream_grouptype'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0056_dir_chair_groupman_role.py b/ietf/group/migrations/0056_dir_chair_groupman_role.py deleted file mode 100644 index b69eb03ae..000000000 --- a/ietf/group/migrations/0056_dir_chair_groupman_role.py +++ /dev/null @@ -1,30 +0,0 @@ -# Generated by Django 2.2.28 on 2022-06-14 13:14 - -from django.db import migrations - - -def forward(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - features = GroupFeatures.objects.get(type_id='dir') - if 'chair' not in features.groupman_roles: - features.groupman_roles.append('chair') - features.save() - - -def reverse(apps, schema_editor): - GroupFeatures = apps.get_model('group', 'GroupFeatures') - features = GroupFeatures.objects.get(type_id='dir') - if 'chair' in features.groupman_roles: - features.groupman_roles.remove('chair') - features.save() - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0055_editorial_stream'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/group/migrations/0057_nojabber_onlychat.py b/ietf/group/migrations/0057_nojabber_onlychat.py deleted file mode 100644 index c089a9761..000000000 --- a/ietf/group/migrations/0057_nojabber_onlychat.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved -# Generated by Django 2.2.28 on 2022-07-14 09:09 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0056_dir_chair_groupman_role'), - ] - - operations = [ - migrations.RenameField( - model_name='groupfeatures', - old_name='has_default_jabber', - new_name='has_default_chat', - ), - ] diff --git a/ietf/group/migrations/0058_alter_has_default_chat.py b/ietf/group/migrations/0058_alter_has_default_chat.py deleted file mode 100644 index 8f0464764..000000000 --- a/ietf/group/migrations/0058_alter_has_default_chat.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved -# Generated by Django 2.2.28 on 2022-07-15 12:24 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0057_nojabber_onlychat'), - ] - - operations = [ - migrations.AlterField( - model_name='groupfeatures', - name='has_default_chat', - field=models.BooleanField(default=False, verbose_name='Chat'), - ), - ] diff --git a/ietf/group/migrations/0059_use_timezone_now_for_group_models.py b/ietf/group/migrations/0059_use_timezone_now_for_group_models.py deleted file mode 100644 index 24c083855..000000000 --- a/ietf/group/migrations/0059_use_timezone_now_for_group_models.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-12 11:24 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0058_alter_has_default_chat'), - ] - - operations = [ - migrations.AlterField( - model_name='group', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='groupevent', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now, help_text='When the event happened'), - ), - migrations.AlterField( - model_name='grouphistory', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - ] diff --git a/ietf/group/migrations/0060_editoral_refactor.py b/ietf/group/migrations/0060_editoral_refactor.py deleted file mode 100755 index d6bf1abea..000000000 --- a/ietf/group/migrations/0060_editoral_refactor.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright The IETF Trust 2023, All Rights Reserved - -from django.db import migrations - - -def forward(apps, schema_editor): - Group = apps.get_model("group", "Group") - GroupFeatures = apps.get_model("group", "GroupFeatures") - GroupTypeName = apps.get_model("name", "GroupTypeName") - - GroupTypeName.objects.create( - slug="edwg", - name="Editorial Stream Working Group", - desc="Editorial Stream Working Group", - used=True, - ) - GroupTypeName.objects.create( - slug="edappr", - name="Editorial Stream Approval Group", - desc="Editorial Stream Approval Group", - used=True, - ) - Group.objects.filter(acronym="rswg").update(type_id="edwg") - Group.objects.filter(acronym="rsab").update(type_id="edappr") - Group.objects.filter(acronym="editorial").delete() - GroupFeatures.objects.create( - type_id="edwg", - need_parent=False, - has_milestones=False, - has_chartering_process=False, - has_documents=True, - has_session_materials=True, - has_meetings=True, - has_reviews=False, - has_default_chat=True, - acts_like_wg=True, - create_wiki=False, - custom_group_roles=False, - customize_workflow=True, - is_schedulable=True, - show_on_agenda=True, - agenda_filter_type_id="normal", - req_subm_approval=True, - agenda_type_id="ietf", - about_page="ietf.group.views.group_about", - default_tab="ietf.group.views.group_documents", - material_types=["slides"], - default_used_roles=["chair"], - admin_roles=["chair"], - docman_roles=["chair"], - groupman_roles=["chair"], - groupman_authroles=["Secretariat"], - matman_roles=["chair"], - role_order=["chair"], - session_purposes=["regular"], - ) - # Create edappr GroupFeature - GroupFeatures.objects.create( - type_id="edappr", - need_parent=False, - has_milestones=False, - has_chartering_process=False, - has_documents=False, - has_session_materials=True, - has_meetings=True, - has_reviews=False, - has_default_chat=True, - acts_like_wg=False, - create_wiki=False, - custom_group_roles=False, - customize_workflow=False, - is_schedulable=True, - show_on_agenda=True, - agenda_filter_type_id="normal", - req_subm_approval=False, - agenda_type_id="ietf", - about_page="ietf.group.views.group_about", - default_tab="ietf.group.views.group_about", - material_types=["slides"], - default_used_roles=["chair", "member"], - admin_roles=["chair"], - docman_roles=["chair"], - groupman_roles=["chair"], - groupman_authroles=["Secretariat"], - matman_roles=["chair"], - role_order=["chair", "member"], - session_purposes=["officehourse", "regular"], - ) - GroupFeatures.objects.filter(type_id="editorial").delete() - GroupTypeName.objects.filter(slug="editorial").delete() - - -def reverse(apps, schema_editor): - Group = apps.get_model("group", "Group") - GroupFeatures = apps.get_model("group", "GroupFeatures") - GroupTypeName = apps.get_model("name", "GroupTypeName") - GroupTypeName.objects.filter(slug="editorial").update(name="Editorial") - Group.objects.create( - acronym="editorial", - name="Editorial Stream", - state_id="active", - type_id="editorial", - parent=None, - ) - GroupFeatures.objects.create( - type_id="editorial", - need_parent=False, - has_milestones=False, - has_chartering_process=False, - has_documents=False, - has_session_materials=False, - has_meetings=False, - has_reviews=False, - has_default_chat=False, - acts_like_wg=False, - create_wiki=False, - custom_group_roles=True, - customize_workflow=False, - is_schedulable=False, - show_on_agenda=False, - agenda_filter_type_id="none", - req_subm_approval=False, - agenda_type_id="side", - about_page="ietf.group.views.group_about", - default_tab="ietf.group.views.group_about", - material_types=["slides"], - default_used_roles=["auth", "chair"], - admin_roles=["chair"], - docman_roles=[], - groupman_roles=[], - matman_roles=[], - role_order=["chair", "secr"], - session_purposes=["officehours"], - ) - Group.objects.filter(acronym__in=["rswg", "rsab"]).update(type_id="rfcedtyp") - GroupTypeName.objects.create( - slug="editorial", - name="Editorial", - desc="Editorial Stream Group", - used=True, - ) - GroupFeatures.objects.filter(type_id__in=["edwg", "edappr"]).delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ("group", "0059_use_timezone_now_for_group_models"), - ("name", "0045_polls_and_chatlogs"), - ] - - operations = [migrations.RunPython(forward, reverse)] diff --git a/ietf/ietfauth/migrations/__init__.py b/ietf/help/migrations/__init__.py similarity index 100% rename from ietf/ietfauth/migrations/__init__.py rename to ietf/help/migrations/__init__.py diff --git a/ietf/iesg/migrations/0001_initial.py b/ietf/iesg/migrations/0001_initial.py index e9ce0b4dd..2d3a23fa6 100644 --- a/ietf/iesg/migrations/0001_initial.py +++ b/ietf/iesg/migrations/0001_initial.py @@ -1,6 +1,5 @@ -# Generated by Django 2.2.28 on 2023-03-14 16:10 +# Generated by Django 2.2.28 on 2023-03-20 19:22 -from typing import List, Tuple from django.db import migrations, models import ietf.iesg.models @@ -9,7 +8,7 @@ class Migration(migrations.Migration): initial = True - dependencies: List[Tuple[str]] = [ + dependencies = [ ] operations = [ @@ -48,4 +47,8 @@ class Migration(migrations.Migration): 'ordering': ['-date'], }, ), + migrations.AddIndex( + model_name='telechatdate', + index=models.Index(fields=['-date'], name='iesg_telech_date_a0e0ed_idx'), + ), ] diff --git a/ietf/iesg/migrations/0002_auto_20230314_0912.py b/ietf/iesg/migrations/0002_auto_20230314_0912.py deleted file mode 100644 index 4950d53f5..000000000 --- a/ietf/iesg/migrations/0002_auto_20230314_0912.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.28 on 2023-03-14 16:12 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('iesg', '0001_initial'), - ] - - operations = [ - migrations.AddIndex( - model_name='telechatdate', - index=models.Index(fields=['-date'], name='iesg_telech_date_a0e0ed_idx'), - ), - ] diff --git a/ietf/ipr/migrations/0001_initial.py b/ietf/ipr/migrations/0001_initial.py index e370d3d5a..b204fd401 100644 --- a/ietf/ipr/migrations/0001_initial.py +++ b/ietf/ipr/migrations/0001_initial.py @@ -1,7 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations, models import django.db.models.deletion @@ -32,15 +29,11 @@ class Migration(migrations.Migration): ('submitter_email', models.EmailField(blank=True, max_length=254)), ('time', models.DateTimeField(auto_now_add=True)), ('title', models.CharField(blank=True, max_length=255)), + ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), ], - ), - migrations.CreateModel( - name='IprDocRel', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('sections', models.TextField(blank=True)), - ('revisions', models.CharField(blank=True, max_length=16)), - ], + options={ + 'ordering': ['-time', '-id'], + }, ), migrations.CreateModel( name='IprEvent', @@ -49,18 +42,16 @@ class Migration(migrations.Migration): ('time', models.DateTimeField(auto_now_add=True)), ('desc', models.TextField()), ('response_due', models.DateTimeField(blank=True, null=True)), + ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('disclosure', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ipr.IprDisclosureBase')), + ('in_reply_to', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='irtoevents', to='message.Message')), + ('message', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='msgevents', to='message.Message')), + ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.IprEventTypeName')), ], options={ 'ordering': ['-time', '-id'], }, ), - migrations.CreateModel( - name='RelatedIpr', - 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')), - ], - ), migrations.CreateModel( name='GenericIprDisclosure', fields=[ @@ -86,7 +77,6 @@ class Migration(migrations.Migration): ('holder_contact_info', models.TextField(blank=True, help_text='Address, phone, etc.')), ('licensing_comments', models.TextField(blank=True)), ('submitter_claims_all_terms_disclosed', models.BooleanField(default=False)), - ('licensing', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.IprLicenseTypeName')), ], bases=('ipr.iprdisclosurebase',), ), @@ -122,55 +112,24 @@ class Migration(migrations.Migration): ], bases=('ipr.iprdisclosurebase',), ), - migrations.AddField( - model_name='relatedipr', - name='source', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='relatedipr_source_set', to='ipr.IprDisclosureBase'), + migrations.CreateModel( + name='RelatedIpr', + 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='relatedipr_source_set', to='ipr.IprDisclosureBase')), + ('target', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='relatedipr_target_set', to='ipr.IprDisclosureBase')), + ], ), - migrations.AddField( - model_name='relatedipr', - name='target', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='relatedipr_target_set', to='ipr.IprDisclosureBase'), - ), - migrations.AddField( - model_name='iprevent', - name='by', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), - ), - migrations.AddField( - model_name='iprevent', - name='disclosure', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ipr.IprDisclosureBase'), - ), - migrations.AddField( - model_name='iprevent', - name='in_reply_to', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='irtoevents', to='message.Message'), - ), - migrations.AddField( - model_name='iprevent', - name='message', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='msgevents', to='message.Message'), - ), - migrations.AddField( - model_name='iprevent', - name='type', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.IprEventTypeName'), - ), - migrations.AddField( - model_name='iprdocrel', - name='disclosure', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ipr.IprDisclosureBase'), - ), - migrations.AddField( - model_name='iprdocrel', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias'), - ), - migrations.AddField( - model_name='iprdisclosurebase', - name='by', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + migrations.CreateModel( + name='IprDocRel', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('sections', models.TextField(blank=True)), + ('revisions', models.CharField(blank=True, max_length=16)), + ('disclosure', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ipr.IprDisclosureBase')), + ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias')), + ], ), migrations.AddField( model_name='iprdisclosurebase', @@ -187,4 +146,17 @@ class Migration(migrations.Migration): name='state', field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.IprDisclosureStateName'), ), + migrations.AddIndex( + model_name='iprevent', + index=models.Index(fields=['-time', '-id'], name='ipr_ipreven_time_9630c4_idx'), + ), + migrations.AddIndex( + model_name='iprdisclosurebase', + index=models.Index(fields=['-time', '-id'], name='ipr_iprdisc_time_846a78_idx'), + ), + migrations.AddField( + model_name='holderiprdisclosure', + name='licensing', + field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.IprLicenseTypeName'), + ), ] diff --git a/ietf/ipr/migrations/0002_auto_20180225_1207.py b/ietf/ipr/migrations/0002_auto_20180225_1207.py deleted file mode 100644 index 3f34a491d..000000000 --- a/ietf/ipr/migrations/0002_auto_20180225_1207.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-25 12:07 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('ipr', '0001_initial'), - ] - - operations = [ - migrations.AlterModelOptions( - name='iprdisclosurebase', - options={'ordering': ['-time', '-id']}, - ), - ] diff --git a/ietf/ipr/migrations/0003_add_ipdocrel_document2_fk.py b/ietf/ipr/migrations/0003_add_ipdocrel_document2_fk.py deleted file mode 100644 index e5ac7f441..000000000 --- a/ietf/ipr/migrations/0003_add_ipdocrel_document2_fk.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 11:58 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0015_1_add_fk_to_document_id'), - ('ipr', '0002_auto_20180225_1207'), - ] - - operations = [ - migrations.AddField( - model_name='iprdocrel', - name='document2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias', to_field=b'id'), - ), - migrations.AlterField( - model_name='iprdocrel', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_ipr', to='doc.DocAlias', to_field=b'name'), - ), - ] diff --git a/ietf/ipr/migrations/0004_remove_iprdocrel_document.py b/ietf/ipr/migrations/0004_remove_iprdocrel_document.py deleted file mode 100644 index d5af9d947..000000000 --- a/ietf/ipr/migrations/0004_remove_iprdocrel_document.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-20 09:53 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('ipr', '0003_add_ipdocrel_document2_fk'), - ] - - operations = [ - migrations.RemoveField( - model_name='iprdocrel', - name='document', - ), - ] diff --git a/ietf/ipr/migrations/0005_rename_field_document2.py b/ietf/ipr/migrations/0005_rename_field_document2.py deleted file mode 100644 index 4fef4c227..000000000 --- a/ietf/ipr/migrations/0005_rename_field_document2.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 05:31 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0019_rename_field_document2'), - ('ipr', '0004_remove_iprdocrel_document'), - ] - - operations = [ - migrations.RenameField( - model_name='iprdocrel', - old_name='document2', - new_name='document', - ), - ] diff --git a/ietf/ipr/migrations/0006_document_primary_key_cleanup.py b/ietf/ipr/migrations/0006_document_primary_key_cleanup.py deleted file mode 100644 index df8f66c54..000000000 --- a/ietf/ipr/migrations/0006_document_primary_key_cleanup.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-06-10 03:42 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ipr', '0005_rename_field_document2'), - ] - - operations = [ - migrations.AlterField( - model_name='iprdocrel', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.DocAlias'), - ), - ] diff --git a/ietf/ipr/migrations/0007_create_ipr_doc_events.py b/ietf/ipr/migrations/0007_create_ipr_doc_events.py deleted file mode 100644 index 395bc11ce..000000000 --- a/ietf/ipr/migrations/0007_create_ipr_doc_events.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-01-17 12:32 - - -from django.db import migrations - - -def create_or_delete_ipr_doc_events(apps, delete=False): - """Create or delete DocEvents for IprEvents - - Mostly duplicates IprEvent.create_doc_events(). This is necessary - because model methods, including custom save() methods, are not - available to migrations. - """ - IprEvent = apps.get_model('ipr', 'IprEvent') - DocEvent = apps.get_model('doc', 'DocEvent') - - # Map from self.type_id to DocEvent.EVENT_TYPES for types that - # should be logged as DocEvents - event_type_map = { - 'posted': 'posted_related_ipr', - 'removed': 'removed_related_ipr', - } - - for ipr_event in IprEvent.objects.filter(type_id__in=event_type_map): - related_docs = set() # related docs, no duplicates - for alias in ipr_event.disclosure.docs.all(): - related_docs.update(alias.docs.all()) - for doc in related_docs: - kwargs = dict( - type=event_type_map[ipr_event.type_id], - time=ipr_event.time, - by=ipr_event.by, - doc=doc, - rev='', - desc='%s related IPR disclosure: %s' % (ipr_event.type.name, - ipr_event.disclosure.title), - ) - events = DocEvent.objects.filter(**kwargs) # get existing events - if delete: - events.delete() - elif len(events) == 0: - DocEvent.objects.create(**kwargs) # create if did not exist - -def forward(apps, schema_editor): - """Create a DocEvent for each 'posted' or 'removed' IprEvent""" - create_or_delete_ipr_doc_events(apps, delete=False) - -def reverse(apps, schema_editor): - """Delete DocEvents that would be created by the forward migration - - This removes data, but only data that can be regenerated by running - the forward migration. - """ - create_or_delete_ipr_doc_events(apps, delete=True) - -class Migration(migrations.Migration): - - dependencies = [ - ('ipr', '0006_document_primary_key_cleanup'), - # Ensure the DocEvent types we need exist - ('doc', '0029_add_ipr_event_types'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/ipr/migrations/0008_auto_20201109_0439.py b/ietf/ipr/migrations/0008_auto_20201109_0439.py deleted file mode 100644 index d8140031c..000000000 --- a/ietf/ipr/migrations/0008_auto_20201109_0439.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ipr', '0007_create_ipr_doc_events'), - ] - - operations = [ - migrations.AddIndex( - model_name='iprdisclosurebase', - index=models.Index(fields=['-time', '-id'], name='ipr_iprdisc_time_846a78_idx'), - ), - migrations.AddIndex( - model_name='iprevent', - index=models.Index(fields=['-time', '-id'], name='ipr_ipreven_time_9630c4_idx'), - ), - ] diff --git a/ietf/liaisons/migrations/0001_initial.py b/ietf/liaisons/migrations/0001_initial.py index 7b58564ff..eccd8bb33 100644 --- a/ietf/liaisons/migrations/0001_initial.py +++ b/ietf/liaisons/migrations/0001_initial.py @@ -1,7 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations, models import django.db.models.deletion @@ -34,14 +31,17 @@ class Migration(migrations.Migration): ('other_identifiers', models.TextField(blank=True, null=True)), ('body', models.TextField(blank=True)), ], + options={ + 'ordering': ['id'], + }, ), migrations.CreateModel( - name='LiaisonStatementAttachment', + name='RelatedLiaisonStatement', 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')), + ('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( @@ -59,21 +59,12 @@ class Migration(migrations.Migration): }, ), migrations.CreateModel( - name='LiaisonStatementGroupContacts', + name='LiaisonStatementAttachment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('contacts', models.CharField(blank=True, max_length=255)), - ('cc_contacts', models.CharField(blank=True, max_length=255)), - ('group', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='group.Group', unique=True)), - ], - ), - 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')), + ('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( @@ -111,4 +102,8 @@ class Migration(migrations.Migration): 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'), + ), ] diff --git a/ietf/liaisons/migrations/0002_auto_20180225_1207.py b/ietf/liaisons/migrations/0002_auto_20180225_1207.py deleted file mode 100644 index 62a9b8a13..000000000 --- a/ietf/liaisons/migrations/0002_auto_20180225_1207.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-25 12:07 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('liaisons', '0001_initial'), - ] - - operations = [ - migrations.AlterModelOptions( - name='liaisonstatement', - options={'ordering': ['id']}, - ), - ] diff --git a/ietf/liaisons/migrations/0003_liaison_document2_fk.py b/ietf/liaisons/migrations/0003_liaison_document2_fk.py deleted file mode 100644 index 5fdf0f0f4..000000000 --- a/ietf/liaisons/migrations/0003_liaison_document2_fk.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 11:58 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0015_1_add_fk_to_document_id'), - ('liaisons', '0002_auto_20180225_1207'), - ] - - operations = [ - migrations.AddField( - model_name='liaisonstatementattachment', - name='document2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id'), - ), - migrations.AlterField( - model_name='liaisonstatementattachment', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_liaison', to='doc.Document', to_field=b'name'), - ), - ] diff --git a/ietf/liaisons/migrations/0004_remove_liaisonstatementattachment_document.py b/ietf/liaisons/migrations/0004_remove_liaisonstatementattachment_document.py deleted file mode 100644 index 3f5868ef2..000000000 --- a/ietf/liaisons/migrations/0004_remove_liaisonstatementattachment_document.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-20 09:53 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('liaisons', '0003_liaison_document2_fk'), - ] - - operations = [ - migrations.RemoveField( - model_name='liaisonstatementattachment', - name='document', - ), - ] diff --git a/ietf/liaisons/migrations/0005_rename_field_document2.py b/ietf/liaisons/migrations/0005_rename_field_document2.py deleted file mode 100644 index ddb800573..000000000 --- a/ietf/liaisons/migrations/0005_rename_field_document2.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 05:31 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0019_rename_field_document2'), - ('liaisons', '0004_remove_liaisonstatementattachment_document'), - ] - - operations = [ - migrations.RenameField( - model_name='liaisonstatementattachment', - old_name='document2', - new_name='document', - ), - ] diff --git a/ietf/liaisons/migrations/0006_document_primary_key_cleanup.py b/ietf/liaisons/migrations/0006_document_primary_key_cleanup.py deleted file mode 100644 index cae4b0ab1..000000000 --- a/ietf/liaisons/migrations/0006_document_primary_key_cleanup.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-06-10 03:47 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('liaisons', '0005_rename_field_document2'), - ] - - operations = [ - migrations.AlterField( - model_name='liaisonstatementattachment', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - ] diff --git a/ietf/liaisons/migrations/0007_auto_20201109_0439.py b/ietf/liaisons/migrations/0007_auto_20201109_0439.py deleted file mode 100644 index cd9aa967e..000000000 --- a/ietf/liaisons/migrations/0007_auto_20201109_0439.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('liaisons', '0006_document_primary_key_cleanup'), - ] - - operations = [ - migrations.AddIndex( - model_name='liaisonstatementevent', - index=models.Index(fields=['-time', '-id'], name='liaisons_li_time_3e1646_idx'), - ), - ] diff --git a/ietf/liaisons/migrations/0008_purge_liaisonstatementgroupcontacts_data.py b/ietf/liaisons/migrations/0008_purge_liaisonstatementgroupcontacts_data.py deleted file mode 100644 index 4bec1a4f0..000000000 --- a/ietf/liaisons/migrations/0008_purge_liaisonstatementgroupcontacts_data.py +++ /dev/null @@ -1,62 +0,0 @@ -# Generated by Django 2.2.17 on 2020-12-10 06:21 - -from django.db import migrations - -from ietf.person.name import plain_name - - -def forward(apps, schema_editor): - """Delete LiaisonStatementGroupContacts records""" - LiaisonStatementGroupContacts = apps.get_model('liaisons', 'LiaisonStatementGroupContacts') - LiaisonStatementGroupContacts.objects.all().delete() - - -def contacts_from_roles(roles): - """Create contacts string from Role queryset""" - emails = [] - for r in roles: - if not r.person.plain and r.person.name == r.email.address: - # Person was just a stand-in for a bare email address, so just return a bare email address - emails.append(r.email.address) - else: - # Person had a name of some sort, use that as the friendly name - person_name = r.person.plain if r.person.plain else plain_name(r.person.name) - emails.append('{} <{}>'.format(person_name,r.email.address)) - return ','.join(emails) - -def reverse(apps, schema_editor): - """Recreate LiaisonStatementGroupContacts records - - Note that this does not exactly reproduce the original contents. In particular, email addresses - in contacts or cc_contacts may have had different real names than those in the corresponding - email.person.name field. In this case, the record will be reconstructed with the name from - the Person model. The email addresses should be unchanged, though. - """ - LiaisonStatementGroupContacts = apps.get_model('liaisons', 'LiaisonStatementGroupContacts') - Group = apps.get_model('group', 'Group') - Role = apps.get_model('group', 'Role') - RoleName=apps.get_model('name', 'RoleName') - - contact_role_name = RoleName.objects.get(slug='liaison_contact') - cc_contact_role_name = RoleName.objects.get(slug='liaison_cc_contact') - - for group in Group.objects.all(): - contacts = Role.objects.filter(name=contact_role_name, group=group) - cc_contacts = Role.objects.filter(name=cc_contact_role_name, group=group) - if contacts.exists() or cc_contacts.exists(): - LiaisonStatementGroupContacts.objects.create( - group_id=group.pk, - contacts=contacts_from_roles(contacts), - cc_contacts=contacts_from_roles(cc_contacts), - ) - -class Migration(migrations.Migration): - - dependencies = [ - ('liaisons', '0007_auto_20201109_0439'), - ('group', '0041_create_liaison_contact_roles'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/liaisons/migrations/0009_delete_liaisonstatementgroupcontacts_model.py b/ietf/liaisons/migrations/0009_delete_liaisonstatementgroupcontacts_model.py deleted file mode 100644 index c4f654f1d..000000000 --- a/ietf/liaisons/migrations/0009_delete_liaisonstatementgroupcontacts_model.py +++ /dev/null @@ -1,16 +0,0 @@ -# Generated by Django 2.2.17 on 2020-12-10 10:05 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('liaisons', '0008_purge_liaisonstatementgroupcontacts_data'), - ] - - operations = [ - migrations.DeleteModel( - name='LiaisonStatementGroupContacts', - ), - ] diff --git a/ietf/mailinglists/migrations/0001_initial.py b/ietf/mailinglists/migrations/0001_initial.py index 52c04861c..eaf5d24e3 100644 --- a/ietf/mailinglists/migrations/0001_initial.py +++ b/ietf/mailinglists/migrations/0001_initial.py @@ -1,7 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 import django.core.validators from django.db import migrations, models @@ -32,7 +29,7 @@ class Migration(migrations.Migration): 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()])), + ('email', models.CharField(max_length=128, validators=[django.core.validators.EmailValidator()])), ('lists', models.ManyToManyField(to='mailinglists.List')), ], options={ @@ -40,7 +37,7 @@ class Migration(migrations.Migration): }, ), migrations.CreateModel( - name='Whitelisted', + name='Allowlisted', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('time', models.DateTimeField(auto_now_add=True)), @@ -48,7 +45,7 @@ class Migration(migrations.Migration): ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), ], options={ - 'verbose_name_plural': 'Whitelisted', + 'verbose_name_plural': 'Allowlisted', }, ), ] diff --git a/ietf/mailinglists/migrations/0002_auto_20190703_1344.py b/ietf/mailinglists/migrations/0002_auto_20190703_1344.py deleted file mode 100644 index b55c482a2..000000000 --- a/ietf/mailinglists/migrations/0002_auto_20190703_1344.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# Generated by Django 1.11.22 on 2019-07-03 13:44 - - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailinglists', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='subscribed', - name='email', - field=models.CharField(max_length=128, validators=[django.core.validators.EmailValidator()]), - ), - ] diff --git a/ietf/mailinglists/migrations/0003_allowlisted.py b/ietf/mailinglists/migrations/0003_allowlisted.py deleted file mode 100644 index a3f098d9c..000000000 --- a/ietf/mailinglists/migrations/0003_allowlisted.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.2.28 on 2022-12-05 14:26 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0029_use_timezone_now_for_person_models'), - ('mailinglists', '0002_auto_20190703_1344'), - ] - - operations = [ - migrations.RenameModel( - old_name='Whitelisted', - new_name='Allowlisted', - ), - migrations.AlterModelOptions( - name='allowlisted', - options={'verbose_name_plural': 'Allowlisted'}, - ), - ] diff --git a/ietf/mailtrigger/migrations/0001_initial.py b/ietf/mailtrigger/migrations/0001_initial.py index 37de9a646..7edadbcd4 100644 --- a/ietf/mailtrigger/migrations/0001_initial.py +++ b/ietf/mailtrigger/migrations/0001_initial.py @@ -1,9 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - - -from typing import List, Tuple # pyflakes:ignore +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations, models @@ -13,19 +8,9 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ] # type: List[Tuple[str]] + ] operations = [ - migrations.CreateModel( - name='MailTrigger', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('desc', models.TextField(blank=True)), - ], - options={ - 'ordering': ['slug'], - }, - ), migrations.CreateModel( name='Recipient', fields=[ @@ -37,14 +22,16 @@ class Migration(migrations.Migration): 'ordering': ['slug'], }, ), - migrations.AddField( - model_name='mailtrigger', - name='cc', - field=models.ManyToManyField(blank=True, related_name='used_in_cc', to='mailtrigger.Recipient'), - ), - migrations.AddField( - model_name='mailtrigger', - name='to', - field=models.ManyToManyField(blank=True, related_name='used_in_to', to='mailtrigger.Recipient'), + migrations.CreateModel( + name='MailTrigger', + fields=[ + ('slug', models.CharField(max_length=64, primary_key=True, serialize=False)), + ('desc', models.TextField(blank=True)), + ('cc', models.ManyToManyField(blank=True, related_name='used_in_cc', to='mailtrigger.Recipient')), + ('to', models.ManyToManyField(blank=True, related_name='used_in_to', to='mailtrigger.Recipient')), + ], + options={ + 'ordering': ['slug'], + }, ), ] diff --git a/ietf/mailtrigger/migrations/0002_conflrev_changes.py b/ietf/mailtrigger/migrations/0002_conflrev_changes.py deleted file mode 100644 index 858d3a11d..000000000 --- a/ietf/mailtrigger/migrations/0002_conflrev_changes.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.13 on 2018-05-21 12:07 - - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - conflrev_ad_changed = MailTrigger.objects.create( - slug = 'conflrev_ad_changed', - desc = 'Recipients when the responsible AD for a conflict review is changed', - ) - conflrev_ad_changed.to.set(Recipient.objects.filter(slug='iesg-secretary')) - conflrev_ad_changed.cc.set(Recipient.objects.filter(slug__in=[ - 'conflict_review_steering_group', - 'conflict_review_stream_manager', - 'doc_affecteddoc_authors', - 'doc_affecteddoc_group_chairs', - 'doc_affecteddoc_notify', - 'doc_notify', - 'iesg', - ])) - - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - MailTrigger.objects.filter(slug='conflrev_ad_changed').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0001_initial'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0003_add_review_notify_ad.py b/ietf/mailtrigger/migrations/0003_add_review_notify_ad.py deleted file mode 100644 index 5abf17538..000000000 --- a/ietf/mailtrigger/migrations/0003_add_review_notify_ad.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-11-02 11:34 - - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - Recipient.objects.create( - slug = 'review_doc_ad', - desc = "The reviewed document's responsible area director", - template = '{% if review_req.doc.ad %}{{review_req.doc.ad.email_address}}{% endif %}' - ) - Recipient.objects.create( - slug = 'review_team_ads', - desc = "The ADs of the team reviewing the document" - ) - - review_notify_ad = MailTrigger.objects.create( - slug = 'review_notify_ad', - desc = 'Recipients when a team notifies area directors when a review with one of a certain set of results (typically results indicating problem) is submitted', - ) - review_notify_ad.to.set(Recipient.objects.filter(slug__in=['review_doc_ad','review_team_ads'])) - - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - MailTrigger.objects.filter(slug='review_notify_ad').delete() - Recipient.objects.filter(slug='review_doc_ad').delete() - Recipient.objects.filter(slug='review_team_ads').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0002_conflrev_changes'), - ('review', '0004_reviewteamsettings_secr_mail_alias'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0004_ballot_rfceditornote_changed_postapproval.py b/ietf/mailtrigger/migrations/0004_ballot_rfceditornote_changed_postapproval.py deleted file mode 100644 index 50fb71a51..000000000 --- a/ietf/mailtrigger/migrations/0004_ballot_rfceditornote_changed_postapproval.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-11-03 00:24 - - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - changed = MailTrigger.objects.create( - slug = 'ballot_ednote_changed_late', - desc = 'Recipients when the RFC Editor note for a document is changed after the document has been approved', - ) - changed.to.set(Recipient.objects.filter(slug__in=['rfc_editor','iesg'])) - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - MailTrigger.objects.filter(slug='ballot_ednote_changed_late').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0003_add_review_notify_ad'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0005_slides_proposed.py b/ietf/mailtrigger/migrations/0005_slides_proposed.py deleted file mode 100644 index 88af91281..000000000 --- a/ietf/mailtrigger/migrations/0005_slides_proposed.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-25 06:11 - - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - changed = MailTrigger.objects.create( - slug = 'slides_proposed', - desc = 'Recipients when slides are proposed for a given session', - ) - changed.to.set(Recipient.objects.filter(slug__in=['group_chairs', 'group_responsible_directors', 'group_secretaries'])) - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - MailTrigger.objects.filter(slug='slides_proposed').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0004_ballot_rfceditornote_changed_postapproval'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/mailtrigger/migrations/0006_sub_new_wg_00.py b/ietf/mailtrigger/migrations/0006_sub_new_wg_00.py deleted file mode 100644 index 8b7936d90..000000000 --- a/ietf/mailtrigger/migrations/0006_sub_new_wg_00.py +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - Recipient.objects.create( - slug = 'new_wg_doc_list', - desc = "The email list for announcing new WG -00 submissions", - template = '' - ) - changed = MailTrigger.objects.create( - slug = 'sub_new_wg_00', - desc = 'Recipients when a new IETF WG -00 draft is announced', - ) - changed.to.set(Recipient.objects.filter(slug__in=['new_wg_doc_list'])) - - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - MailTrigger.objects.filter(slug='sub_new_wg_00').delete() - Recipient.objects.filter(slug='new_wg_doc_list').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0005_slides_proposed'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/mailtrigger/migrations/0007_add_review_mailtriggers.py b/ietf/mailtrigger/migrations/0007_add_review_mailtriggers.py deleted file mode 100644 index 91a963d18..000000000 --- a/ietf/mailtrigger/migrations/0007_add_review_mailtriggers.py +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - review_assignment_reviewer = Recipient.objects.create( - slug="review_assignment_reviewer", - desc="The reviewer assigned to a review assignment", - template="{% if not skip_review_reviewer %}{{review_assignment.reviewer.email_address}}{% endif %}", - ) - review_assignment_review_req_by = Recipient.objects.create( - slug="review_assignment_review_req_by", - desc="The requester of an assigned review", - template="{% if not skip_review_requested_by %}{{review_assignment.review_request.requested_by.email_address}}{% endif %}", - ) - review_req_requested_by = Recipient.objects.create( - slug="review_req_requested_by", - desc="The requester of a review", - template="{% if not skip_review_requested_by %}{{review_req.requested_by.email_address}}{% endif %}", - ) - review_req_reviewers = Recipient.objects.create( - slug="review_req_reviewers", - desc="All reviewers assigned to a review request", - template=None, - ) - review_secretaries = Recipient.objects.create( - slug="review_secretaries", - desc="The secretaries of the review team of a review request or assignment", - template=None, - ) - Recipient.objects.create( - slug="review_reviewer", - desc="A single reviewer", - template="{{reviewer.email_address}}", - ) - - review_assignment_changed = MailTrigger.objects.create( - slug="review_assignment_changed", - desc="Recipients for a change to a review assignment", - ) - review_assignment_changed.to.set([review_assignment_review_req_by, review_assignment_reviewer, - review_secretaries]) - - review_req_changed = MailTrigger.objects.create( - slug="review_req_changed", - desc="Recipients for a change to a review request", - ) - review_req_changed.to.set([review_req_requested_by, review_req_reviewers, review_secretaries]) - - review_availability_changed = MailTrigger.objects.create( - slug="review_availability_changed", - desc="Recipients for a change to a reviewer's availability", - ) - review_availability_changed.to.set( - Recipient.objects.filter(slug__in=['review_reviewer', 'group_secretaries']) - ) - - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - MailTrigger.objects.filter(slug__in=[ - 'review_assignment_changed', 'review_req_changed', 'review_availability_changed', - ]).delete() - Recipient.objects.filter(slug__in=[ - 'review_assignment_reviewer', 'review_assignment_review_req_by', 'review_req_requested_by', - 'review_req_reviewers', 'review_secretaries', 'review_reviewer', - ]).delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0006_sub_new_wg_00'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0008_lengthen_mailtrigger_slug.py b/ietf/mailtrigger/migrations/0008_lengthen_mailtrigger_slug.py deleted file mode 100644 index df83bdb5f..000000000 --- a/ietf/mailtrigger/migrations/0008_lengthen_mailtrigger_slug.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.23 on 2019-08-30 09:02 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0007_add_review_mailtriggers'), - ] - - operations = [ - migrations.AlterField( - model_name='mailtrigger', - name='slug', - field=models.CharField(max_length=64, primary_key=True, serialize=False), - ), - # The above migration will not update the ManyToMany tables, which also reference - # the mailtrigger pk as varchar(32), so manual SQL is used. - # https://code.djangoproject.com/ticket/25012 - migrations.RunSQL( - sql='ALTER TABLE `mailtrigger_mailtrigger_to` MODIFY `mailtrigger_id` varchar(64);', - reverse_sql='ALTER TABLE `mailtrigger_mailtrigger_to` MODIFY `mailtrigger_id` varchar(32);', - ), - migrations.RunSQL( - sql='ALTER TABLE `mailtrigger_mailtrigger_cc` MODIFY `mailtrigger_id` varchar(64);', - reverse_sql='ALTER TABLE `mailtrigger_mailtrigger_cc` MODIFY `mailtrigger_id` varchar(32);', - ), - ] diff --git a/ietf/mailtrigger/migrations/0009_custom_review_complete_mailtriggers.py b/ietf/mailtrigger/migrations/0009_custom_review_complete_mailtriggers.py deleted file mode 100644 index 496d4658f..000000000 --- a/ietf/mailtrigger/migrations/0009_custom_review_complete_mailtriggers.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - -def forward(apps, schema_editor): - ReviewTeamSettings = apps.get_model('review', 'ReviewTeamSettings') - MailTrigger = apps.get_model('mailtrigger', 'Mailtrigger') - Group = apps.get_model('group', 'Group') - GroupFeatures = apps.get_model('group', 'GroupFeatures') - - template = MailTrigger.objects.get(slug='review_completed') - template.desc = 'Default template for recipients when an review is completed - ' \ - 'customised mail triggers are used/created per team and review type.' - template.save() - - for group in Group.objects.all().only('pk', 'type', 'acronym'): - if not GroupFeatures.objects.get(type=group.type).has_reviews: - continue - try: - review_team = ReviewTeamSettings.objects.get(group=group.pk) - except ReviewTeamSettings.DoesNotExist: - continue - team_acronym = group.acronym.lower() - for review_type in review_team.review_types.all(): - slug = 'review_completed_{}_{}'.format(team_acronym, review_type.slug) - desc = 'Recipients when a {} {} review is completed'.format(team_acronym, review_type) - if MailTrigger.objects.filter(slug=slug): - # Never overwrite existing triggers - continue - mailtrigger = MailTrigger.objects.create(slug=slug, desc=desc) - mailtrigger.to.set(template.to.all()) - mailtrigger.cc.set(template.cc.all()) - - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0008_lengthen_mailtrigger_slug'), - ('review', '0014_document_primary_key_cleanup'), - ('group', '0019_rename_field_document2'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0010_add_review_reminder_mailtriggers.py b/ietf/mailtrigger/migrations/0010_add_review_reminder_mailtriggers.py deleted file mode 100644 index 384c55e8f..000000000 --- a/ietf/mailtrigger/migrations/0010_add_review_reminder_mailtriggers.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - review_reminder_overdue_assignment = MailTrigger.objects.create( - slug="review_reminder_overdue_assignment", - desc="Recipients for overdue review assignment reminders", - ) - review_reminder_overdue_assignment.to.add( - Recipient.objects.get(slug='group_secretaries') - ) - - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - MailTrigger.objects.filter(slug='review_reminder_overdue_assignment').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0009_custom_review_complete_mailtriggers'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0011_ietf_last_call.py b/ietf/mailtrigger/migrations/0011_ietf_last_call.py deleted file mode 100644 index 6999d64f9..000000000 --- a/ietf/mailtrigger/migrations/0011_ietf_last_call.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-04 12:12 - - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - Recipient = apps.get_model('mailtrigger','Recipient') - - ietf_last_call = Recipient.objects.create( - slug = 'ietf_last_call', - desc = 'The IETF Last Call list', - template = 'last-call@ietf.org' - ) - ietf_general = Recipient.objects.get(slug='ietf_general') - - review_completed_triggers = MailTrigger.objects.filter(slug__startswith='review_completed') - - for trigger in review_completed_triggers: - trigger.cc.remove(ietf_general) - trigger.cc.add(ietf_last_call) - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger','MailTrigger') - Recipient = apps.get_model('mailtrigger','Recipient') - - ietf_general = Recipient.objects.get(slug='ietf_general') - ietf_last_call = Recipient.objects.get(slug='ietf_last_call') - - review_completed_triggers = MailTrigger.objects.filter(slug__startswith='review_completed') - - for trigger in review_completed_triggers: - trigger.cc.remove(ietf_last_call) - trigger.cc.add(ietf_general) - - ietf_last_call.delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0010_add_review_reminder_mailtriggers'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/mailtrigger/migrations/0012_dont_last_call_early_reviews.py b/ietf/mailtrigger/migrations/0012_dont_last_call_early_reviews.py deleted file mode 100644 index 5302a0c89..000000000 --- a/ietf/mailtrigger/migrations/0012_dont_last_call_early_reviews.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-04 13:12 - - -from django.db import migrations - -def forward(apps, shema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - for trigger in MailTrigger.objects.filter(slug__startswith='review_completed',slug__endswith='early'): - trigger.cc.remove('ietf_last_call') - - -def reverse(apps, shema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - for trigger in MailTrigger.objects.filter(slug__startswith='review_completed',slug__endswith='early'): - trigger.cc.add('ietf_last_call') - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0011_ietf_last_call'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/mailtrigger/migrations/0013_add_irsg_ballot_saved.py b/ietf/mailtrigger/migrations/0013_add_irsg_ballot_saved.py deleted file mode 100644 index a7400e48a..000000000 --- a/ietf/mailtrigger/migrations/0013_add_irsg_ballot_saved.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-04 13:12 - - -from django.db import migrations - -def forward(apps, shema_editor): - Recipient = apps.get_model('mailtrigger','Recipient') - - irsg = Recipient.objects.create( - slug = 'irsg', - desc = 'The IRSG', - template = 'The IRSG ' - ) - - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - slug = 'irsg_ballot_saved' - desc = 'Recipients when a new IRSG ballot position with comments is saved' - irsg_ballot_saved = MailTrigger.objects.create( - slug=slug, - desc=desc - ) - irsg_ballot_saved.to.add(irsg) - irsg_ballot_saved.cc.set(Recipient.objects.filter(slug__in=['doc_affecteddoc_authors','doc_affecteddoc_group_chairs','doc_affecteddoc_notify','doc_authors','doc_group_chairs','doc_group_mail_list','doc_notify','doc_shepherd'])) - - # We cannot just change the slug of the existing ballot_saved table, - # because that will loose all the m2m entries in .to and .cc - ballot_saved = MailTrigger.objects.get(slug='ballot_saved') - iesg_ballot_saved = MailTrigger.objects.create(slug='iesg_ballot_saved') - iesg_ballot_saved.to.set(ballot_saved.to.all()) - iesg_ballot_saved.cc.set(ballot_saved.cc.all()) - iesg_ballot_saved.desc = ballot_saved.desc - iesg_ballot_saved.save() - -def reverse(apps, shema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - MailTrigger.objects.filter(slug='irsg_ballot_saved').delete() - MailTrigger.objects.filter(slug='iesg_ballot_saved').delete() - # - Recipient = apps.get_model('mailtrigger','Recipient') - Recipient.objects.filter(slug='irsg').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0012_dont_last_call_early_reviews'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/mailtrigger/migrations/0014_add_ad_approved_conflict_review.py b/ietf/mailtrigger/migrations/0014_add_ad_approved_conflict_review.py deleted file mode 100644 index b16d2bde3..000000000 --- a/ietf/mailtrigger/migrations/0014_add_ad_approved_conflict_review.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved - -from django.db import migrations - - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - ad_approved_conflict_review = MailTrigger.objects.create( - slug='ad_approved_conflict_review', - desc='Recipients when AD approves a conflict review pending announcement', - ) - ad_approved_conflict_review.to.add( - Recipient.objects.get(pk='iesg_secretary') - ) - - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - MailTrigger.objects.filter(slug='ad_approved_conflict_review').delete() - - -class Migration(migrations.Migration): - dependencies = [ - ('mailtrigger', '0013_add_irsg_ballot_saved'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/mailtrigger/migrations/0015_add_ad_approved_status_change.py b/ietf/mailtrigger/migrations/0015_add_ad_approved_status_change.py deleted file mode 100644 index 8fce9cac0..000000000 --- a/ietf/mailtrigger/migrations/0015_add_ad_approved_status_change.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved - -from django.db import migrations - - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - ad_approved_conflict_review = MailTrigger.objects.create( - slug='ad_approved_status_change', - desc='Recipients when AD approves a status change pending announcement', - ) - ad_approved_conflict_review.to.add( - Recipient.objects.get(pk='iesg_secretary') - ) - - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - MailTrigger.objects.filter(slug='ad_approved_status_change').delete() - - -class Migration(migrations.Migration): - dependencies = [ - ('mailtrigger', '0014_add_ad_approved_conflict_review'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/mailtrigger/migrations/0016_add_irsg_ballot_issued.py b/ietf/mailtrigger/migrations/0016_add_irsg_ballot_issued.py deleted file mode 100644 index 0e3accb74..000000000 --- a/ietf/mailtrigger/migrations/0016_add_irsg_ballot_issued.py +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - - -def replace_mailtrigger(MailTrigger, old_slug, new_slug): - """Replace a MailTrigger with an equivalent using a different slug""" - # Per 0013_add_irsg_ballot_saved.py, can't just modify the existing because that - # will lose the many-to-many relations. - orig_mailtrigger = MailTrigger.objects.get(slug=old_slug) - new_mailtrigger = MailTrigger.objects.create(slug=new_slug) - new_mailtrigger.to.set(orig_mailtrigger.to.all()) - new_mailtrigger.cc.set(orig_mailtrigger.cc.all()) - new_mailtrigger.desc = orig_mailtrigger.desc - new_mailtrigger.save() - orig_mailtrigger.delete() # get rid of the obsolete MailTrigger - - -def forward(apps, schema_editor): - """Forward migration: create irsg_ballot_issued and rename ballot_issued to iesg_ballot_issued""" - # Load historical models - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - # Create the new MailTrigger - irsg_ballot_issued = MailTrigger.objects.create( - slug='irsg_ballot_issued', - desc='Recipients when a new IRSG ballot is issued', - ) - irsg_ballot_issued.to.set(Recipient.objects.filter(slug='irsg')) - irsg_ballot_issued.cc.set(Recipient.objects.filter(slug__in=[ - 'doc_stream_manager', 'doc_affecteddoc_authors', 'doc_affecteddoc_group_chairs', - 'doc_affecteddoc_notify', 'doc_authors', 'doc_group_chairs', 'doc_group_mail_list', - 'doc_notify', 'doc_shepherd' - ])) - - # Replace existing 'ballot_issued' object with an 'iesg_ballot_issued' - replace_mailtrigger(MailTrigger, 'ballot_issued', 'iesg_ballot_issued') - - -def reverse(apps, shema_editor): - """Reverse migration: rename iesg_ballot_issued to ballot_issued and remove irsg_ballot_issued""" - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - MailTrigger.objects.filter(slug='irsg_ballot_issued').delete() - replace_mailtrigger(MailTrigger, 'iesg_ballot_issued', 'ballot_issued') - - -class Migration(migrations.Migration): - dependencies = [ - ('mailtrigger', '0015_add_ad_approved_status_change'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/mailtrigger/migrations/0017_lc_to_yang_doctors.py b/ietf/mailtrigger/migrations/0017_lc_to_yang_doctors.py deleted file mode 100644 index 6685d857f..000000000 --- a/ietf/mailtrigger/migrations/0017_lc_to_yang_doctors.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - Recipient.objects.create( - slug = 'yang_doctors_secretaries', - desc = 'Yang Doctors Secretaries', - template = '' - ) - - lc_to_yang_doctors = MailTrigger.objects.create( - slug='last_call_of_doc_with_yang_issued', - desc='Recipients when IETF LC is issued on a document with yang checks', - ) - - lc_to_yang_doctors.to.set(Recipient.objects.filter(slug='yang_doctors_secretaries')) - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - MailTrigger.objects.filter(slug='last_call_of_doc_with_yang_issued').delete() - Recipient.objects.filter(slug='yang_doctors_secretaries').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0016_add_irsg_ballot_issued'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/mailtrigger/migrations/0018_interim_approve_announce.py b/ietf/mailtrigger/migrations/0018_interim_approve_announce.py deleted file mode 100644 index a3e810f0f..000000000 --- a/ietf/mailtrigger/migrations/0018_interim_approve_announce.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright The IETF Trust 2020 All Rights Reserved - -from django.db import migrations - -def forward(apps,schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - interim_approved = MailTrigger.objects.get(slug='interim_approved') - interim_approved.desc = 'Recipients when an interim meeting is approved' - interim_approved.save() - interim_approved.to.set(Recipient.objects.filter(slug__in=('group_chairs','logged_in_person'))) - - interim_announce_requested = MailTrigger.objects.create( - slug='interim_announce_requested', - desc='Recipients when an interim announcement is requested', - ) - interim_announce_requested.to.set(Recipient.objects.filter(slug='iesg_secretary')) - - -def reverse(apps,schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - MailTrigger.objects.filter(slug='interim_announce_requested').delete() - - interim_approved = MailTrigger.objects.get(slug='interim_approved') - interim_approved.desc = 'Recipients when an interim meeting is approved and an announcement needs to be sent' - interim_approved.save() - interim_approved.to.set(Recipient.objects.filter(slug='iesg_secretary')) - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0017_lc_to_yang_doctors'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/mailtrigger/migrations/0019_email_iana_expert_review_state_changed.py b/ietf/mailtrigger/migrations/0019_email_iana_expert_review_state_changed.py deleted file mode 100644 index 9818b4427..000000000 --- a/ietf/mailtrigger/migrations/0019_email_iana_expert_review_state_changed.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2020 All Rights Reserved - -from django.db import migrations - -def forward(apps,schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - iana_er_state_changed = MailTrigger.objects.create( - slug='iana_expert_review_state_changed', - desc='Recipients when the IANA expert review for a document changes', - ) - - iana_er_state_changed.to.set( - Recipient.objects.filter(slug__in=[ - 'doc_ad', 'doc_authors', 'doc_group_chairs', 'doc_group_responsible_directors', 'doc_notify', 'doc_shepherd' - ]) - ) - -def reverse(apps,schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - - MailTrigger.objects.filter(slug='iana_expert_review_state_changed').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0018_interim_approve_announce'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/mailtrigger/migrations/0020_add_ad_approval_request_mailtriggers.py b/ietf/mailtrigger/migrations/0020_add_ad_approval_request_mailtriggers.py deleted file mode 100644 index c1cfd7277..000000000 --- a/ietf/mailtrigger/migrations/0020_add_ad_approval_request_mailtriggers.py +++ /dev/null @@ -1,58 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-23 09:54 - -from django.db import migrations - - -def forward(apps, schema_editor): - """Add new MailTrigger and Recipients, remove the one being replaced""" - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - MailTrigger.objects.create( - slug='sub_director_approval_requested', - desc='Recipients for a message requesting AD approval of a revised draft submission', - ).to.add( - Recipient.objects.create( - pk='sub_group_parent_directors', - desc="ADs for the parent group of a submission" - ) - ) - - MailTrigger.objects.create( - slug='sub_replaced_doc_chair_approval_requested', - desc='Recipients for a message requesting chair approval of a replaced WG document', - ).to.add( - Recipient.objects.get(pk='doc_group_chairs') - ) - - MailTrigger.objects.create( - slug='sub_replaced_doc_director_approval_requested', - desc='Recipients for a message requesting AD approval of a replaced WG document', - ).to.add( - Recipient.objects.create( - pk='doc_group_parent_directors', - desc='ADs for the parent group of a doc' - ) - ) - - -def reverse(apps, schema_editor): - """Remove the MailTrigger and Recipient created in the forward migration""" - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - MailTrigger.objects.filter(slug='sub_director_approval_requested').delete() - MailTrigger.objects.filter(slug='sub_replaced_doc_chair_approval_requested').delete() - MailTrigger.objects.filter(slug='sub_replaced_doc_director_approval_requested').delete() - Recipient = apps.get_model('mailtrigger', 'Recipient') - Recipient.objects.filter(pk='sub_group_parent_directors').delete() - Recipient.objects.filter(pk='doc_group_parent_directors').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0019_email_iana_expert_review_state_changed'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0021_email_remind_action_holders.py b/ietf/mailtrigger/migrations/0021_email_remind_action_holders.py deleted file mode 100644 index 704b452a5..000000000 --- a/ietf/mailtrigger/migrations/0021_email_remind_action_holders.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright The IETF Trust 2020 All Rights Reserved - -from django.db import migrations - - -def forward(apps,schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - (doc_action_holders, _) = Recipient.objects.get_or_create( - slug='doc_action_holders', - desc='Action holders for a document', - template='{% for action_holder in doc.action_holders.all %}{% if doc.shepherd and action_holder == doc.shepherd.person %}{{ doc.shepherd }}{% else %}{{ action_holder.email }}{% endif %}{% if not forloop.last %},{%endif %}{% endfor %}', - ) - (doc_remind_action_holders, _) = MailTrigger.objects.get_or_create( - slug='doc_remind_action_holders', - desc='Recipients when sending a reminder email to action holders for a document', - ) - doc_remind_action_holders.to.set([doc_action_holders]) - - -def reverse(apps,schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - MailTrigger.objects.filter(slug='doc_remind_action_holders').delete() - Recipient.objects.filter(slug='doc_action_holders').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0020_add_ad_approval_request_mailtriggers'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0022_add_doc_external_resource_change_requested.py b/ietf/mailtrigger/migrations/0022_add_doc_external_resource_change_requested.py deleted file mode 100644 index 92ace7a8d..000000000 --- a/ietf/mailtrigger/migrations/0022_add_doc_external_resource_change_requested.py +++ /dev/null @@ -1,37 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-13 07:20 - -from django.db import migrations - - -def forward(apps, schema_editor): - """Add new MailTrigger and Recipients""" - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - mt, created = MailTrigger.objects.get_or_create(slug='doc_external_resource_change_requested') - if created: - mt.desc='Recipients when a change to the external resources for a document is requested.' - mt.save() - for recipient_slug in [ - "doc_ad", - "doc_group_chairs", - "doc_group_delegates", - "doc_shepherd", - "doc_stream_manager" - ]: - mt.to.add(Recipient.objects.get(slug=recipient_slug)) - - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0021_email_remind_action_holders'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/mailtrigger/migrations/0023_bofreq_triggers.py b/ietf/mailtrigger/migrations/0023_bofreq_triggers.py deleted file mode 100644 index 4c3580140..000000000 --- a/ietf/mailtrigger/migrations/0023_bofreq_triggers.py +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved -# Generated by Django 2.2.23 on 2021-05-26 07:52 - -from django.db import migrations - -def forward(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - - Recipient.objects.create(slug='bofreq_editors',desc='BOF request editors',template='') - Recipient.objects.create(slug='bofreq_previous_editors',desc='Editors of the prior version of a BOF request', - template='{% for editor in previous_editors %}{{editor.email_address}}{% if not forloop.last %},{% endif %}{% endfor %}') - - Recipient.objects.create(slug='bofreq_responsible',desc='BOF request responsible leadership',template='') - Recipient.objects.create(slug='bofreq_previous_responsible',desc='BOF request responsible leadership before change', template='') - - mt = MailTrigger.objects.create(slug='bofreq_title_changed',desc='Recipients when the title of a BOF proposal is changed.') - mt.to.set(Recipient.objects.filter(slug__in=['bofreq_responsible', 'bofreq_editors', 'doc_notify'])) - - mt = MailTrigger.objects.create(slug='bofreq_editors_changed',desc='Recipients when the editors of a BOF proposal are changed.') - mt.to.set(Recipient.objects.filter(slug__in=['bofreq_responsible', 'bofreq_editors', 'bofreq_previous_editors', 'doc_notify'])) - - mt = MailTrigger.objects.create(slug='bofreq_responsible_changed',desc='Recipients when the responsible leadership of a BOF proposal are changed.') - mt.to.set(Recipient.objects.filter(slug__in=['bofreq_responsible', 'bofreq_editors', 'bofreq_previous_responsible', 'doc_notify'])) - - mt = MailTrigger.objects.create(slug='bofreq_new_revision', desc='Recipients when a new revision of a BOF request is uploaded.') - mt.to.set(Recipient.objects.filter(slug__in=['bofreq_responsible', 'bofreq_editors', 'doc_notify'])) - - for recipient in Recipient.objects.filter(slug__in=['bofreq_responsible','bofreq_editors']): - MailTrigger.objects.get(slug='doc_state_edited').to.add(recipient) - -def reverse(apps, schema_editor): - MailTrigger = apps.get_model('mailtrigger', 'MailTrigger') - Recipient = apps.get_model('mailtrigger', 'Recipient') - for recipient in Recipient.objects.filter(slug__in=['bofreq_responsible','bofreq_editors']): - MailTrigger.objects.get(slug='doc_state_edited').to.remove(recipient) - MailTrigger.objects.filter(slug__in=('bofreq_title_changed', 'bofreq_editors_changed', 'bofreq_new_revision', 'bofreq_responsible_changed')).delete() - Recipient.objects.filter(slug__in=('bofreq_editors', 'bofreq_previous_editors')).delete() - Recipient.objects.filter(slug__in=('bofreq_responsible', 'bofreq_previous_responsible')).delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('mailtrigger', '0022_add_doc_external_resource_change_requested'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/mailtrigger/migrations/0024_rsab_ballots.py b/ietf/mailtrigger/migrations/0024_rsab_ballots.py deleted file mode 100644 index 1db69a9a2..000000000 --- a/ietf/mailtrigger/migrations/0024_rsab_ballots.py +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved# Generated by Django 2.2.28 on 2022-12-22 22:41 - -from django.db import migrations - - -def forward(apps, schema_editor): - Recipient = apps.get_model("mailtrigger", "Recipient") - MailTrigger = apps.get_model("mailtrigger", "MailTrigger") - - rsab = Recipient.objects.create( - slug="rsab", - desc="The RFC Series Approval Board", - template="The RSAB ", - ) - - rsab_ballot_saved = MailTrigger.objects.create( - slug="rsab_ballot_saved", - desc="Recipients when a new RSAB ballot position with comments is saved", - ) - rsab_ballot_saved.to.add(rsab) - rsab_ballot_saved.cc.set( - Recipient.objects.filter( - slug__in=[ - "doc_affecteddoc_authors", - "doc_affecteddoc_group_chairs", - "doc_affecteddoc_notify", - "doc_authors", - "doc_group_chairs", - "doc_group_mail_list", - "doc_notify", - "doc_shepherd", - ] - ) - ) - - rsab_ballot_issued = MailTrigger.objects.create( - slug="rsab_ballot_issued", - desc="Recipients when a new RSAB ballot is issued", - ) - rsab_ballot_issued.to.add(rsab) - rsab_ballot_issued.cc.set( - Recipient.objects.filter( - slug__in=[ - "doc_affecteddoc_authors", - "doc_affecteddoc_group_chairs", - "doc_affecteddoc_notify", - "doc_authors", - "doc_group_chairs", - "doc_group_mail_list", - "doc_notify", - "doc_shepherd", - ] - ) - ) - - -def reverse(apps, schema_editor): - Recipient = apps.get_model("mailtrigger", "Recipient") - MailTrigger = apps.get_model("mailtrigger", "MailTrigger") - MailTrigger.objects.filter( - slug__in=("rsab_ballot_issued", "rsab_ballot_saved") - ).delete() - Recipient.objects.filter(slug="rsab").delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ("mailtrigger", "0023_bofreq_triggers"), - ] - - operations = [migrations.RunPython(forward, reverse)] diff --git a/ietf/meeting/migrations/0001_initial.py b/ietf/meeting/migrations/0001_initial.py index 668fd0392..d98c5619d 100644 --- a/ietf/meeting/migrations/0001_initial.py +++ b/ietf/meeting/migrations/0001_initial.py @@ -1,15 +1,15 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 import datetime import django.core.validators from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone import ietf.meeting.models +import ietf.utils.fields import ietf.utils.models import ietf.utils.storage +import ietf.utils.validators class Migration(migrations.Migration): @@ -17,19 +17,20 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('group', '0001_initial'), - ('name', '0001_initial'), ('dbtemplate', '0001_initial'), + ('name', '0001_initial'), ('person', '0001_initial'), + ('group', '0001_initial'), ('doc', '0001_initial'), ] operations = [ migrations.CreateModel( - name='Constraint', + name='BusinessConstraint', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('day', models.DateTimeField(blank=True, null=True)), + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('penalty', models.IntegerField(default=0, help_text='The penalty for violating this kind of constraint; for instance 10 (small penalty) or 10000 (large penalty)')), ], ), migrations.CreateModel( @@ -37,20 +38,13 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=255)), - ('short', models.CharField(default='', max_length=2)), - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('short', models.CharField(default='', max_length=3)), + ('modified', models.DateTimeField(auto_now=True)), ('order', models.SmallIntegerField()), ('image', models.ImageField(blank=True, default=None, storage=ietf.utils.storage.NoLocationMigrationFileSystemStorage(location=None), upload_to=ietf.meeting.models.floorplan_path)), ], - ), - migrations.CreateModel( - name='ImportantDate', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ], options={ - 'ordering': ['-meeting', 'date'], + 'ordering': ['-id'], }, ), migrations.CreateModel( @@ -61,12 +55,12 @@ class Migration(migrations.Migration): ('date', models.DateField()), ('days', models.IntegerField(default=7, help_text='The number of days the meeting lasts', validators=[django.core.validators.MinValueValidator(1)])), ('city', models.CharField(blank=True, max_length=255)), - ('country', models.CharField(blank=True, choices=[('', ''), ('AF', 'Afghanistan'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua & Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('B', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia'), ('BA', 'Bosnia & Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('G', 'Britain (UK)'), ('IO', 'British Indian Ocean Territory'), ('BN', 'Brunei'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('CV', 'Cape Verde'), ('BQ', 'Caribbean NL'), ('KY', 'Cayman Islands'), ('CF', 'Central African Rep.'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos (Keeling) Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CD', 'Congo (Dem. Rep.)'), ('CG', 'Congo (Rep.)'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Cura\xe7ao'), ('CY', 'Cyprus'), ('CZ', 'Czech Republic'), ('CI', "C\xf4te d'Ivoire"), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('TL', 'East Timor'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern & Antarctic Lands'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island & McDonald Islands'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('KP', 'Korea (North)'), ('KR', 'Korea (South)'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', 'Laos'), ('LV', 'Latvia'), ('L', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macau'), ('MK', 'Macedonia'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia'), ('MD', 'Moldova'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar (Burma)'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestine'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('RO', 'Romania'), ('RU', 'Russia'), ('RW', 'Rwanda'), ('RE', 'R\xe9union'), ('AS', 'Samoa (American)'), ('WS', 'Samoa (western)'), ('SM', 'San Marino'), ('ST', 'Sao Tome & Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('S', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia & the South Sandwich Islands'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('BL', 'St Barthelemy'), ('SH', 'St Helena'), ('KN', 'St Kitts & Nevis'), ('LC', 'St Lucia'), ('SX', 'St Maarten (Dutch)'), ('MF', 'St Martin (French)'), ('PM', 'St Pierre & Miquelon'), ('VC', 'St Vincent'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard & Jan Mayen'), ('SZ', 'Swaziland'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syria'), ('TW', 'Taiwan'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania'), ('TH', 'Thailand'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad & Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks & Caicos Is'), ('TV', 'Tuvalu'), ('UM', 'US minor outlying islands'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('US', 'United States'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VA', 'Vatican City'), ('VE', 'Venezuela'), ('VN', 'Vietnam'), ('VG', 'Virgin Islands (UK)'), ('VI', 'Virgin Islands (US)'), ('WF', 'Wallis & Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe'), ('AX', '\xc5land Islands')], max_length=2)), - ('time_zone', models.CharField(blank=True, choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Godtha', 'America/Godtha'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/Kralendijk', 'America/Kralendijk'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Lower_Princes', 'America/Lower_Princes'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Marigot', 'America/Marigot'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Barthelemy', 'America/St_Barthelemy'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Arctic/Longyearbyen', 'Arctic/Longyearbyen'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Canada/Atlantic', 'Canada/Atlantic'), ('Canada/Central', 'Canada/Central'), ('Canada/Eastern', 'Canada/Eastern'), ('Canada/Mountain', 'Canada/Mountain'), ('Canada/Newfoundland', 'Canada/Newfoundland'), ('Canada/Pacific', 'Canada/Pacific'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Bratislava', 'Europe/Bratislava'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Busingen', 'Europe/Busingen'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Guernsey', 'Europe/Guernsey'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Isle_of_Man', 'Europe/Isle_of_Man'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Jersey', 'Europe/Jersey'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/Ljubljana', 'Europe/Ljubljana'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Mariehamn', 'Europe/Mariehamn'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Podgorica', 'Europe/Podgorica'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/San_Marino', 'Europe/San_Marino'), ('Europe/Sarajevo', 'Europe/Sarajevo'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Skopje', 'Europe/Skopje'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vatican', 'Europe/Vatican'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zagre', 'Europe/Zagre'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('US/Alaska', 'US/Alaska'), ('US/Arizona', 'US/Arizona'), ('US/Central', 'US/Central'), ('US/Eastern', 'US/Eastern'), ('US/Hawaii', 'US/Hawaii'), ('US/Mountain', 'US/Mountain'), ('US/Pacific', 'US/Pacific'), ('UTC', 'UTC')], max_length=255)), + ('country', models.CharField(blank=True, choices=[('', '---------'), ('AF', 'Afghanistan'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua & Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('BB', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia'), ('BA', 'Bosnia & Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('GB', 'Britain (UK)'), ('IO', 'British Indian Ocean Territory'), ('BN', 'Brunei'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('CV', 'Cape Verde'), ('BQ', 'Caribbean NL'), ('KY', 'Cayman Islands'), ('CF', 'Central African Rep.'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos (Keeling) Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CD', 'Congo (Dem. Rep.)'), ('CG', 'Congo (Rep.)'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Curaçao'), ('CY', 'Cyprus'), ('CZ', 'Czech Republic'), ('CI', "Côte d'Ivoire"), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('TL', 'East Timor'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('SZ', 'Eswatini (Swaziland)'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern & Antarctic Lands'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island & McDonald Islands'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('KP', 'Korea (North)'), ('KR', 'Korea (South)'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', 'Laos'), ('LV', 'Latvia'), ('LB', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macau'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia'), ('MD', 'Moldova'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar (Burma)'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('MK', 'North Macedonia'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestine'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('RO', 'Romania'), ('RU', 'Russia'), ('RW', 'Rwanda'), ('RE', 'Réunion'), ('AS', 'Samoa (American)'), ('WS', 'Samoa (western)'), ('SM', 'San Marino'), ('ST', 'Sao Tome & Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('SB', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia & the South Sandwich Islands'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('BL', 'St Barthelemy'), ('SH', 'St Helena'), ('KN', 'St Kitts & Nevis'), ('LC', 'St Lucia'), ('SX', 'St Maarten (Dutch)'), ('MF', 'St Martin (French)'), ('PM', 'St Pierre & Miquelon'), ('VC', 'St Vincent'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard & Jan Mayen'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syria'), ('TW', 'Taiwan'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania'), ('TH', 'Thailand'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad & Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks & Caicos Is'), ('TV', 'Tuvalu'), ('UM', 'US minor outlying islands'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('US', 'United States'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VA', 'Vatican City'), ('VE', 'Venezuela'), ('VN', 'Vietnam'), ('VG', 'Virgin Islands (UK)'), ('VI', 'Virgin Islands (US)'), ('WF', 'Wallis & Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe'), ('AX', 'Åland Islands')], max_length=2)), + ('time_zone', models.CharField(choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Nuuk', 'America/Nuuk'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Kyiv', 'Europe/Kyiv'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kanton', 'Pacific/Kanton'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], default='UTC', max_length=255)), ('idsubmit_cutoff_day_offset_00', models.IntegerField(blank=True, default=13, help_text='The number of days before the meeting start date when the submission of -00 drafts will be closed.')), ('idsubmit_cutoff_day_offset_01', models.IntegerField(blank=True, default=13, help_text='The number of days before the meeting start date when the submission of -01 drafts etc. will be closed.')), - ('idsubmit_cutoff_time_utc', models.DurationField(blank=True, default=datetime.timedelta(0, 86399), help_text='The time of day (UTC) after which submission will be closed. Use for example 23:59:59.')), - ('idsubmit_cutoff_warning_days', models.DurationField(blank=True, default=datetime.timedelta(21), help_text="How long before the 00 cutoff to start showing cutoff warnings. Use for example '21' or '21 days'.")), + ('idsubmit_cutoff_time_utc', models.DurationField(blank=True, default=datetime.timedelta(seconds=86399), help_text='The time of day (UTC) after which submission will be closed. Use for example 23:59:59.')), + ('idsubmit_cutoff_warning_days', models.DurationField(blank=True, default=datetime.timedelta(days=21), help_text="How long before the 00 cutoff to start showing cutoff warnings. Use for example '21' or '21 days'.")), ('submission_start_day_offset', models.IntegerField(blank=True, default=90, help_text='The number of days before the meeting start date after which meeting materials will be accepted.')), ('submission_cutoff_day_offset', models.IntegerField(blank=True, default=26, help_text='The number of days after the meeting start date in which new meeting materials will be accepted.')), ('submission_correction_day_offset', models.IntegerField(blank=True, default=50, help_text='The number of days after the meeting start date in which updates to existing meeting materials will be accepted.')), @@ -74,14 +68,18 @@ class Migration(migrations.Migration): ('venue_addr', models.TextField(blank=True)), ('break_area', models.CharField(blank=True, max_length=255)), ('reg_area', models.CharField(blank=True, max_length=255)), - ('agenda_note', models.TextField(blank=True, help_text='Text in this field will be placed at the top of the html agenda page for the meeting. HTML can be used, but will not be validated.')), + ('agenda_info_note', models.TextField(blank=True, help_text='Text in this field will be placed at the top of the html agenda page for the meeting. HTML can be used, but will not be validated.')), + ('agenda_warning_note', models.TextField(blank=True, help_text='Text in this field will be placed more prominently at the top of the html agenda page for the meeting. HTML can be used, but will not be validated.')), ('session_request_lock_message', models.CharField(blank=True, max_length=255)), ('proceedings_final', models.BooleanField(default=False, help_text='Are the proceedings for this meeting complete?')), ('acknowledgements', models.TextField(blank=True, help_text='Acknowledgements for use in meeting proceedings. Use ReStructuredText markup.')), ('show_important_dates', models.BooleanField(default=False)), + ('attendees', models.IntegerField(blank=True, default=None, help_text='Number of Attendees for backfilled meetings, leave it blank for new meetings, and then it is calculated from the registrations', null=True)), + ('group_conflict_types', models.ManyToManyField(blank=True, help_text='Types of scheduling conflict between groups to consider', limit_choices_to={'is_group_conflict': True}, to='name.ConstraintName')), + ('overview', ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='overview', to='dbtemplate.DBTemplate')), ], options={ - 'ordering': ['-date', 'id'], + 'ordering': ['-date', '-id'], }, ), migrations.CreateModel( @@ -97,7 +95,7 @@ class Migration(migrations.Migration): name='Room', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('modified', models.DateTimeField(auto_now=True)), ('name', models.CharField(max_length=255)), ('functional_name', models.CharField(blank=True, max_length=255)), ('capacity', models.IntegerField(blank=True, null=True)), @@ -111,7 +109,7 @@ class Migration(migrations.Migration): ('session_types', models.ManyToManyField(blank=True, to='name.TimeSlotTypeName')), ], options={ - 'ordering': ['-meeting', 'name'], + 'ordering': ['-id'], }, ), migrations.CreateModel( @@ -128,18 +126,6 @@ class Migration(migrations.Migration): 'ordering': ['timeslot__time', 'timeslot__type__slug', 'session__group__parent__name', 'session__group__acronym', 'session__name'], }, ), - migrations.CreateModel( - name='Schedule', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=16)), - ('visible', models.BooleanField(default=True, help_text='Make this agenda available to those who know about it.')), - ('public', models.BooleanField(default=True, help_text='Make this agenda publically available.')), - ('badness', models.IntegerField(blank=True, null=True)), - ('meeting', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='meeting.Meeting')), - ('owner', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ], - ), migrations.CreateModel( name='Session', fields=[ @@ -148,28 +134,24 @@ class Migration(migrations.Migration): ('short', models.CharField(blank=True, help_text="Short version of 'name' above, for use in filenames.", max_length=32)), ('attendees', models.IntegerField(blank=True, null=True)), ('agenda_note', models.CharField(blank=True, max_length=255)), - ('requested', models.DateTimeField(default=datetime.datetime.now)), ('requested_duration', models.DurationField(default=datetime.timedelta(0))), ('comments', models.TextField(blank=True)), ('scheduled', models.DateTimeField(blank=True, null=True)), ('modified', models.DateTimeField(auto_now=True)), ('remote_instructions', models.CharField(blank=True, max_length=1024)), + ('on_agenda', models.BooleanField(default=True, help_text='Is this session visible on the meeting agenda?')), ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('joint_with_groups', models.ManyToManyField(blank=True, related_name='sessions_joint_in', to='group.Group')), ], ), migrations.CreateModel( - name='SessionPresentation', + name='UrlResource', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('rev', models.CharField(blank=True, max_length=16, null=True, verbose_name='revision')), - ('order', models.PositiveSmallIntegerField(default=0)), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), - ('session', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Session')), + ('url', models.URLField(blank=True, null=True)), + ('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.RoomResourceName')), + ('room', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Room')), ], - options={ - 'ordering': ('order',), - 'db_table': 'meeting_session_materials', - }, ), migrations.CreateModel( name='TimeSlot', @@ -186,18 +168,37 @@ class Migration(migrations.Migration): ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.TimeSlotTypeName')), ], options={ - 'ordering': ['-time', 'id'], + 'ordering': ['-time', '-id'], }, ), migrations.CreateModel( - name='UrlResource', + name='SlideSubmission', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('url', models.URLField(blank=True, null=True)), - ('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.RoomResourceName')), - ('room', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Room')), + ('time', models.DateTimeField(auto_now=True)), + ('title', models.CharField(max_length=255)), + ('filename', models.CharField(max_length=255)), + ('apply_to_all', models.BooleanField(default=False)), + ('doc', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='doc.Document')), + ('session', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Session')), + ('status', ietf.utils.models.ForeignKey(default='pending', null=True, on_delete=django.db.models.deletion.SET_NULL, to='name.SlideSubmissionStatusName')), + ('submitter', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), ], ), + migrations.CreateModel( + name='SessionPresentation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rev', models.CharField(blank=True, max_length=16, null=True, verbose_name='revision')), + ('order', models.PositiveSmallIntegerField(default=0)), + ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), + ('session', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Session')), + ], + options={ + 'db_table': 'meeting_session_materials', + 'ordering': ('order',), + }, + ), migrations.AddField( model_name='session', name='materials', @@ -210,8 +211,8 @@ class Migration(migrations.Migration): ), migrations.AddField( model_name='session', - name='requested_by', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + name='purpose', + field=ietf.utils.models.ForeignKey(help_text='Purpose of the session', on_delete=django.db.models.deletion.CASCADE, to='name.SessionPurposeName'), ), migrations.AddField( model_name='session', @@ -220,14 +221,39 @@ class Migration(migrations.Migration): ), migrations.AddField( model_name='session', - name='status', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.SessionStatusName'), + name='tombstone_for', + field=models.ForeignKey(blank=True, help_text='This session is the tombstone for a session that was rescheduled', null=True, on_delete=django.db.models.deletion.CASCADE, to='meeting.Session'), ), migrations.AddField( model_name='session', name='type', field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.TimeSlotTypeName'), ), + migrations.CreateModel( + name='SchedulingEvent', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time', models.DateTimeField(default=django.utils.timezone.now, help_text='When the event happened')), + ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('session', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Session')), + ('status', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.SessionStatusName')), + ], + ), + migrations.CreateModel( + name='Schedule', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(help_text='Letters, numbers and -:_ allowed.', max_length=64, validators=[django.core.validators.RegexValidator('^[A-Za-z0-9-:_]*$')])), + ('visible', models.BooleanField(default=True, help_text='Show in the list of possible agendas for the meeting.', verbose_name='Show in agenda list')), + ('public', models.BooleanField(default=True, help_text='Allow others to see this agenda.')), + ('badness', models.IntegerField(blank=True, null=True)), + ('notes', models.TextField(blank=True)), + ('base', ietf.utils.models.ForeignKey(blank=True, help_text='Sessions scheduled in the base schedule show up in this schedule too.', limit_choices_to={'base': None}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='derivedschedule_set', to='meeting.Schedule')), + ('meeting', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='schedule_set', to='meeting.Meeting')), + ('origin', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='meeting.Schedule')), + ('owner', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + ), migrations.AddField( model_name='schedtimesessassignment', name='schedule', @@ -243,59 +269,99 @@ class Migration(migrations.Migration): name='timeslot', field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sessionassignments', to='meeting.TimeSlot'), ), - migrations.AddField( - model_name='meeting', - name='agenda', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='meeting.Schedule'), + migrations.CreateModel( + name='ProceedingsMaterial', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('document', ietf.utils.models.ForeignKey(limit_choices_to={'type_id': 'procmaterials'}, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', unique=True)), + ('meeting', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='proceedings_materials', to='meeting.Meeting')), + ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ProceedingsMaterialTypeName')), + ], + ), + migrations.CreateModel( + name='MeetingHost', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('logo', ietf.utils.fields.MissingOkImageField(height_field='logo_height', storage=ietf.utils.storage.NoLocationMigrationFileSystemStorage(location=None), upload_to=ietf.meeting.models._host_upload_path, validators=[ietf.utils.validators.MaxImageSizeValidator(400, 400), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_file_size, True), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_file_extension, ['.png', '.jpg', '.jpeg']), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_mime_type, ['image/jpeg', 'image/png'], True)], width_field='logo_width')), + ('logo_width', models.PositiveIntegerField(null=True)), + ('logo_height', models.PositiveIntegerField(null=True)), + ('meeting', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='meetinghosts', to='meeting.Meeting')), + ], + options={ + 'ordering': ('pk',), + }, ), migrations.AddField( model_name='meeting', - name='overview', - field=ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='overview', to='dbtemplate.DBTemplate'), + name='schedule', + field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='meeting.Schedule'), ), migrations.AddField( model_name='meeting', name='type', field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.MeetingTypeName'), ), - migrations.AddField( - model_name='importantdate', - name='meeting', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Meeting'), - ), - migrations.AddField( - model_name='importantdate', - name='name', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ImportantDateName'), + migrations.CreateModel( + name='ImportantDate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateField()), + ('meeting', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Meeting')), + ('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ImportantDateName')), + ], + options={ + 'ordering': ['-meeting_id', 'date'], + }, ), migrations.AddField( model_name='floorplan', name='meeting', field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Meeting'), ), - migrations.AddField( - model_name='constraint', - name='meeting', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Meeting'), + migrations.CreateModel( + name='Constraint', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time_relation', models.CharField(blank=True, choices=[('subsequent-days', 'Schedule the sessions on subsequent days'), ('one-day-seperation', 'Leave at least one free day in between the two sessions')], max_length=200)), + ('meeting', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Meeting')), + ('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ConstraintName')), + ('person', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('source', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='constraint_source_set', to='group.Group')), + ('target', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='constraint_target_set', to='group.Group')), + ('timeranges', models.ManyToManyField(to='name.TimerangeName')), + ], ), - migrations.AddField( - model_name='constraint', - name='name', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ConstraintName'), + migrations.CreateModel( + name='Attended', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('session', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Session')), + ], ), - migrations.AddField( - model_name='constraint', - name='person', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + migrations.AddIndex( + model_name='timeslot', + index=models.Index(fields=['-time', '-id'], name='meeting_tim_time_b802cb_idx'), ), - migrations.AddField( - model_name='constraint', - name='source', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='constraint_source_set', to='group.Group'), + migrations.AlterUniqueTogether( + name='sessionpresentation', + unique_together={('session', 'document')}, ), - migrations.AddField( - model_name='constraint', - name='target', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='constraint_target_set', to='group.Group'), + migrations.AlterUniqueTogether( + name='proceedingsmaterial', + unique_together={('meeting', 'type')}, + ), + migrations.AlterUniqueTogether( + name='meetinghost', + unique_together={('meeting', 'name')}, + ), + migrations.AddIndex( + model_name='meeting', + index=models.Index(fields=['-date', '-id'], name='meeting_mee_date_40ca21_idx'), + ), + migrations.AlterUniqueTogether( + name='attended', + unique_together={('person', 'session')}, ), ] diff --git a/ietf/meeting/migrations/0002_auto_20180225_1207.py b/ietf/meeting/migrations/0002_auto_20180225_1207.py deleted file mode 100644 index 523dd66bc..000000000 --- a/ietf/meeting/migrations/0002_auto_20180225_1207.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-25 12:07 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0001_initial'), - ] - - operations = [ - migrations.AlterModelOptions( - name='floorplan', - options={'ordering': ['-id']}, - ), - migrations.AlterModelOptions( - name='importantdate', - options={'ordering': ['-meeting_id', 'date']}, - ), - migrations.AlterModelOptions( - name='meeting', - options={'ordering': ['-date', '-id']}, - ), - migrations.AlterModelOptions( - name='room', - options={'ordering': ['-id']}, - ), - migrations.AlterModelOptions( - name='timeslot', - options={'ordering': ['-time', '-id']}, - ), - migrations.AlterField( - model_name='floorplan', - name='short', - field=models.CharField(default='', max_length=3), - ), - ] diff --git a/ietf/meeting/migrations/0003_rename_modified_fields.py b/ietf/meeting/migrations/0003_rename_modified_fields.py deleted file mode 100644 index 4b1dbbe85..000000000 --- a/ietf/meeting/migrations/0003_rename_modified_fields.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-03-02 14:33 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0002_auto_20180225_1207'), - ] - - operations = [ - migrations.RenameField( - model_name='floorplan', - old_name='time', - new_name='modified', - ), - migrations.RenameField( - model_name='room', - old_name='time', - new_name='modified', - ), - migrations.AlterField( - model_name='floorplan', - name='modified', - field=models.DateTimeField(auto_now=True), - ), - migrations.AlterField( - model_name='room', - name='modified', - field=models.DateTimeField(auto_now=True), - ), - ] diff --git a/ietf/meeting/migrations/0004_meeting_attendees.py b/ietf/meeting/migrations/0004_meeting_attendees.py deleted file mode 100644 index a92945924..000000000 --- a/ietf/meeting/migrations/0004_meeting_attendees.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.11 on 2018-03-20 09:17 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0003_rename_modified_fields'), - ] - - operations = [ - migrations.AddField( - model_name='meeting', - name='attendees', - field=models.IntegerField(blank=True, default=None, help_text='Number of Attendees for backfilled meetings, leave it blank for new meetings, and then it is calculated from the registrations', null=True), - ), - ] diff --git a/ietf/meeting/migrations/0005_backfill_old_meetings.py b/ietf/meeting/migrations/0005_backfill_old_meetings.py deleted file mode 100644 index 928ed4afd..000000000 --- a/ietf/meeting/migrations/0005_backfill_old_meetings.py +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - - -def backfill_old_meetings(apps, schema_editor): - Meeting = apps.get_model('meeting', 'Meeting') - - for id, number, type_id, date, city, country, time_zone, continent, attendees in [ - ( 59,'59','ietf','2004-03-29','Seoul','KR','Asia/Seoul','Asia','1390' ), - ( 58,'58','ietf','2003-11-09','Minneapolis','US','America/Menominee','America','1233' ), - ( 57,'57','ietf','2003-07-13','Vienna','AT','Europe/Vienna','Europe','1304' ), - ( 56,'56','ietf','2003-03-16','San Francisco','US','America/Los_Angeles','America','1679' ), - ( 55,'55','ietf','2002-11-17','Atlanta','US','America/New_York','America','1570' ), - ( 54,'54','ietf','2002-07-14','Yokohama','JP','Asia/Tokyo','Asia','1885' ), - ( 53,'53','ietf','2002-03-17','Minneapolis','US','America/Menominee','America','1656' ), - ( 52,'52','ietf','2001-12-09','Salt Lake City','US','America/Denver','America','1691' ), - ( 51,'51','ietf','2001-08-05','London','GB','Europe/London','Europe','2226' ), - ( 50,'50','ietf','2001-03-18','Minneapolis','US','America/Menominee','America','1822' ), - ( 49,'49','ietf','2000-12-10','San Diego','US','America/Los_Angeles','America','2810' ), - ( 48,'48','ietf','2000-07-31','Pittsburgh','US','America/New_York','America','2344' ), - ( 47,'47','ietf','2000-03-26','Adelaide','AU','Australia/Adelaide','Australia','1431' ), - ( 46,'46','ietf','1999-11-07','Washington','US','America/New_York','America','2379' ), - ( 45,'45','ietf','1999-07-11','Oslo','NO','Europe/Oslo','Europe','1710' ), - ( 44,'44','ietf','1999-03-14','Minneapolis','US','America/Menominee','America','1705' ), - ( 43,'43','ietf','1998-12-07','Orlando','US','America/New_York','America','2124' ), - ( 42,'42','ietf','1998-08-24','Chicago','US','America/Chicago','America','2106' ), - ( 41,'41','ietf','1998-03-30','Los Angeles','US','America/Los_Angeles','America','1775' ), - ( 40,'40','ietf','1997-12-08','Washington','US','America/New_York','America','1897' ), - ( 39,'39','ietf','1997-08-11','Munich','DE','Europe/Berlin','Europe','1308' ), - ( 38,'38','ietf','1997-04-07','Memphis','US','America/Chicago','America','1321' ), - ( 37,'37','ietf','1996-12-09','San Jose','US','America/Los_Angeles','America','1993' ), - ( 36,'36','ietf','1996-06-24','Montreal','CA','America/New_York','America','1283' ), - ( 35,'35','ietf','1996-03-04','Los Angeles','US','America/Los_Angeles','America','1038' ), - ( 34,'34','ietf','1995-12-04','Dallas','US','America/Chicago','America','1007' ), - ( 33,'33','ietf','1995-07-17','Stockholm','SE','Europe/Stockholm','Europe','617' ), - ( 32,'32','ietf','1995-04-03','Danvers','US','America/New_York','America','983' ), - ( 31,'31','ietf','1994-12-05','San Jose','US','America/Los_Angeles','America','1079' ), - ( 30,'30','ietf','1994-07-25','Toronto','CA','America/New_York','America','710' ), - ( 29,'29','ietf','1994-03-28','Seattle','US','America/Los_Angeles','America','785' ), - ( 28,'28','ietf','1993-11-01','Houston','US','America/Chicago','America','636' ), - ( 27,'27','ietf','1993-07-12','Amsterdam','NL','Europe/Amsterdam','Europe','493' ), - ( 26,'26','ietf','1993-03-29','Columbus','US','America/New_York','America','638' ), - ( 25,'25','ietf','1992-11-16','Washington','US','America/New_York','America','633' ), - ( 24,'24','ietf','1992-07-13','Cambridge','US','America/New_York','America','677' ), - ( 23,'23','ietf','1992-03-16','San Diego','US','America/Los_Angeles','America','530' ), - ( 22,'22','ietf','1991-11-18','Santa Fe','US','America/Denver','America','372' ), - ( 21,'21','ietf','1991-07-29','Atlanta','US','America/New_York','America','387' ), - ( 20,'20','ietf','1991-03-11','St. Louis','US','America/Chicago','America','348' ), - ( 19,'19','ietf','1990-12-03','Boulder','US','America/Denver','America','292' ), - ( 18,'18','ietf','1990-07-30','Vancouver','CA','America/Los_Angeles','America','293' ), - ( 17,'17','ietf','1990-05-01','Pittsburgh','US','America/New_York','America','244' ), - ( 16,'16','ietf','1990-02-06','Tallahassee','US','America/New_York','America','196' ), - ( 15,'15','ietf','1989-10-31','Honolulu','US','Pacific/Honolulu','America','138' ), - ( 14,'14','ietf','1989-07-25','Stanford','US','America/Los_Angeles','America','217' ), - ( 13,'13','ietf','1989-04-11','Cocoa Beach','US','America/New_York','America','114' ), - ( 12,'12','ietf','1989-01-18','Austin','US','America/Chicago','America','120' ), - ( 11,'11','ietf','1988-10-17','Ann Arbor','US','America/New_York','America','114' ), - ( 10,'10','ietf','1988-06-15','Annapolis','US','America/New_York','America','112' ), - ( 9,'9','ietf','1988-03-01','San Diego','US','America/Los_Angeles','America','82' ), - ( 8,'8','ietf','1987-11-02','Boulder','US','America/Denver','America','56' ), - ( 7,'7','ietf','1987-07-27','McLean','US','America/New_York','America','101' ), - ( 6,'6','ietf','1987-04-22','Boston','US','America/New_York','America','88' ), - ( 5,'5','ietf','1987-02-04','Moffett Field','US','America/Los_Angeles','America','35' ), - ( 4,'4','ietf','1986-10-15','Menlo Park','US','America/Los_Angeles','America','35' ), - ( 3,'3','ietf','1986-07-23','Ann Arbor','US','America/New_York','America','18' ), - ( 2,'2','ietf','1986-04-08','Aberdeen','US','America/New_York','America','21' ), - ( 1,'1','ietf','1986-01-16','San Diego','US','America/Los_Angeles','America','21' ), - ]: - Meeting.objects.get_or_create(id=id, number=number, type_id=type_id, - date=date, city=city, country=country, - time_zone=time_zone); - - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0004_meeting_attendees'), - ] - - operations = [ - migrations.RunPython(backfill_old_meetings, reverse) - ] - diff --git a/ietf/meeting/migrations/0006_backfill_attendees.py b/ietf/meeting/migrations/0006_backfill_attendees.py deleted file mode 100644 index 212260d72..000000000 --- a/ietf/meeting/migrations/0006_backfill_attendees.py +++ /dev/null @@ -1,133 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - - -def backfill_old_meetings(apps, schema_editor): - Meeting = apps.get_model('meeting', 'Meeting') - - for number, attendees in [ - ( 101,1203 ), - ( 100,1018 ), - ( 99,1235 ), - ( 98,1127 ), - ( 97,1042 ), - ( 96,1425 ), - ( 95,1043 ), - ( 94,1319 ), - ( 93,1387 ), - ( 92,1221 ), - ( 91,1109 ), - ( 90,1237 ), - ( 89,1400 ), - ( 88,1189 ), - ( 87,1435 ), - ( 86,1115 ), - ( 85,1157 ), - ( 84,1199 ), - ( 83,1395 ), - ( 82, 948 ), - ( 81,1127 ), - ( 80,1231 ), - ( 79,1208 ), - ( 78,1192 ), - ( 77,1250 ), - ( 76,1152 ), - ( 75,1124 ), - ( 74,1185 ), - ( 73, 962 ), - ( 72,1182 ), - ( 71,1174 ), - ( 70,1128 ), - ( 69,1175 ), - ( 68,1193 ), - ( 67,1245 ), - ( 66,1257 ), - ( 65,1264 ), - ( 64,1240 ), - ( 63,1450 ), - ( 62,1133 ), - ( 61,1311 ), - ( 60,1460 ), - ( 59,1390 ), - ( 58,1233 ), - ( 57,1304 ), - ( 56,1679 ), - ( 55,1570 ), - ( 54,1885 ), - ( 53,1656 ), - ( 52,1691 ), - ( 51,2226 ), - ( 50,1822 ), - ( 49,2810 ), - ( 48,2344 ), - ( 47,1431 ), - ( 46,2379 ), - ( 45,1710 ), - ( 44,1705 ), - ( 43,2124 ), - ( 42,2106 ), - ( 41,1775 ), - ( 40,1897 ), - ( 39,1308 ), - ( 38,1321 ), - ( 37,1993 ), - ( 36,1283 ), - ( 35,1038 ), - ( 34,1007 ), - ( 33,617 ), - ( 32,983 ), - ( 31,1079 ), - ( 30,710 ), - ( 29,785 ), - ( 28,636 ), - ( 27,493 ), - ( 26,638 ), - ( 25,633 ), - ( 24,677 ), - ( 23,530 ), - ( 22,372 ), - ( 21,387 ), - ( 20,348 ), - ( 19,292 ), - ( 18,293 ), - ( 17,244 ), - ( 16,196 ), - ( 15,138 ), - ( 14,217 ), - ( 13,114 ), - ( 12,120 ), - ( 11,114 ), - ( 10,112 ), - ( 9,82 ), - ( 8,56 ), - ( 7,101 ), - ( 6,88 ), - ( 5,35 ), - ( 4,35 ), - ( 3,18 ), - ( 2,21 ), - ( 1,21 ), - ]: - meeting = Meeting.objects.filter(type='ietf', - number=number).first(); - meeting.attendees = attendees - meeting.save() - - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0005_backfill_old_meetings'), - ] - - operations = [ - migrations.RunPython(backfill_old_meetings, reverse) - ] - diff --git a/ietf/meeting/migrations/0007_auto_20180716_1337.py b/ietf/meeting/migrations/0007_auto_20180716_1337.py deleted file mode 100644 index a20d9dba9..000000000 --- a/ietf/meeting/migrations/0007_auto_20180716_1337.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.14 on 2018-07-16 13:37 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0006_backfill_attendees'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='time_zone', - field=models.CharField(blank=True, choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Godthab', 'America/Godthab'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], max_length=255), - ), - ] diff --git a/ietf/meeting/migrations/0008_rename_meeting_agenda_note.py b/ietf/meeting/migrations/0008_rename_meeting_agenda_note.py deleted file mode 100644 index 884940c22..000000000 --- a/ietf/meeting/migrations/0008_rename_meeting_agenda_note.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.15 on 2018-10-09 13:09 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0007_auto_20180716_1337'), - ] - - operations = [ - migrations.RenameField( - model_name='meeting', - old_name='agenda_note', - new_name='agenda_warning_note', - ), - ] diff --git a/ietf/meeting/migrations/0009_add_agenda_info_note.py b/ietf/meeting/migrations/0009_add_agenda_info_note.py deleted file mode 100644 index 8fc4fdb46..000000000 --- a/ietf/meeting/migrations/0009_add_agenda_info_note.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-10-09 14:07 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0008_rename_meeting_agenda_note'), - ] - - operations = [ - migrations.AddField( - model_name='meeting', - name='agenda_info_note', - field=models.TextField(blank=True, help_text='Text in this field will be placed at the top of the html agenda page for the meeting. HTML can be used, but will not be validated.'), - ), - migrations.AlterField( - model_name='meeting', - name='agenda_warning_note', - field=models.TextField(blank=True, help_text='Text in this field will be placed more prominently at the top of the html agenda page for the meeting. HTML can be used, but will not be validated.'), - ), - ] diff --git a/ietf/meeting/migrations/0010_set_ietf_103_agenda_info_note.py b/ietf/meeting/migrations/0010_set_ietf_103_agenda_info_note.py deleted file mode 100644 index bb3148f78..000000000 --- a/ietf/meeting/migrations/0010_set_ietf_103_agenda_info_note.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-10-09 14:23 - - -from django.db import migrations - -def forward(apps,schema_editor): - Meeting = apps.get_model('meeting','Meeting') - Meeting.objects.filter(number=103).update(agenda_info_note= - 'To see the list of unofficial side meetings, or to reserve meeting ' - 'space, please see the ' - '' - 'meeting wiki.' - ) - -def reverse(apps,schema_editor): - Meeting = apps.get_model('meeting','Meeting') - Meeting.objects.filter(number=103).update(agenda_info_note="") - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0009_add_agenda_info_note'), - ('person', '0008_auto_20181014_1448'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - ] diff --git a/ietf/meeting/migrations/0011_auto_20190114_0550.py b/ietf/meeting/migrations/0011_auto_20190114_0550.py deleted file mode 100644 index 50b8b71ec..000000000 --- a/ietf/meeting/migrations/0011_auto_20190114_0550.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.18 on 2019-01-14 05:50 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0010_set_ietf_103_agenda_info_note'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='time_zone', - field=models.CharField(blank=True, choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Godthab', 'America/Godthab'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], max_length=255), - ), - ] diff --git a/ietf/meeting/migrations/0012_add_slide_submissions.py b/ietf/meeting/migrations/0012_add_slide_submissions.py deleted file mode 100644 index e1a798d59..000000000 --- a/ietf/meeting/migrations/0012_add_slide_submissions.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-23 07:41 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0009_auto_20190118_0725'), - ('meeting', '0011_auto_20190114_0550'), - ] - - operations = [ - migrations.CreateModel( - name='SlideSubmission', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('title', models.CharField(max_length=255)), - ('filename', models.CharField(max_length=255)), - ('apply_to_all', models.BooleanField(default=False)), - ('session', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Session')), - ('submitter', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ], - ), - ] diff --git a/ietf/meeting/migrations/0013_make_separate_break_sessobj.py b/ietf/meeting/migrations/0013_make_separate_break_sessobj.py deleted file mode 100644 index ceea5179d..000000000 --- a/ietf/meeting/migrations/0013_make_separate_break_sessobj.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-03-23 06:11 - - -import datetime -from django.db import migrations - - -def copy_session(session): - session.pk = None - session.save() - return session - - -def forward(apps, schema_editor): - Meeting = apps.get_model('meeting', 'Meeting') - today = datetime.datetime.today() - meetings = Meeting.objects.filter(date__gt=today, type='ietf') - for meeting in meetings: - sessions = meeting.session_set.filter(type__in=['break', 'reg']) - for session in sessions: - assignments = session.timeslotassignments.filter(schedule=meeting.agenda) - if assignments.count() > 1: - ids = [ a.id for a in assignments ] - first_assignment = session.timeslotassignments.get(id=ids[0]) - original_session = first_assignment.session - for assignment in session.timeslotassignments.filter(id__in=ids[1:]): - assignment.session = copy_session(original_session) - assignment.save() - -def backward(apps, schema_editor): - return - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0012_add_slide_submissions'), - ] - - operations = [ - migrations.RunPython(forward, backward), - ] diff --git a/ietf/meeting/migrations/0014_auto_20190426_0305.py b/ietf/meeting/migrations/0014_auto_20190426_0305.py deleted file mode 100644 index 8f4b6b0b3..000000000 --- a/ietf/meeting/migrations/0014_auto_20190426_0305.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-04-26 03:05 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0013_make_separate_break_sessobj'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='country', - field=models.CharField(blank=True, choices=[('', ''), ('AF', 'Afghanistan'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua & Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('BB', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia'), ('BA', 'Bosnia & Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('GB', 'Britain (UK)'), ('IO', 'British Indian Ocean Territory'), ('BN', 'Brunei'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('CV', 'Cape Verde'), ('BQ', 'Caribbean NL'), ('KY', 'Cayman Islands'), ('CF', 'Central African Rep.'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos (Keeling) Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CD', 'Congo (Dem. Rep.)'), ('CG', 'Congo (Rep.)'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Cura\xe7ao'), ('CY', 'Cyprus'), ('CZ', 'Czech Republic'), ('CI', "C\xf4te d'Ivoire"), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('TL', 'East Timor'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('SZ', 'Eswatini (Swaziland)'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern & Antarctic Lands'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island & McDonald Islands'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('KP', 'Korea (North)'), ('KR', 'Korea (South)'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', 'Laos'), ('LV', 'Latvia'), ('LB', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macau'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia'), ('MD', 'Moldova'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar (Burma)'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('MK', 'North Macedonia'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestine'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('RO', 'Romania'), ('RU', 'Russia'), ('RW', 'Rwanda'), ('RE', 'R\xe9union'), ('AS', 'Samoa (American)'), ('WS', 'Samoa (western)'), ('SM', 'San Marino'), ('ST', 'Sao Tome & Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('SB', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia & the South Sandwich Islands'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('BL', 'St Barthelemy'), ('SH', 'St Helena'), ('KN', 'St Kitts & Nevis'), ('LC', 'St Lucia'), ('SX', 'St Maarten (Dutch)'), ('MF', 'St Martin (French)'), ('PM', 'St Pierre & Miquelon'), ('VC', 'St Vincent'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard & Jan Mayen'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syria'), ('TW', 'Taiwan'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania'), ('TH', 'Thailand'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad & Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks & Caicos Is'), ('TV', 'Tuvalu'), ('UM', 'US minor outlying islands'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('US', 'United States'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VA', 'Vatican City'), ('VE', 'Venezuela'), ('VN', 'Vietnam'), ('VG', 'Virgin Islands (UK)'), ('VI', 'Virgin Islands (US)'), ('WF', 'Wallis & Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe'), ('AX', '\xc5land Islands')], max_length=2), - ), - ] diff --git a/ietf/meeting/migrations/0015_sessionpresentation_document2_fk.py b/ietf/meeting/migrations/0015_sessionpresentation_document2_fk.py deleted file mode 100644 index 257a5060c..000000000 --- a/ietf/meeting/migrations/0015_sessionpresentation_document2_fk.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 11:58 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0015_1_add_fk_to_document_id'), - ('meeting', '0014_auto_20190426_0305'), - ] - - operations = [ - migrations.AddField( - model_name='sessionpresentation', - name='document2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id'), - ), - migrations.AlterField( - model_name='sessionpresentation', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_sesspres', to='doc.Document', to_field=b'name'), - ), - ] diff --git a/ietf/meeting/migrations/0016_remove_sessionpresentation_document.py b/ietf/meeting/migrations/0016_remove_sessionpresentation_document.py deleted file mode 100644 index e93baaa33..000000000 --- a/ietf/meeting/migrations/0016_remove_sessionpresentation_document.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 03:57 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0018_remove_old_document_field'), - ('meeting', '0015_sessionpresentation_document2_fk'), - ] - - operations = [ - - # We need to get rid of the current through table uniqueness - # constraint before we can remove the document column: The table - # has "UNIQUE KEY `session_id` (`session_id`,`document_id`)" - migrations.RunSQL( - "ALTER TABLE `meeting_session_materials` DROP INDEX `session_id`;", - "CREATE UNIQUE INDEX `session_id` ON `meeting_session_materials` (`session_id`, `document_id`);" - ), - ## This doesn't work: - # migrations.RemoveIndex( - # model_name='sessionpresentation', - # name='session_id' - # ), - migrations.RemoveField( - model_name='sessionpresentation', - name='document', - ), - ] diff --git a/ietf/meeting/migrations/0017_rename_field_document2.py b/ietf/meeting/migrations/0017_rename_field_document2.py deleted file mode 100644 index 5965d8d20..000000000 --- a/ietf/meeting/migrations/0017_rename_field_document2.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 05:31 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0019_rename_field_document2'), - ('meeting', '0016_remove_sessionpresentation_document'), - ] - - operations = [ - migrations.RenameField( - model_name='sessionpresentation', - old_name='document2', - new_name='document', - ), - migrations.AlterUniqueTogether( - name='sessionpresentation', - unique_together=set([('session', 'document')]), - ), - ] diff --git a/ietf/meeting/migrations/0018_document_primary_key_cleanup.py b/ietf/meeting/migrations/0018_document_primary_key_cleanup.py deleted file mode 100644 index 749caa443..000000000 --- a/ietf/meeting/migrations/0018_document_primary_key_cleanup.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-06-10 03:47 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0017_rename_field_document2'), - ] - - operations = [ - migrations.AlterField( - model_name='sessionpresentation', - name='document', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - ] diff --git a/ietf/meeting/migrations/0019_slidesubmission_time.py b/ietf/meeting/migrations/0019_slidesubmission_time.py deleted file mode 100644 index 3dc0e2c52..000000000 --- a/ietf/meeting/migrations/0019_slidesubmission_time.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.22 on 2019-07-21 14:03 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0018_document_primary_key_cleanup'), - ] - - operations = [ - migrations.AddField( - model_name='slidesubmission', - name='time', - field=models.DateTimeField(auto_now=True), - ), - ] diff --git a/ietf/meeting/migrations/0020_remove_future_break_sessions.py b/ietf/meeting/migrations/0020_remove_future_break_sessions.py deleted file mode 100644 index 5d2569b1c..000000000 --- a/ietf/meeting/migrations/0020_remove_future_break_sessions.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.22 on 2019-07-22 14:56 - - -import datetime -from django.db import migrations - - -def forward(apps, schema_editor): - Meeting = apps.get_model('meeting', 'Meeting') - today = datetime.datetime.today() - meetings = Meeting.objects.filter(date__gt=today, type='ietf') - for meeting in meetings: - meeting.agenda.assignments.all().delete() - meeting.session_set.all().delete() - meeting.timeslot_set.all().delete() - - -def backward(apps, schema_editor): - return - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0019_slidesubmission_time'), - ] - - operations = [ - migrations.RunPython(forward, backward), - ] diff --git a/ietf/meeting/migrations/0021_rename_meeting_agenda_to_schedule.py b/ietf/meeting/migrations/0021_rename_meeting_agenda_to_schedule.py deleted file mode 100644 index 5399968cb..000000000 --- a/ietf/meeting/migrations/0021_rename_meeting_agenda_to_schedule.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.26 on 2019-11-18 04:01 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0020_remove_future_break_sessions'), - ] - - operations = [ - migrations.RenameField( - model_name='meeting', - old_name='agenda', - new_name='schedule', - ), - migrations.AlterField( - model_name='schedule', - name='meeting', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='schedule_set', to='meeting.Meeting'), - ), - ] diff --git a/ietf/meeting/migrations/0022_schedulingevent.py b/ietf/meeting/migrations/0022_schedulingevent.py deleted file mode 100644 index 22602a06b..000000000 --- a/ietf/meeting/migrations/0022_schedulingevent.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.26 on 2019-11-19 02:41 - - -import datetime -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0009_auto_20190118_0725'), - ('name', '0007_fix_m2m_slug_id_length'), - ('meeting', '0021_rename_meeting_agenda_to_schedule'), - ] - - operations = [ - migrations.CreateModel( - name='SchedulingEvent', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now, help_text='When the event happened')), - ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('session', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Session')), - ('status', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.SessionStatusName')), - ], - ), - ] diff --git a/ietf/meeting/migrations/0023_create_scheduling_events.py b/ietf/meeting/migrations/0023_create_scheduling_events.py deleted file mode 100644 index 5adcdd59e..000000000 --- a/ietf/meeting/migrations/0023_create_scheduling_events.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.26 on 2019-11-19 02:42 - - -from django.db import migrations - -import datetime - -def create_scheduling_events(apps, schema_editor): - Session = apps.get_model('meeting', 'Session') - SchedulingEvent = apps.get_model('meeting', 'SchedulingEvent') - Person = apps.get_model('person', 'Person') - SessionStatusName = apps.get_model('name', 'SessionStatusName') - - system_person = Person.objects.get(name='(System)') - session_status_names = { n.slug: n for n in SessionStatusName.objects.all() } - - epoch_time = datetime.datetime(1970, 1, 1, 0, 0, 0) - - for s in Session.objects.select_related('requested_by').filter(schedulingevent=None).iterator(): - # temporarily fix up weird timestamps for the migration - if s.requested == epoch_time: - s.requested = s.modified - - requested_event = SchedulingEvent() - requested_event.session = s - requested_event.time = s.requested - requested_event.by = s.requested_by - requested_event.status = session_status_names[s.status_id if s.status_id == 'apprw' or (s.status_id == 'notmeet' and not s.scheduled) else 'schedw'] - requested_event.save() - - scheduled_event = None - if s.status_id != requested_event.status_id: - if s.scheduled or s.status_id in ['sched', 'scheda']: - scheduled_event = SchedulingEvent() - scheduled_event.session = s - if s.scheduled: - scheduled_event.time = s.scheduled - else: - # we don't know when this happened - scheduled_event.time = s.modified - scheduled_event.by = system_person # we don't know who did it - scheduled_event.status = session_status_names[s.status_id if s.status_id == 'scheda' else 'sched'] - scheduled_event.save() - - final_event = None - if s.status_id not in ['apprw', 'schedw', 'notmeet', 'sched', 'scheda']: - final_event = SchedulingEvent() - final_event.session = s - final_event.time = s.modified - final_event.by = system_person # we don't know who did it - final_event.status = session_status_names[s.status_id] - final_event.save() - -def noop(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0022_schedulingevent'), - ] - - operations = [ - migrations.RunPython(create_scheduling_events, noop), - ] diff --git a/ietf/meeting/migrations/0024_auto_20191204_1731.py b/ietf/meeting/migrations/0024_auto_20191204_1731.py deleted file mode 100644 index 828611bb9..000000000 --- a/ietf/meeting/migrations/0024_auto_20191204_1731.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.26 on 2019-12-04 17:31 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0023_create_scheduling_events'), - ] - - operations = [ - migrations.RemoveField( - model_name='session', - name='requested', - ), - migrations.RemoveField( - model_name='session', - name='requested_by', - ), - migrations.RemoveField( - model_name='session', - name='status', - ), - ] diff --git a/ietf/meeting/migrations/0025_rename_type_session_to_regular.py b/ietf/meeting/migrations/0025_rename_type_session_to_regular.py deleted file mode 100644 index 1eeac57b5..000000000 --- a/ietf/meeting/migrations/0025_rename_type_session_to_regular.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.26 on 2019-12-06 11:13 - - -from django.db import migrations - -def rename_session_to_regular(apps, schema_editor): - Session = apps.get_model('meeting', 'Session') - TimeSlot = apps.get_model('meeting', 'TimeSlot') - Room = apps.get_model('meeting', 'Room') - TimeSlotTypeName = apps.get_model('name', 'TimeSlotTypeName') - - TimeSlotTypeName.objects.create( - slug='regular', - name='Regular', - used=True, - order=0, - ) - - Session.objects.filter(type='session').update(type='regular') - TimeSlot.objects.filter(type='session').update(type='regular') - Room.session_types.through.objects.filter(timeslottypename='session').update(timeslottypename='regular') - - TimeSlotTypeName.objects.filter(slug='session').delete() - -def noop(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0024_auto_20191204_1731'), - ] - - operations = [ - migrations.RunPython(rename_session_to_regular, noop), - ] diff --git a/ietf/meeting/migrations/0026_cancel_107_sessions.py b/ietf/meeting/migrations/0026_cancel_107_sessions.py deleted file mode 100644 index 754cd7c49..000000000 --- a/ietf/meeting/migrations/0026_cancel_107_sessions.py +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-03-18 16:18 -from __future__ import unicode_literals - -from django.db import migrations - - -def cancel_sessions(apps, schema_editor): - Session = apps.get_model('meeting', 'Session') - SchedulingEvent = apps.get_model('meeting', 'SchedulingEvent') - SessionStatusName = apps.get_model('name', 'SessionStatusName') - Person = apps.get_model('person', 'Person') - excludes = ['txauth','dispatch','add','raw','masque','wpack','drip','gendispatch','privacypass', 'ript', 'secdispatch', 'webtrans'] - canceled = SessionStatusName.objects.get(slug='canceled') - person = Person.objects.get(name='Ryan Cross') - sessions = Session.objects.filter(meeting__number=107,group__type__in=['wg','rg','ag']).exclude(group__acronym__in=excludes) - for session in sessions: - SchedulingEvent.objects.create( - session = session, - status = canceled, - by = person) - - -def reverse(apps, schema_editor): - SchedulingEvent = apps.get_model('meeting', 'SchedulingEvent') - Person = apps.get_model('person', 'Person') - person = Person.objects.get(name='Ryan Cross') - SchedulingEvent.objects.filter(session__meeting__number=107, by=person).delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0025_rename_type_session_to_regular'), - ] - - operations = [ - migrations.RunPython(cancel_sessions, reverse), - ] diff --git a/ietf/meeting/migrations/0027_add_constraint_options_and_joint_groups.py b/ietf/meeting/migrations/0027_add_constraint_options_and_joint_groups.py deleted file mode 100644 index 7a64fbe65..000000000 --- a/ietf/meeting/migrations/0027_add_constraint_options_and_joint_groups.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-02-11 04:47 -from __future__ import unicode_literals - -from django.db import migrations, models - - -def forward(apps, schema_editor): - ConstraintName = apps.get_model("name", "ConstraintName") - ConstraintName.objects.create(slug="timerange", desc="", penalty=100000, - name="Can't meet within timerange") - ConstraintName.objects.create(slug="time_relation", desc="", penalty=1000, - name="Preference for time between sessions") - ConstraintName.objects.create(slug="wg_adjacent", desc="", penalty=10000, - name="Request for adjacent scheduling with another WG") - - -def reverse(apps, schema_editor): - ConstraintName = apps.get_model("name", "ConstraintName") - ConstraintName.objects.filter(slug__in=["timerange", "time_relation", "wg_adjacent"]).delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0010_timerangename'), - ('meeting', '0026_cancel_107_sessions'), - ] - - operations = [ - migrations.RemoveField( - model_name='constraint', - name='day', - ), - migrations.AddField( - model_name='constraint', - name='time_relation', - field=models.CharField(blank=True, choices=[('subsequent-days', 'Schedule the sessions on subsequent days'), ('one-day-seperation', 'Leave at least one free day in between the two sessions')], max_length=200), - ), - migrations.AddField( - model_name='constraint', - name='timeranges', - field=models.ManyToManyField(to='name.TimerangeName'), - ), - migrations.AddField( - model_name='session', - name='joint_with_groups', - field=models.ManyToManyField(related_name='sessions_joint_in', to='group.Group'), - ), - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0028_auto_20200501_0139.py b/ietf/meeting/migrations/0028_auto_20200501_0139.py deleted file mode 100644 index 70c46c3d2..000000000 --- a/ietf/meeting/migrations/0028_auto_20200501_0139.py +++ /dev/null @@ -1,26 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-05-01 01:39 -from __future__ import unicode_literals - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0027_add_constraint_options_and_joint_groups'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='time_zone', - field=models.CharField(blank=True, choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Nuuk', 'America/Nuuk'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], max_length=255), - ), - migrations.AlterField( - model_name='schedule', - name='name', - field=models.CharField(help_text='Letters, numbers and -:_ allowed.', max_length=16, validators=[django.core.validators.RegexValidator('^[A-Za-z0-9-:_]*$')]), - ), - ] diff --git a/ietf/meeting/migrations/0029_businessconstraint.py b/ietf/meeting/migrations/0029_businessconstraint.py deleted file mode 100644 index 7e1f13ee7..000000000 --- a/ietf/meeting/migrations/0029_businessconstraint.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-05-29 02:52 -from __future__ import unicode_literals - -from django.db import migrations, models - - -def forward(apps, schema_editor): - BusinessConstraint = apps.get_model("meeting", "BusinessConstraint") - BusinessConstraint.objects.create( - slug="bof_overlapping_prg", - name="BOFs cannot conflict with PRGs", - penalty=100000, - ) - BusinessConstraint.objects.create( - slug="bof_overlapping_bof", - name="BOFs cannot conflict with any other BOFs", - penalty=100000, - ) - BusinessConstraint.objects.create( - slug="bof_overlapping_area_wg", - name="BOFs cannot conflict with any other WGs in their area", - penalty=100000, - ) - BusinessConstraint.objects.create( - slug="bof_overlapping_area_meeting", - name="BOFs cannot conflict with any area-wide meetings (of any area)", - penalty=10000, - ) - BusinessConstraint.objects.create( - slug="area_overlapping_in_area", - name="Area meetings cannot conflict with anything else in their area", - penalty=10000, - ) - BusinessConstraint.objects.create( - slug="area_overlapping_other_area", - name="Area meetings cannot conflict with other area meetings", - penalty=100000, - ) - BusinessConstraint.objects.create( - slug="session_overlap_ad", - name="WGs overseen by the same Area Director should not conflict", - penalty=100, - ) - BusinessConstraint.objects.create( - slug="sessions_out_of_order", - name="Sessions should be scheduled in requested order", - penalty=100000, - ) - BusinessConstraint.objects.create( - slug="session_requires_trim", - name="Sessions should be scheduled according to requested duration and attendees", - penalty=100000, - ) - - ConstraintName = apps.get_model("name", "ConstraintName") - ConstraintName.objects.filter(slug='conflict').update(penalty=100000) - ConstraintName.objects.filter(slug='conflic2').update(penalty=10000) - ConstraintName.objects.filter(slug='conflic3').update(penalty=100000) - ConstraintName.objects.filter(slug='bethere').update(penalty=10000) - ConstraintName.objects.filter(slug='timerange').update(penalty=1000000) - ConstraintName.objects.filter(slug='time_relation').update(penalty=1000) - ConstraintName.objects.filter(slug='wg_adjacent').update(penalty=1000) - - -def reverse(apps, schema_editor): - ConstraintName = apps.get_model("name", "ConstraintName") - ConstraintName.objects.filter(slug='conflict').update(penalty=100000) - ConstraintName.objects.filter(slug='conflic2').update(penalty=10000) - ConstraintName.objects.filter(slug='conflic3').update(penalty=1000) - ConstraintName.objects.filter(slug='bethere').update(penalty=200000) - ConstraintName.objects.filter(slug='timerange').update(penalty=100000) - ConstraintName.objects.filter(slug='time_relation').update(penalty=100000) - ConstraintName.objects.filter(slug='wg_adjacent').update(penalty=100000) - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0028_auto_20200501_0139'), - ] - - operations = [ - migrations.CreateModel( - name='BusinessConstraint', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('penalty', models.IntegerField(default=0, help_text='The penalty for violating this kind of constraint; for instance 10 (small penalty) or 10000 (large penalty)')), - ], - ), - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0030_allow_empty_joint_with_sessions.py b/ietf/meeting/migrations/0030_allow_empty_joint_with_sessions.py deleted file mode 100644 index d8ab7cff2..000000000 --- a/ietf/meeting/migrations/0030_allow_empty_joint_with_sessions.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.14 on 2020-07-20 14:11 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0029_businessconstraint'), - ] - - operations = [ - migrations.AlterField( - model_name='session', - name='joint_with_groups', - field=models.ManyToManyField(blank=True, related_name='sessions_joint_in', to='group.Group'), - ), - ] diff --git a/ietf/meeting/migrations/0031_auto_20200803_1153.py b/ietf/meeting/migrations/0031_auto_20200803_1153.py deleted file mode 100644 index 8a5ac54aa..000000000 --- a/ietf/meeting/migrations/0031_auto_20200803_1153.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.2.14 on 2020-08-03 11:53 - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0018_slidesubmissionstatusname'), - ('doc', '0035_populate_docextresources'), - ('meeting', '0030_allow_empty_joint_with_sessions'), - ] - - operations = [ - migrations.AddField( - model_name='slidesubmission', - name='doc', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='doc.Document'), - ), - ] diff --git a/ietf/meeting/migrations/0032_auto_20200824_1642.py b/ietf/meeting/migrations/0032_auto_20200824_1642.py deleted file mode 100644 index 31155da6a..000000000 --- a/ietf/meeting/migrations/0032_auto_20200824_1642.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 2.2.14 on 2020-08-03 11:53 - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0031_auto_20200803_1153'), - ] - - operations = [ - migrations.AddField( - model_name='slidesubmission', - name='status', - field=ietf.utils.models.ForeignKey(null=True, default='pending', on_delete=django.db.models.deletion.SET_NULL, to='name.SlideSubmissionStatusName'), - ), - ] diff --git a/ietf/meeting/migrations/0033_session_tombstone_for.py b/ietf/meeting/migrations/0033_session_tombstone_for.py deleted file mode 100644 index dc74615cb..000000000 --- a/ietf/meeting/migrations/0033_session_tombstone_for.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0032_auto_20200824_1642'), - ] - - operations = [ - migrations.AddField( - model_name='session', - name='tombstone_for', - field=models.ForeignKey(blank=True, help_text='This session is the tombstone for a session that was rescheduled', null=True, on_delete=django.db.models.deletion.CASCADE, to='meeting.Session'), - ), - ] diff --git a/ietf/meeting/migrations/0034_schedule_notes.py b/ietf/meeting/migrations/0034_schedule_notes.py deleted file mode 100644 index f851a6b9f..000000000 --- a/ietf/meeting/migrations/0034_schedule_notes.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 2.0.13 on 2020-07-01 02:45 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0033_session_tombstone_for'), - ] - - operations = [ - migrations.AddField( - model_name='schedule', - name='notes', - field=models.TextField(blank=True), - ), - migrations.AlterField( - model_name='schedule', - name='public', - field=models.BooleanField(default=True, help_text='Allow others to see this agenda.'), - ), - migrations.AlterField( - model_name='schedule', - name='visible', - field=models.BooleanField(default=True, help_text='Show in the list of possible agendas for the meeting.', verbose_name='Show in agenda list'), - ), - ] diff --git a/ietf/meeting/migrations/0035_add_session_origin.py b/ietf/meeting/migrations/0035_add_session_origin.py deleted file mode 100644 index ff782d52c..000000000 --- a/ietf/meeting/migrations/0035_add_session_origin.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 2.0.13 on 2020-08-04 06:22 - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0034_schedule_notes'), - ] - - operations = [ - migrations.AddField( - model_name='schedule', - name='origin', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='meeting.Schedule'), - ), - ] diff --git a/ietf/meeting/migrations/0036_add_schedule_base.py b/ietf/meeting/migrations/0036_add_schedule_base.py deleted file mode 100644 index 436fa5cf0..000000000 --- a/ietf/meeting/migrations/0036_add_schedule_base.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 2.0.13 on 2020-08-07 09:30 - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0035_add_session_origin'), - ] - - operations = [ - migrations.AddField( - model_name='schedule', - name='base', - field=ietf.utils.models.ForeignKey(blank=True, help_text='Sessions scheduled in the base show up in this schedule.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='derivedschedule_set', to='meeting.Schedule'), - ), - migrations.AlterField( - model_name='schedule', - name='origin', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='meeting.Schedule'), - ), - ] diff --git a/ietf/meeting/migrations/0037_auto_20200908_0334.py b/ietf/meeting/migrations/0037_auto_20200908_0334.py deleted file mode 100644 index 1ecd8fc9c..000000000 --- a/ietf/meeting/migrations/0037_auto_20200908_0334.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 2.2.16 on 2020-09-08 03:34 - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0036_add_schedule_base'), - ] - - operations = [ - migrations.AlterField( - model_name='schedule', - name='base', - field=ietf.utils.models.ForeignKey(blank=True, help_text='Sessions scheduled in the base schedule show up in this schedule too.', limit_choices_to={'base': None}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='derivedschedule_set', to='meeting.Schedule'), - ), - ] diff --git a/ietf/meeting/migrations/0038_auto_20201005_1123.py b/ietf/meeting/migrations/0038_auto_20201005_1123.py deleted file mode 100644 index faff10a0a..000000000 --- a/ietf/meeting/migrations/0038_auto_20201005_1123.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.2.16 on 2020-10-05 11:23 - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0037_auto_20200908_0334'), - ] - - operations = [ - migrations.AlterField( - model_name='schedule', - name='name', - field=models.CharField(help_text='Letters, numbers and -:_ allowed.', max_length=64, validators=[django.core.validators.RegexValidator('^[A-Za-z0-9-:_]*$')]), - ), - ] diff --git a/ietf/meeting/migrations/0039_auto_20201109_0439.py b/ietf/meeting/migrations/0039_auto_20201109_0439.py deleted file mode 100644 index 9790a158a..000000000 --- a/ietf/meeting/migrations/0039_auto_20201109_0439.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0038_auto_20201005_1123'), - ] - - operations = [ - migrations.AddIndex( - model_name='meeting', - index=models.Index(fields=['-date', '-id'], name='meeting_mee_date_40ca21_idx'), - ), - migrations.AddIndex( - model_name='timeslot', - index=models.Index(fields=['-time', '-id'], name='meeting_tim_time_b802cb_idx'), - ), - ] diff --git a/ietf/meeting/migrations/0040_auto_20210130_1027.py b/ietf/meeting/migrations/0040_auto_20210130_1027.py deleted file mode 100644 index 84794371b..000000000 --- a/ietf/meeting/migrations/0040_auto_20210130_1027.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.17 on 2021-01-30 10:27 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0039_auto_20201109_0439'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='time_zone', - field=models.CharField(blank=True, choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Nuuk', 'America/Nuuk'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], max_length=255), - ), - ] diff --git a/ietf/meeting/migrations/0041_assign_correct_constraintnames.py b/ietf/meeting/migrations/0041_assign_correct_constraintnames.py deleted file mode 100644 index a5f5cf130..000000000 --- a/ietf/meeting/migrations/0041_assign_correct_constraintnames.py +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-13 07:51 - -from django.db import migrations - - -replacement_slugs = ( - ('conflict', 'chair_conflict'), - ('conflic2', 'tech_overlap'), - ('conflic3', 'key_participant'), -) - - -def affected(constraint_qs): - """Filter constraints, keeping only those to be updated""" - # The constraints were renamed in the UI in commit 16699 on 2019-09-03. - # This was between meetings 105 and 106. Assuming this migration and - # the new conflict types are in place before meeting 111, these - # are the meetings for which the UI disagreed with the constraint - # type actually created. - affected_meetings = ['106', '107', '108', '109', '110'] - return constraint_qs.filter(meeting__number__in=affected_meetings) - - -def forward(apps, schema_editor): - Constraint = apps.get_model('meeting', 'Constraint') - affected_constraints = affected(Constraint.objects.all()) - for old, new in replacement_slugs: - affected_constraints.filter(name_id=old).update(name_id=new) - - -def reverse(apps, schema_editor): - Constraint = apps.get_model('meeting', 'Constraint') - affected_constraints = affected(Constraint.objects.all()) - for old, new in replacement_slugs: - affected_constraints.filter(name_id=new).update(name_id=old) - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0040_auto_20210130_1027'), - ('name', '0026_add_conflict_constraintnames'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0042_meeting_group_conflict_types.py b/ietf/meeting/migrations/0042_meeting_group_conflict_types.py deleted file mode 100644 index 2d3320f45..000000000 --- a/ietf/meeting/migrations/0042_meeting_group_conflict_types.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-20 12:28 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0026_add_conflict_constraintnames'), - ('meeting', '0041_assign_correct_constraintnames'), - ] - - operations = [ - migrations.AddField( - model_name='meeting', - name='group_conflict_types', - field=models.ManyToManyField(blank=True, limit_choices_to={'is_group_conflict': True}, help_text='Types of scheduling conflict between groups to consider', to='name.ConstraintName'), - ), - ] diff --git a/ietf/meeting/migrations/0043_populate_meeting_group_conflict_types.py b/ietf/meeting/migrations/0043_populate_meeting_group_conflict_types.py deleted file mode 100644 index 809263564..000000000 --- a/ietf/meeting/migrations/0043_populate_meeting_group_conflict_types.py +++ /dev/null @@ -1,42 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-20 12:30 - -from django.db import migrations -from django.db.models import IntegerField -from django.db.models.functions import Cast - - -def forward(apps, schema_editor): - Meeting = apps.get_model('meeting', 'Meeting') - ConstraintName = apps.get_model('name', 'ConstraintName') - - # old for pre-106 - old_constraints = ConstraintName.objects.filter(slug__in=['conflict', 'conflic2', 'conflic3']) - new_constraints = ConstraintName.objects.filter(slug__in=['chair_conflict', 'tech_overlap', 'key_participant']) - - # get meetings with numeric 'number' field to avoid lexicographic ordering - ietf_meetings = Meeting.objects.filter( - type='ietf' - ).annotate( - number_as_int=Cast('number', output_field=IntegerField()) - ) - - for mtg in ietf_meetings.filter(number_as_int__lt=106): - for cn in old_constraints: - mtg.group_conflict_types.add(cn) - for mtg in ietf_meetings.filter(number_as_int__gte=106): - for cn in new_constraints: - mtg.group_conflict_types.add(cn) - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0042_meeting_group_conflict_types'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0044_again_assign_correct_constraintnames.py b/ietf/meeting/migrations/0044_again_assign_correct_constraintnames.py deleted file mode 100644 index ed2c07a3b..000000000 --- a/ietf/meeting/migrations/0044_again_assign_correct_constraintnames.py +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-13 07:51 - -from django.db import migrations - - -replacement_slugs = ( - ('conflict', 'chair_conflict'), - ('conflic2', 'tech_overlap'), - ('conflic3', 'key_participant'), -) - - -def affected(constraint_qs): - """Filter constraints, keeping only those to be updated""" - # The constraints were renamed in the UI in commit 16699 on 2019-09-03. - # This was between meetings 105 and 106. Assuming this migration and - # the new conflict types are in place before meeting 111, these - # are the meetings for which the UI disagreed with the constraint - # type actually created. - affected_meetings = ['111'] - return constraint_qs.filter(meeting__number__in=affected_meetings) - - -def forward(apps, schema_editor): - Constraint = apps.get_model('meeting', 'Constraint') - affected_constraints = affected(Constraint.objects.all()) - for old, new in replacement_slugs: - affected_constraints.filter(name_id=old).update(name_id=new) - - -def reverse(apps, schema_editor): - Constraint = apps.get_model('meeting', 'Constraint') - affected_constraints = affected(Constraint.objects.all()) - for old, new in replacement_slugs: - affected_constraints.filter(name_id=new).update(name_id=old) - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0043_populate_meeting_group_conflict_types'), - ('name', '0027_add_bofrequest'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0045_proceedingsmaterial.py b/ietf/meeting/migrations/0045_proceedingsmaterial.py deleted file mode 100644 index 1ee553f4c..000000000 --- a/ietf/meeting/migrations/0045_proceedingsmaterial.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.24 on 2021-07-26 17:09 - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0029_proceedingsmaterialtypename'), - ('meeting', '0044_again_assign_correct_constraintnames'), - ] - - operations = [ - migrations.CreateModel( - name='ProceedingsMaterial', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('meeting', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='proceedings_materials', to='meeting.Meeting')), - ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ProceedingsMaterialTypeName')), - ('document', ietf.utils.models.ForeignKey(limit_choices_to={'type_id': 'procmaterials'}, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', unique=True)), - ], - options={ - 'unique_together': {('meeting', 'type')}, - }, - ), - ] diff --git a/ietf/meeting/migrations/0046_meetinghost.py b/ietf/meeting/migrations/0046_meetinghost.py deleted file mode 100644 index 02392913b..000000000 --- a/ietf/meeting/migrations/0046_meetinghost.py +++ /dev/null @@ -1,34 +0,0 @@ -# Generated by Django 2.2.24 on 2021-08-26 10:18 - -from django.db import migrations, models -import django.db.models.deletion -import ietf.meeting.models -import ietf.utils.fields -import ietf.utils.models -import ietf.utils.storage -import ietf.utils.validators - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0045_proceedingsmaterial'), - ] - - operations = [ - migrations.CreateModel( - name='MeetingHost', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255)), - ('logo', ietf.utils.fields.MissingOkImageField(height_field='logo_height', storage=ietf.utils.storage.NoLocationMigrationFileSystemStorage(location=None), upload_to=ietf.meeting.models._host_upload_path, validators=[ietf.utils.validators.MaxImageSizeValidator(1600, 1600), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_file_size, True), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_file_extension, ['.png', '.jpg', '.jpeg']), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_mime_type, ['image/jpeg', 'image/png'], True)], width_field='logo_width')), - ('logo_width', models.PositiveIntegerField(null=True)), - ('logo_height', models.PositiveIntegerField(null=True)), - ('meeting', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='meetinghosts', to='meeting.Meeting')), - ], - options={ - 'ordering': ('pk',), - 'unique_together': {('meeting', 'name')}, - }, - ), - ] diff --git a/ietf/meeting/migrations/0047_auto_20210906_0702.py b/ietf/meeting/migrations/0047_auto_20210906_0702.py deleted file mode 100644 index d44b64b9d..000000000 --- a/ietf/meeting/migrations/0047_auto_20210906_0702.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.2.24 on 2021-09-06 07:02 - -from django.db import migrations -import ietf.meeting.models -import ietf.utils.fields -import ietf.utils.storage -import ietf.utils.validators - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0046_meetinghost'), - ] - - operations = [ - migrations.AlterField( - model_name='meetinghost', - name='logo', - field=ietf.utils.fields.MissingOkImageField(height_field='logo_height', storage=ietf.utils.storage.NoLocationMigrationFileSystemStorage(location=None), upload_to=ietf.meeting.models._host_upload_path, validators=[ietf.utils.validators.MaxImageSizeValidator(400, 400), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_file_size, True), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_file_extension, ['.png', '.jpg', '.jpeg']), ietf.utils.validators.WrappedValidator(ietf.utils.validators.validate_mime_type, ['image/jpeg', 'image/png'], True)], width_field='logo_width'), - ), - ] diff --git a/ietf/meeting/migrations/0048_auto_20211008_0907.py b/ietf/meeting/migrations/0048_auto_20211008_0907.py deleted file mode 100644 index 5f8f84436..000000000 --- a/ietf/meeting/migrations/0048_auto_20211008_0907.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.24 on 2021-10-08 09:07 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0047_auto_20210906_0702'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='time_zone', - field=models.CharField(blank=True, choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Nuuk', 'America/Nuuk'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kiev', 'Europe/Kiev'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kanton', 'Pacific/Kanton'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], max_length=255), - ), - ] diff --git a/ietf/meeting/migrations/0049_session_purpose.py b/ietf/meeting/migrations/0049_session_purpose.py deleted file mode 100644 index 50e8305bf..000000000 --- a/ietf/meeting/migrations/0049_session_purpose.py +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by Django 2.2.24 on 2021-09-16 18:04 - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0035_populate_sessionpurposename'), - ('meeting', '0048_auto_20211008_0907'), - ] - - operations = [ - migrations.AddField( - model_name='session', - name='purpose', - field=ietf.utils.models.ForeignKey(default='none', help_text='Purpose of the session', on_delete=django.db.models.deletion.CASCADE, to='name.SessionPurposeName'), - preserve_default=False, - ), - ] diff --git a/ietf/meeting/migrations/0050_session_on_agenda.py b/ietf/meeting/migrations/0050_session_on_agenda.py deleted file mode 100644 index 15f1885ae..000000000 --- a/ietf/meeting/migrations/0050_session_on_agenda.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.24 on 2021-10-22 06:58 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0049_session_purpose'), - ] - - operations = [ - migrations.AddField( - model_name='session', - name='on_agenda', - field=models.BooleanField(default=True, help_text='Is this session visible on the meeting agenda?'), - ), - ] diff --git a/ietf/meeting/migrations/0051_populate_session_on_agenda.py b/ietf/meeting/migrations/0051_populate_session_on_agenda.py deleted file mode 100644 index b63942072..000000000 --- a/ietf/meeting/migrations/0051_populate_session_on_agenda.py +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by Django 2.2.24 on 2021-10-22 06:58 - -from django.db import migrations, models - - -def forward(apps, schema_editor): - Session = apps.get_model('meeting', 'Session') - SchedTimeSessAssignment = apps.get_model('meeting', 'SchedTimeSessAssignment') - # find official assignments that are to private timeslots and fill in session.on_agenda - private_assignments = SchedTimeSessAssignment.objects.filter( - models.Q( - schedule=models.F('session__meeting__schedule') - ) | models.Q( - schedule=models.F('session__meeting__schedule__base') - ), - timeslot__type__private=True, - ) - for pa in private_assignments: - pa.session.on_agenda = False - pa.session.save() - # Also update any sessions to match their purpose's default setting (this intentionally - # overrides the timeslot settings above, but that is unlikely to matter because the - # purposes will roll out at the same time as the on_agenda field) - Session.objects.filter(purpose__on_agenda=False).update(on_agenda=False) - Session.objects.filter(purpose__on_agenda=True).update(on_agenda=True) - -def reverse(apps, schema_editor): - Session = apps.get_model('meeting', 'Session') - Session.objects.update(on_agenda=True) # restore all to default on_agenda=True state - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0050_session_on_agenda'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0052_auto_20220503_1815.py b/ietf/meeting/migrations/0052_auto_20220503_1815.py deleted file mode 100644 index 8a01c23ab..000000000 --- a/ietf/meeting/migrations/0052_auto_20220503_1815.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.28 on 2022-05-03 18:15 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0051_populate_session_on_agenda'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='country', - field=models.CharField(blank=True, choices=[('', '---------'), ('AF', 'Afghanistan'), ('AL', 'Albania'), ('DZ', 'Algeria'), ('AD', 'Andorra'), ('AO', 'Angola'), ('AI', 'Anguilla'), ('AQ', 'Antarctica'), ('AG', 'Antigua & Barbuda'), ('AR', 'Argentina'), ('AM', 'Armenia'), ('AW', 'Aruba'), ('AU', 'Australia'), ('AT', 'Austria'), ('AZ', 'Azerbaijan'), ('BS', 'Bahamas'), ('BH', 'Bahrain'), ('BD', 'Bangladesh'), ('BB', 'Barbados'), ('BY', 'Belarus'), ('BE', 'Belgium'), ('BZ', 'Belize'), ('BJ', 'Benin'), ('BM', 'Bermuda'), ('BT', 'Bhutan'), ('BO', 'Bolivia'), ('BA', 'Bosnia & Herzegovina'), ('BW', 'Botswana'), ('BV', 'Bouvet Island'), ('BR', 'Brazil'), ('GB', 'Britain (UK)'), ('IO', 'British Indian Ocean Territory'), ('BN', 'Brunei'), ('BG', 'Bulgaria'), ('BF', 'Burkina Faso'), ('BI', 'Burundi'), ('KH', 'Cambodia'), ('CM', 'Cameroon'), ('CA', 'Canada'), ('CV', 'Cape Verde'), ('BQ', 'Caribbean NL'), ('KY', 'Cayman Islands'), ('CF', 'Central African Rep.'), ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'), ('CX', 'Christmas Island'), ('CC', 'Cocos (Keeling) Islands'), ('CO', 'Colombia'), ('KM', 'Comoros'), ('CD', 'Congo (Dem. Rep.)'), ('CG', 'Congo (Rep.)'), ('CK', 'Cook Islands'), ('CR', 'Costa Rica'), ('HR', 'Croatia'), ('CU', 'Cuba'), ('CW', 'Curaçao'), ('CY', 'Cyprus'), ('CZ', 'Czech Republic'), ('CI', "Côte d'Ivoire"), ('DK', 'Denmark'), ('DJ', 'Djibouti'), ('DM', 'Dominica'), ('DO', 'Dominican Republic'), ('TL', 'East Timor'), ('EC', 'Ecuador'), ('EG', 'Egypt'), ('SV', 'El Salvador'), ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'), ('EE', 'Estonia'), ('SZ', 'Eswatini (Swaziland)'), ('ET', 'Ethiopia'), ('FK', 'Falkland Islands'), ('FO', 'Faroe Islands'), ('FJ', 'Fiji'), ('FI', 'Finland'), ('FR', 'France'), ('GF', 'French Guiana'), ('PF', 'French Polynesia'), ('TF', 'French Southern & Antarctic Lands'), ('GA', 'Gabon'), ('GM', 'Gambia'), ('GE', 'Georgia'), ('DE', 'Germany'), ('GH', 'Ghana'), ('GI', 'Gibraltar'), ('GR', 'Greece'), ('GL', 'Greenland'), ('GD', 'Grenada'), ('GP', 'Guadeloupe'), ('GU', 'Guam'), ('GT', 'Guatemala'), ('GG', 'Guernsey'), ('GN', 'Guinea'), ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'), ('HT', 'Haiti'), ('HM', 'Heard Island & McDonald Islands'), ('HN', 'Honduras'), ('HK', 'Hong Kong'), ('HU', 'Hungary'), ('IS', 'Iceland'), ('IN', 'India'), ('ID', 'Indonesia'), ('IR', 'Iran'), ('IQ', 'Iraq'), ('IE', 'Ireland'), ('IM', 'Isle of Man'), ('IL', 'Israel'), ('IT', 'Italy'), ('JM', 'Jamaica'), ('JP', 'Japan'), ('JE', 'Jersey'), ('JO', 'Jordan'), ('KZ', 'Kazakhstan'), ('KE', 'Kenya'), ('KI', 'Kiribati'), ('KP', 'Korea (North)'), ('KR', 'Korea (South)'), ('KW', 'Kuwait'), ('KG', 'Kyrgyzstan'), ('LA', 'Laos'), ('LV', 'Latvia'), ('LB', 'Lebanon'), ('LS', 'Lesotho'), ('LR', 'Liberia'), ('LY', 'Libya'), ('LI', 'Liechtenstein'), ('LT', 'Lithuania'), ('LU', 'Luxembourg'), ('MO', 'Macau'), ('MG', 'Madagascar'), ('MW', 'Malawi'), ('MY', 'Malaysia'), ('MV', 'Maldives'), ('ML', 'Mali'), ('MT', 'Malta'), ('MH', 'Marshall Islands'), ('MQ', 'Martinique'), ('MR', 'Mauritania'), ('MU', 'Mauritius'), ('YT', 'Mayotte'), ('MX', 'Mexico'), ('FM', 'Micronesia'), ('MD', 'Moldova'), ('MC', 'Monaco'), ('MN', 'Mongolia'), ('ME', 'Montenegro'), ('MS', 'Montserrat'), ('MA', 'Morocco'), ('MZ', 'Mozambique'), ('MM', 'Myanmar (Burma)'), ('NA', 'Namibia'), ('NR', 'Nauru'), ('NP', 'Nepal'), ('NL', 'Netherlands'), ('NC', 'New Caledonia'), ('NZ', 'New Zealand'), ('NI', 'Nicaragua'), ('NE', 'Niger'), ('NG', 'Nigeria'), ('NU', 'Niue'), ('NF', 'Norfolk Island'), ('MK', 'North Macedonia'), ('MP', 'Northern Mariana Islands'), ('NO', 'Norway'), ('OM', 'Oman'), ('PK', 'Pakistan'), ('PW', 'Palau'), ('PS', 'Palestine'), ('PA', 'Panama'), ('PG', 'Papua New Guinea'), ('PY', 'Paraguay'), ('PE', 'Peru'), ('PH', 'Philippines'), ('PN', 'Pitcairn'), ('PL', 'Poland'), ('PT', 'Portugal'), ('PR', 'Puerto Rico'), ('QA', 'Qatar'), ('RO', 'Romania'), ('RU', 'Russia'), ('RW', 'Rwanda'), ('RE', 'Réunion'), ('AS', 'Samoa (American)'), ('WS', 'Samoa (western)'), ('SM', 'San Marino'), ('ST', 'Sao Tome & Principe'), ('SA', 'Saudi Arabia'), ('SN', 'Senegal'), ('RS', 'Serbia'), ('SC', 'Seychelles'), ('SL', 'Sierra Leone'), ('SG', 'Singapore'), ('SK', 'Slovakia'), ('SI', 'Slovenia'), ('SB', 'Solomon Islands'), ('SO', 'Somalia'), ('ZA', 'South Africa'), ('GS', 'South Georgia & the South Sandwich Islands'), ('SS', 'South Sudan'), ('ES', 'Spain'), ('LK', 'Sri Lanka'), ('BL', 'St Barthelemy'), ('SH', 'St Helena'), ('KN', 'St Kitts & Nevis'), ('LC', 'St Lucia'), ('SX', 'St Maarten (Dutch)'), ('MF', 'St Martin (French)'), ('PM', 'St Pierre & Miquelon'), ('VC', 'St Vincent'), ('SD', 'Sudan'), ('SR', 'Suriname'), ('SJ', 'Svalbard & Jan Mayen'), ('SE', 'Sweden'), ('CH', 'Switzerland'), ('SY', 'Syria'), ('TW', 'Taiwan'), ('TJ', 'Tajikistan'), ('TZ', 'Tanzania'), ('TH', 'Thailand'), ('TG', 'Togo'), ('TK', 'Tokelau'), ('TO', 'Tonga'), ('TT', 'Trinidad & Tobago'), ('TN', 'Tunisia'), ('TR', 'Turkey'), ('TM', 'Turkmenistan'), ('TC', 'Turks & Caicos Is'), ('TV', 'Tuvalu'), ('UM', 'US minor outlying islands'), ('UG', 'Uganda'), ('UA', 'Ukraine'), ('AE', 'United Arab Emirates'), ('US', 'United States'), ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'), ('VU', 'Vanuatu'), ('VA', 'Vatican City'), ('VE', 'Venezuela'), ('VN', 'Vietnam'), ('VG', 'Virgin Islands (UK)'), ('VI', 'Virgin Islands (US)'), ('WF', 'Wallis & Futuna'), ('EH', 'Western Sahara'), ('YE', 'Yemen'), ('ZM', 'Zambia'), ('ZW', 'Zimbabwe'), ('AX', 'Åland Islands')], max_length=2), - ), - ] diff --git a/ietf/meeting/migrations/0053_attended.py b/ietf/meeting/migrations/0053_attended.py deleted file mode 100644 index 110101cf1..000000000 --- a/ietf/meeting/migrations/0053_attended.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved -# Generated by Django 2.2.28 on 2022-06-17 08:40 - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0023_auto_20220615_1006'), - ('meeting', '0052_auto_20220503_1815'), - ] - - operations = [ - migrations.CreateModel( - name='Attended', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('session', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Session')), - ], - options={ - 'unique_together': {('person', 'session')}, - }, - ), - ] diff --git a/ietf/meeting/migrations/0054_pytz_2002_2.py b/ietf/meeting/migrations/0054_pytz_2002_2.py deleted file mode 100644 index bb9ad62a5..000000000 --- a/ietf/meeting/migrations/0054_pytz_2002_2.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.28 on 2022-08-12 09:24 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0053_attended'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='time_zone', - field=models.CharField(blank=True, choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montreal', 'America/Montreal'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Nuuk', 'America/Nuuk'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Chongqing', 'Asia/Chongqing'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hanoi', 'Asia/Hanoi'), ('Asia/Harbin', 'Asia/Harbin'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kashgar', 'Asia/Kashgar'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Currie', 'Australia/Currie'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Kyiv', 'Europe/Kyiv'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Enderbury', 'Pacific/Enderbury'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Johnston', 'Pacific/Johnston'), ('Pacific/Kanton', 'Pacific/Kanton'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], max_length=255), - ), - ] diff --git a/ietf/meeting/migrations/0055_pytz_2022_2_1.py b/ietf/meeting/migrations/0055_pytz_2022_2_1.py deleted file mode 100644 index 8ad9b4b82..000000000 --- a/ietf/meeting/migrations/0055_pytz_2022_2_1.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.28 on 2022-08-18 08:31 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0054_pytz_2002_2'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='time_zone', - field=models.CharField(blank=True, choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Nuuk', 'America/Nuuk'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Kyiv', 'Europe/Kyiv'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kanton', 'Pacific/Kanton'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], max_length=255), - ), - ] diff --git a/ietf/meeting/migrations/0056_use_timezone_now_for_meeting_models.py b/ietf/meeting/migrations/0056_use_timezone_now_for_meeting_models.py deleted file mode 100644 index 83d20fd57..000000000 --- a/ietf/meeting/migrations/0056_use_timezone_now_for_meeting_models.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-12 11:24 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0055_pytz_2022_2_1'), - ] - - operations = [ - migrations.AlterField( - model_name='schedulingevent', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now, help_text='When the event happened'), - ), - ] diff --git a/ietf/meeting/migrations/0057_fill_in_empty_meeting_time_zone.py b/ietf/meeting/migrations/0057_fill_in_empty_meeting_time_zone.py deleted file mode 100644 index f009b08f3..000000000 --- a/ietf/meeting/migrations/0057_fill_in_empty_meeting_time_zone.py +++ /dev/null @@ -1,47 +0,0 @@ -# Generated by Django 2.2.28 on 2022-08-08 11:37 - -import datetime - -from django.db import migrations - - -# date of last meeting with an empty time_zone before this migration -LAST_EMPTY_TZ = datetime.date(2022, 7, 1) - - -def forward(apps, schema_editor): - Meeting = apps.get_model('meeting', 'Meeting') - - # Check that we will be able to identify the migrated meetings later - old_meetings_in_pst8pdt = Meeting.objects.filter(type_id='interim', time_zone='PST8PDT', date__lte=LAST_EMPTY_TZ) - assert old_meetings_in_pst8pdt.count() == 0, 'not expecting interim meetings in PST8PDT time_zone' - - meetings_with_empty_tz = Meeting.objects.filter(time_zone='') - # check our expected conditions - for mtg in meetings_with_empty_tz: - assert mtg.type_id == 'interim', 'was not expecting non-interim meetings to be affected' - assert mtg.date <= LAST_EMPTY_TZ, 'affected meeting outside expected date range' - mtg.time_zone = 'PST8PDT' - - # commit the changes - Meeting.objects.bulk_update(meetings_with_empty_tz, ['time_zone']) - - -def reverse(apps, schema_editor): - Meeting = apps.get_model('meeting', 'Meeting') - meetings_to_restore = Meeting.objects.filter(time_zone='PST8PDT', date__lte=LAST_EMPTY_TZ) - for mtg in meetings_to_restore: - mtg.time_zone = '' - # commit the changes - Meeting.objects.bulk_update(meetings_to_restore, ['time_zone']) - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0056_use_timezone_now_for_meeting_models'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0058_meeting_time_zone_not_blank.py b/ietf/meeting/migrations/0058_meeting_time_zone_not_blank.py deleted file mode 100644 index 0adec77a2..000000000 --- a/ietf/meeting/migrations/0058_meeting_time_zone_not_blank.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.28 on 2022-08-25 12:09 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0057_fill_in_empty_meeting_time_zone'), - ] - - operations = [ - migrations.AlterField( - model_name='meeting', - name='time_zone', - field=models.CharField(choices=[('', '---------'), ('Africa/Abidjan', 'Africa/Abidjan'), ('Africa/Accra', 'Africa/Accra'), ('Africa/Addis_Ababa', 'Africa/Addis_Ababa'), ('Africa/Algiers', 'Africa/Algiers'), ('Africa/Asmara', 'Africa/Asmara'), ('Africa/Bamako', 'Africa/Bamako'), ('Africa/Bangui', 'Africa/Bangui'), ('Africa/Banjul', 'Africa/Banjul'), ('Africa/Bissau', 'Africa/Bissau'), ('Africa/Blantyre', 'Africa/Blantyre'), ('Africa/Brazzaville', 'Africa/Brazzaville'), ('Africa/Bujumbura', 'Africa/Bujumbura'), ('Africa/Cairo', 'Africa/Cairo'), ('Africa/Casablanca', 'Africa/Casablanca'), ('Africa/Ceuta', 'Africa/Ceuta'), ('Africa/Conakry', 'Africa/Conakry'), ('Africa/Dakar', 'Africa/Dakar'), ('Africa/Dar_es_Salaam', 'Africa/Dar_es_Salaam'), ('Africa/Djibouti', 'Africa/Djibouti'), ('Africa/Douala', 'Africa/Douala'), ('Africa/El_Aaiun', 'Africa/El_Aaiun'), ('Africa/Freetown', 'Africa/Freetown'), ('Africa/Gaborone', 'Africa/Gaborone'), ('Africa/Harare', 'Africa/Harare'), ('Africa/Johannesburg', 'Africa/Johannesburg'), ('Africa/Juba', 'Africa/Juba'), ('Africa/Kampala', 'Africa/Kampala'), ('Africa/Khartoum', 'Africa/Khartoum'), ('Africa/Kigali', 'Africa/Kigali'), ('Africa/Kinshasa', 'Africa/Kinshasa'), ('Africa/Lagos', 'Africa/Lagos'), ('Africa/Libreville', 'Africa/Libreville'), ('Africa/Lome', 'Africa/Lome'), ('Africa/Luanda', 'Africa/Luanda'), ('Africa/Lubumbashi', 'Africa/Lubumbashi'), ('Africa/Lusaka', 'Africa/Lusaka'), ('Africa/Malabo', 'Africa/Malabo'), ('Africa/Maputo', 'Africa/Maputo'), ('Africa/Maseru', 'Africa/Maseru'), ('Africa/Mbabane', 'Africa/Mbabane'), ('Africa/Mogadishu', 'Africa/Mogadishu'), ('Africa/Monrovia', 'Africa/Monrovia'), ('Africa/Nairobi', 'Africa/Nairobi'), ('Africa/Ndjamena', 'Africa/Ndjamena'), ('Africa/Niamey', 'Africa/Niamey'), ('Africa/Nouakchott', 'Africa/Nouakchott'), ('Africa/Ouagadougou', 'Africa/Ouagadougou'), ('Africa/Porto-Novo', 'Africa/Porto-Novo'), ('Africa/Sao_Tome', 'Africa/Sao_Tome'), ('Africa/Tripoli', 'Africa/Tripoli'), ('Africa/Tunis', 'Africa/Tunis'), ('Africa/Windhoek', 'Africa/Windhoek'), ('America/Adak', 'America/Adak'), ('America/Anchorage', 'America/Anchorage'), ('America/Anguilla', 'America/Anguilla'), ('America/Antigua', 'America/Antigua'), ('America/Araguaina', 'America/Araguaina'), ('America/Argentina/Buenos_Aires', 'America/Argentina/Buenos_Aires'), ('America/Argentina/Catamarca', 'America/Argentina/Catamarca'), ('America/Argentina/Cordoba', 'America/Argentina/Cordoba'), ('America/Argentina/Jujuy', 'America/Argentina/Jujuy'), ('America/Argentina/La_Rioja', 'America/Argentina/La_Rioja'), ('America/Argentina/Mendoza', 'America/Argentina/Mendoza'), ('America/Argentina/Rio_Gallegos', 'America/Argentina/Rio_Gallegos'), ('America/Argentina/Salta', 'America/Argentina/Salta'), ('America/Argentina/San_Juan', 'America/Argentina/San_Juan'), ('America/Argentina/San_Luis', 'America/Argentina/San_Luis'), ('America/Argentina/Tucuman', 'America/Argentina/Tucuman'), ('America/Argentina/Ushuaia', 'America/Argentina/Ushuaia'), ('America/Aruba', 'America/Aruba'), ('America/Asuncion', 'America/Asuncion'), ('America/Atikokan', 'America/Atikokan'), ('America/Bahia', 'America/Bahia'), ('America/Bahia_Banderas', 'America/Bahia_Banderas'), ('America/Barbados', 'America/Barbados'), ('America/Belem', 'America/Belem'), ('America/Belize', 'America/Belize'), ('America/Blanc-Sablon', 'America/Blanc-Sablon'), ('America/Boa_Vista', 'America/Boa_Vista'), ('America/Bogota', 'America/Bogota'), ('America/Boise', 'America/Boise'), ('America/Cambridge_Bay', 'America/Cambridge_Bay'), ('America/Campo_Grande', 'America/Campo_Grande'), ('America/Cancun', 'America/Cancun'), ('America/Caracas', 'America/Caracas'), ('America/Cayenne', 'America/Cayenne'), ('America/Cayman', 'America/Cayman'), ('America/Chicago', 'America/Chicago'), ('America/Chihuahua', 'America/Chihuahua'), ('America/Costa_Rica', 'America/Costa_Rica'), ('America/Creston', 'America/Creston'), ('America/Cuiaba', 'America/Cuiaba'), ('America/Curacao', 'America/Curacao'), ('America/Danmarkshavn', 'America/Danmarkshavn'), ('America/Dawson', 'America/Dawson'), ('America/Dawson_Creek', 'America/Dawson_Creek'), ('America/Denver', 'America/Denver'), ('America/Detroit', 'America/Detroit'), ('America/Dominica', 'America/Dominica'), ('America/Edmonton', 'America/Edmonton'), ('America/Eirunepe', 'America/Eirunepe'), ('America/El_Salvador', 'America/El_Salvador'), ('America/Fort_Nelson', 'America/Fort_Nelson'), ('America/Fortaleza', 'America/Fortaleza'), ('America/Glace_Bay', 'America/Glace_Bay'), ('America/Goose_Bay', 'America/Goose_Bay'), ('America/Grand_Turk', 'America/Grand_Turk'), ('America/Grenada', 'America/Grenada'), ('America/Guadeloupe', 'America/Guadeloupe'), ('America/Guatemala', 'America/Guatemala'), ('America/Guayaquil', 'America/Guayaquil'), ('America/Guyana', 'America/Guyana'), ('America/Halifax', 'America/Halifax'), ('America/Havana', 'America/Havana'), ('America/Hermosillo', 'America/Hermosillo'), ('America/Indiana/Indianapolis', 'America/Indiana/Indianapolis'), ('America/Indiana/Knox', 'America/Indiana/Knox'), ('America/Indiana/Marengo', 'America/Indiana/Marengo'), ('America/Indiana/Petersburg', 'America/Indiana/Petersburg'), ('America/Indiana/Tell_City', 'America/Indiana/Tell_City'), ('America/Indiana/Vevay', 'America/Indiana/Vevay'), ('America/Indiana/Vincennes', 'America/Indiana/Vincennes'), ('America/Indiana/Winamac', 'America/Indiana/Winamac'), ('America/Inuvik', 'America/Inuvik'), ('America/Iqaluit', 'America/Iqaluit'), ('America/Jamaica', 'America/Jamaica'), ('America/Juneau', 'America/Juneau'), ('America/Kentucky/Louisville', 'America/Kentucky/Louisville'), ('America/Kentucky/Monticello', 'America/Kentucky/Monticello'), ('America/La_Paz', 'America/La_Paz'), ('America/Lima', 'America/Lima'), ('America/Los_Angeles', 'America/Los_Angeles'), ('America/Maceio', 'America/Maceio'), ('America/Managua', 'America/Managua'), ('America/Manaus', 'America/Manaus'), ('America/Martinique', 'America/Martinique'), ('America/Matamoros', 'America/Matamoros'), ('America/Mazatlan', 'America/Mazatlan'), ('America/Menominee', 'America/Menominee'), ('America/Merida', 'America/Merida'), ('America/Metlakatla', 'America/Metlakatla'), ('America/Mexico_City', 'America/Mexico_City'), ('America/Miquelon', 'America/Miquelon'), ('America/Moncton', 'America/Moncton'), ('America/Monterrey', 'America/Monterrey'), ('America/Montevideo', 'America/Montevideo'), ('America/Montserrat', 'America/Montserrat'), ('America/Nassau', 'America/Nassau'), ('America/New_York', 'America/New_York'), ('America/Nipigon', 'America/Nipigon'), ('America/Nome', 'America/Nome'), ('America/Noronha', 'America/Noronha'), ('America/North_Dakota/Beulah', 'America/North_Dakota/Beulah'), ('America/North_Dakota/Center', 'America/North_Dakota/Center'), ('America/North_Dakota/New_Salem', 'America/North_Dakota/New_Salem'), ('America/Nuuk', 'America/Nuuk'), ('America/Ojinaga', 'America/Ojinaga'), ('America/Panama', 'America/Panama'), ('America/Pangnirtung', 'America/Pangnirtung'), ('America/Paramaribo', 'America/Paramaribo'), ('America/Phoenix', 'America/Phoenix'), ('America/Port-au-Prince', 'America/Port-au-Prince'), ('America/Port_of_Spain', 'America/Port_of_Spain'), ('America/Porto_Velho', 'America/Porto_Velho'), ('America/Puerto_Rico', 'America/Puerto_Rico'), ('America/Punta_Arenas', 'America/Punta_Arenas'), ('America/Rainy_River', 'America/Rainy_River'), ('America/Rankin_Inlet', 'America/Rankin_Inlet'), ('America/Recife', 'America/Recife'), ('America/Regina', 'America/Regina'), ('America/Resolute', 'America/Resolute'), ('America/Rio_Branco', 'America/Rio_Branco'), ('America/Santarem', 'America/Santarem'), ('America/Santiago', 'America/Santiago'), ('America/Santo_Domingo', 'America/Santo_Domingo'), ('America/Sao_Paulo', 'America/Sao_Paulo'), ('America/Scoresbysund', 'America/Scoresbysund'), ('America/Sitka', 'America/Sitka'), ('America/St_Johns', 'America/St_Johns'), ('America/St_Kitts', 'America/St_Kitts'), ('America/St_Lucia', 'America/St_Lucia'), ('America/St_Thomas', 'America/St_Thomas'), ('America/St_Vincent', 'America/St_Vincent'), ('America/Swift_Current', 'America/Swift_Current'), ('America/Tegucigalpa', 'America/Tegucigalpa'), ('America/Thule', 'America/Thule'), ('America/Thunder_Bay', 'America/Thunder_Bay'), ('America/Tijuana', 'America/Tijuana'), ('America/Toronto', 'America/Toronto'), ('America/Tortola', 'America/Tortola'), ('America/Vancouver', 'America/Vancouver'), ('America/Whitehorse', 'America/Whitehorse'), ('America/Winnipeg', 'America/Winnipeg'), ('America/Yakutat', 'America/Yakutat'), ('America/Yellowknife', 'America/Yellowknife'), ('Antarctica/Casey', 'Antarctica/Casey'), ('Antarctica/Davis', 'Antarctica/Davis'), ('Antarctica/DumontDUrville', 'Antarctica/DumontDUrville'), ('Antarctica/Macquarie', 'Antarctica/Macquarie'), ('Antarctica/Mawson', 'Antarctica/Mawson'), ('Antarctica/McMurdo', 'Antarctica/McMurdo'), ('Antarctica/Palmer', 'Antarctica/Palmer'), ('Antarctica/Rothera', 'Antarctica/Rothera'), ('Antarctica/Syowa', 'Antarctica/Syowa'), ('Antarctica/Troll', 'Antarctica/Troll'), ('Antarctica/Vostok', 'Antarctica/Vostok'), ('Asia/Aden', 'Asia/Aden'), ('Asia/Almaty', 'Asia/Almaty'), ('Asia/Amman', 'Asia/Amman'), ('Asia/Anadyr', 'Asia/Anadyr'), ('Asia/Aqtau', 'Asia/Aqtau'), ('Asia/Aqtobe', 'Asia/Aqtobe'), ('Asia/Ashgabat', 'Asia/Ashgabat'), ('Asia/Atyrau', 'Asia/Atyrau'), ('Asia/Baghdad', 'Asia/Baghdad'), ('Asia/Bahrain', 'Asia/Bahrain'), ('Asia/Baku', 'Asia/Baku'), ('Asia/Bangkok', 'Asia/Bangkok'), ('Asia/Barnaul', 'Asia/Barnaul'), ('Asia/Beirut', 'Asia/Beirut'), ('Asia/Bishkek', 'Asia/Bishkek'), ('Asia/Brunei', 'Asia/Brunei'), ('Asia/Chita', 'Asia/Chita'), ('Asia/Choibalsan', 'Asia/Choibalsan'), ('Asia/Colombo', 'Asia/Colombo'), ('Asia/Damascus', 'Asia/Damascus'), ('Asia/Dhaka', 'Asia/Dhaka'), ('Asia/Dili', 'Asia/Dili'), ('Asia/Dubai', 'Asia/Dubai'), ('Asia/Dushanbe', 'Asia/Dushanbe'), ('Asia/Famagusta', 'Asia/Famagusta'), ('Asia/Gaza', 'Asia/Gaza'), ('Asia/Hebron', 'Asia/Hebron'), ('Asia/Ho_Chi_Minh', 'Asia/Ho_Chi_Minh'), ('Asia/Hong_Kong', 'Asia/Hong_Kong'), ('Asia/Hovd', 'Asia/Hovd'), ('Asia/Irkutsk', 'Asia/Irkutsk'), ('Asia/Jakarta', 'Asia/Jakarta'), ('Asia/Jayapura', 'Asia/Jayapura'), ('Asia/Jerusalem', 'Asia/Jerusalem'), ('Asia/Kabul', 'Asia/Kabul'), ('Asia/Kamchatka', 'Asia/Kamchatka'), ('Asia/Karachi', 'Asia/Karachi'), ('Asia/Kathmandu', 'Asia/Kathmandu'), ('Asia/Khandyga', 'Asia/Khandyga'), ('Asia/Kolkata', 'Asia/Kolkata'), ('Asia/Krasnoyarsk', 'Asia/Krasnoyarsk'), ('Asia/Kuala_Lumpur', 'Asia/Kuala_Lumpur'), ('Asia/Kuching', 'Asia/Kuching'), ('Asia/Kuwait', 'Asia/Kuwait'), ('Asia/Macau', 'Asia/Macau'), ('Asia/Magadan', 'Asia/Magadan'), ('Asia/Makassar', 'Asia/Makassar'), ('Asia/Manila', 'Asia/Manila'), ('Asia/Muscat', 'Asia/Muscat'), ('Asia/Nicosia', 'Asia/Nicosia'), ('Asia/Novokuznetsk', 'Asia/Novokuznetsk'), ('Asia/Novosibirsk', 'Asia/Novosibirsk'), ('Asia/Omsk', 'Asia/Omsk'), ('Asia/Oral', 'Asia/Oral'), ('Asia/Phnom_Penh', 'Asia/Phnom_Penh'), ('Asia/Pontianak', 'Asia/Pontianak'), ('Asia/Pyongyang', 'Asia/Pyongyang'), ('Asia/Qatar', 'Asia/Qatar'), ('Asia/Qostanay', 'Asia/Qostanay'), ('Asia/Qyzylorda', 'Asia/Qyzylorda'), ('Asia/Riyadh', 'Asia/Riyadh'), ('Asia/Sakhalin', 'Asia/Sakhalin'), ('Asia/Samarkand', 'Asia/Samarkand'), ('Asia/Seoul', 'Asia/Seoul'), ('Asia/Shanghai', 'Asia/Shanghai'), ('Asia/Singapore', 'Asia/Singapore'), ('Asia/Srednekolymsk', 'Asia/Srednekolymsk'), ('Asia/Taipei', 'Asia/Taipei'), ('Asia/Tashkent', 'Asia/Tashkent'), ('Asia/Tbilisi', 'Asia/Tbilisi'), ('Asia/Tehran', 'Asia/Tehran'), ('Asia/Thimphu', 'Asia/Thimphu'), ('Asia/Tokyo', 'Asia/Tokyo'), ('Asia/Tomsk', 'Asia/Tomsk'), ('Asia/Ulaanbaatar', 'Asia/Ulaanbaatar'), ('Asia/Urumqi', 'Asia/Urumqi'), ('Asia/Ust-Nera', 'Asia/Ust-Nera'), ('Asia/Vientiane', 'Asia/Vientiane'), ('Asia/Vladivostok', 'Asia/Vladivostok'), ('Asia/Yakutsk', 'Asia/Yakutsk'), ('Asia/Yangon', 'Asia/Yangon'), ('Asia/Yekaterinburg', 'Asia/Yekaterinburg'), ('Asia/Yerevan', 'Asia/Yerevan'), ('Atlantic/Azores', 'Atlantic/Azores'), ('Atlantic/Bermuda', 'Atlantic/Bermuda'), ('Atlantic/Canary', 'Atlantic/Canary'), ('Atlantic/Cape_Verde', 'Atlantic/Cape_Verde'), ('Atlantic/Faroe', 'Atlantic/Faroe'), ('Atlantic/Madeira', 'Atlantic/Madeira'), ('Atlantic/Reykjavik', 'Atlantic/Reykjavik'), ('Atlantic/South_Georgia', 'Atlantic/South_Georgia'), ('Atlantic/St_Helena', 'Atlantic/St_Helena'), ('Atlantic/Stanley', 'Atlantic/Stanley'), ('Australia/Adelaide', 'Australia/Adelaide'), ('Australia/Brisbane', 'Australia/Brisbane'), ('Australia/Broken_Hill', 'Australia/Broken_Hill'), ('Australia/Darwin', 'Australia/Darwin'), ('Australia/Eucla', 'Australia/Eucla'), ('Australia/Hobart', 'Australia/Hobart'), ('Australia/Lindeman', 'Australia/Lindeman'), ('Australia/Lord_Howe', 'Australia/Lord_Howe'), ('Australia/Melbourne', 'Australia/Melbourne'), ('Australia/Perth', 'Australia/Perth'), ('Australia/Sydney', 'Australia/Sydney'), ('Europe/Amsterdam', 'Europe/Amsterdam'), ('Europe/Andorra', 'Europe/Andorra'), ('Europe/Astrakhan', 'Europe/Astrakhan'), ('Europe/Athens', 'Europe/Athens'), ('Europe/Belgrade', 'Europe/Belgrade'), ('Europe/Berlin', 'Europe/Berlin'), ('Europe/Brussels', 'Europe/Brussels'), ('Europe/Bucharest', 'Europe/Bucharest'), ('Europe/Budapest', 'Europe/Budapest'), ('Europe/Chisinau', 'Europe/Chisinau'), ('Europe/Copenhagen', 'Europe/Copenhagen'), ('Europe/Dublin', 'Europe/Dublin'), ('Europe/Gibraltar', 'Europe/Gibraltar'), ('Europe/Helsinki', 'Europe/Helsinki'), ('Europe/Istanbul', 'Europe/Istanbul'), ('Europe/Kaliningrad', 'Europe/Kaliningrad'), ('Europe/Kirov', 'Europe/Kirov'), ('Europe/Kyiv', 'Europe/Kyiv'), ('Europe/Lisbon', 'Europe/Lisbon'), ('Europe/London', 'Europe/London'), ('Europe/Luxembourg', 'Europe/Luxembourg'), ('Europe/Madrid', 'Europe/Madrid'), ('Europe/Malta', 'Europe/Malta'), ('Europe/Minsk', 'Europe/Minsk'), ('Europe/Monaco', 'Europe/Monaco'), ('Europe/Moscow', 'Europe/Moscow'), ('Europe/Oslo', 'Europe/Oslo'), ('Europe/Paris', 'Europe/Paris'), ('Europe/Prague', 'Europe/Prague'), ('Europe/Riga', 'Europe/Riga'), ('Europe/Rome', 'Europe/Rome'), ('Europe/Samara', 'Europe/Samara'), ('Europe/Saratov', 'Europe/Saratov'), ('Europe/Simferopol', 'Europe/Simferopol'), ('Europe/Sofia', 'Europe/Sofia'), ('Europe/Stockholm', 'Europe/Stockholm'), ('Europe/Tallinn', 'Europe/Tallinn'), ('Europe/Tirane', 'Europe/Tirane'), ('Europe/Ulyanovsk', 'Europe/Ulyanovsk'), ('Europe/Uzhgorod', 'Europe/Uzhgorod'), ('Europe/Vaduz', 'Europe/Vaduz'), ('Europe/Vienna', 'Europe/Vienna'), ('Europe/Vilnius', 'Europe/Vilnius'), ('Europe/Volgograd', 'Europe/Volgograd'), ('Europe/Warsaw', 'Europe/Warsaw'), ('Europe/Zaporozhye', 'Europe/Zaporozhye'), ('Europe/Zurich', 'Europe/Zurich'), ('GMT', 'GMT'), ('Indian/Antananarivo', 'Indian/Antananarivo'), ('Indian/Chagos', 'Indian/Chagos'), ('Indian/Christmas', 'Indian/Christmas'), ('Indian/Cocos', 'Indian/Cocos'), ('Indian/Comoro', 'Indian/Comoro'), ('Indian/Kerguelen', 'Indian/Kerguelen'), ('Indian/Mahe', 'Indian/Mahe'), ('Indian/Maldives', 'Indian/Maldives'), ('Indian/Mauritius', 'Indian/Mauritius'), ('Indian/Mayotte', 'Indian/Mayotte'), ('Indian/Reunion', 'Indian/Reunion'), ('Pacific/Apia', 'Pacific/Apia'), ('Pacific/Auckland', 'Pacific/Auckland'), ('Pacific/Bougainville', 'Pacific/Bougainville'), ('Pacific/Chatham', 'Pacific/Chatham'), ('Pacific/Chuuk', 'Pacific/Chuuk'), ('Pacific/Easter', 'Pacific/Easter'), ('Pacific/Efate', 'Pacific/Efate'), ('Pacific/Fakaofo', 'Pacific/Fakaofo'), ('Pacific/Fiji', 'Pacific/Fiji'), ('Pacific/Funafuti', 'Pacific/Funafuti'), ('Pacific/Galapagos', 'Pacific/Galapagos'), ('Pacific/Gambier', 'Pacific/Gambier'), ('Pacific/Guadalcanal', 'Pacific/Guadalcanal'), ('Pacific/Guam', 'Pacific/Guam'), ('Pacific/Honolulu', 'Pacific/Honolulu'), ('Pacific/Kanton', 'Pacific/Kanton'), ('Pacific/Kiritimati', 'Pacific/Kiritimati'), ('Pacific/Kosrae', 'Pacific/Kosrae'), ('Pacific/Kwajalein', 'Pacific/Kwajalein'), ('Pacific/Majuro', 'Pacific/Majuro'), ('Pacific/Marquesas', 'Pacific/Marquesas'), ('Pacific/Midway', 'Pacific/Midway'), ('Pacific/Nauru', 'Pacific/Nauru'), ('Pacific/Niue', 'Pacific/Niue'), ('Pacific/Norfolk', 'Pacific/Norfolk'), ('Pacific/Noumea', 'Pacific/Noumea'), ('Pacific/Pago_Pago', 'Pacific/Pago_Pago'), ('Pacific/Palau', 'Pacific/Palau'), ('Pacific/Pitcairn', 'Pacific/Pitcairn'), ('Pacific/Pohnpei', 'Pacific/Pohnpei'), ('Pacific/Port_Moresby', 'Pacific/Port_Moresby'), ('Pacific/Rarotonga', 'Pacific/Rarotonga'), ('Pacific/Saipan', 'Pacific/Saipan'), ('Pacific/Tahiti', 'Pacific/Tahiti'), ('Pacific/Tarawa', 'Pacific/Tarawa'), ('Pacific/Tongatapu', 'Pacific/Tongatapu'), ('Pacific/Wake', 'Pacific/Wake'), ('Pacific/Wallis', 'Pacific/Wallis'), ('UTC', 'UTC')], default='UTC', max_length=255), - ), - ] diff --git a/ietf/meeting/migrations/0059_rename_sessions.py b/ietf/meeting/migrations/0059_rename_sessions.py deleted file mode 100644 index a9e56646b..000000000 --- a/ietf/meeting/migrations/0059_rename_sessions.py +++ /dev/null @@ -1,41 +0,0 @@ -# Generated by Django 2.2.28 on 2023-02-06 22:20 -from django.db import migrations -from django.db.models import ExpressionWrapper, F, IntegerField - - -def forward(apps, schema_editor): - Meeting = apps.get_model('meeting', 'Meeting') - meetings = Meeting.objects.filter(type='ietf', schedule__isnull=False).annotate( - number_as_int=ExpressionWrapper(F('number'), output_field=IntegerField()) - ).order_by('date') - # print('session.pk,meeting.number,session.name,timeslot.name') - for m in meetings.filter(number_as_int__lt=91): - # until meeting 91, TimeSlots had the more descriptive names - for assignment in m.schedule.assignments.exclude(session__type='regular').exclude(session__name=F('timeslot__name')): - # print(f'{assignment.session.pk},{m.number},{assignment.session.name},{assignment.timeslot.name}') - assignment.session.name = assignment.timeslot.name - assignment.session.save() - - # meetings 91-98 had no differences or were better off with session names as they were - - for m in meetings.filter(number_as_int__gte=99): - # for meetings 99+, TimeSlots again had the better names - for assignment in m.schedule.assignments.exclude(session__type='regular').exclude(session__name=F('timeslot__name')): - # print(f'{assignment.session.pk},{m.number},{assignment.session.name},{assignment.timeslot.name}') - assignment.session.name = assignment.timeslot.name - assignment.session.save() - - -def reverse(apps, schema_editor): - pass # can't undo - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0058_meeting_time_zone_not_blank'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0060_normalize_canceled_sessions.py b/ietf/meeting/migrations/0060_normalize_canceled_sessions.py deleted file mode 100644 index 31c4a21df..000000000 --- a/ietf/meeting/migrations/0060_normalize_canceled_sessions.py +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by Django 2.2.28 on 2023-02-08 22:41 - -from django.db import migrations -from django.db.models import Subquery, OuterRef, Value, TextField -from django.db.models.functions import Coalesce - - -def forward(apps, schema_editor): - Session = apps.get_model('meeting', 'Session') - SchedulingEvent = apps.get_model('meeting', 'SchedulingEvent') - Person = apps.get_model('person', 'Person') - - # annotation borrowed from SessionQuerySet.with_current_status() - sessions = Session.objects.annotate( - # coalesce with '' to avoid nulls which give funny - # results, e.g. .exclude(current_status='canceled') also - # skips rows with null in them - current_status=Coalesce( - Subquery( - SchedulingEvent.objects.filter( - session=OuterRef('pk') - ).order_by( - '-time', '-id' - ).values('status')[:1]), - Value(''), - output_field=TextField()), - ).exclude( - current_status__in=['canceled', 'canceledpa'], - ) - system_person = Person.objects.get(name='(System)') - - # Cancel any uncanceled sessions marked as 'CANCELED' in the agenda_note - for session in sessions.filter(agenda_note='CANCELED'): - SchedulingEvent.objects.create(session=session, status_id='canceled', by=system_person) - - -def reverse(apps, schema_editor): - pass # nothing to be done - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0059_rename_sessions'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/meeting/migrations/0061_durationfield_are_intervals.py b/ietf/meeting/migrations/0061_durationfield_are_intervals.py deleted file mode 100644 index 38aa07629..000000000 --- a/ietf/meeting/migrations/0061_durationfield_are_intervals.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.2.28 on 2022-11-10 02:35 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('meeting', '0060_normalize_canceled_sessions'), - ('utils', '0004_pause_to_change_database_engines'), - ] - - operations = [ - # reversesql is intentionally not provided. There is no looking back... - migrations.RunSQL(sql="update meeting_meeting set idsubmit_cutoff_time_utc=idsubmit_cutoff_time_utc/1000"), - migrations.RunSQL(sql="alter table meeting_meeting alter column idsubmit_cutoff_time_utc type interval using (idsubmit_cutoff_time_utc::text||' milliseconds')::interval;"), - migrations.RunSQL(sql="update meeting_meeting set idsubmit_cutoff_warning_days=idsubmit_cutoff_warning_days/1000"), - migrations.RunSQL(sql="alter table meeting_meeting alter column idsubmit_cutoff_warning_days type interval using (idsubmit_cutoff_warning_days::text||' milliseconds')::interval;"), - migrations.RunSQL(sql="update meeting_timeslot set duration=duration/1000"), - migrations.RunSQL(sql="alter table meeting_timeslot alter column duration type interval using (duration::text||' milliseconds')::interval;"), - migrations.RunSQL(sql="update meeting_session set requested_duration=requested_duration/1000"), - migrations.RunSQL(sql="alter table meeting_session alter column requested_duration type interval using (requested_duration::text||' milliseconds')::interval;"), - ] diff --git a/ietf/message/migrations/0001_initial.py b/ietf/message/migrations/0001_initial.py index c9e850dfb..102dba595 100644 --- a/ietf/message/migrations/0001_initial.py +++ b/ietf/message/migrations/0001_initial.py @@ -1,11 +1,8 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 +# Generated by Django 2.2.28 on 2023-03-20 19:22 - -import datetime from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone import email.utils import ietf.utils.models @@ -16,29 +13,17 @@ class Migration(migrations.Migration): dependencies = [ ('group', '0001_initial'), - ('name', '0001_initial'), ('person', '0001_initial'), + ('name', '0001_initial'), ('doc', '0001_initial'), ] operations = [ - migrations.CreateModel( - name='AnnouncementFrom', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('address', models.CharField(max_length=255)), - ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.RoleName')), - ], - options={ - 'verbose_name_plural': 'Announcement From addresses', - }, - ), migrations.CreateModel( name='Message', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), ('subject', models.CharField(max_length=255)), ('frm', models.CharField(max_length=255)), ('to', models.CharField(max_length=1024)), @@ -48,6 +33,7 @@ class Migration(migrations.Migration): ('body', models.TextField()), ('content_type', models.CharField(blank=True, default='text/plain', max_length=255)), ('msgid', models.CharField(blank=True, default=email.utils.make_msgid, max_length=255, null=True)), + ('sent', models.DateTimeField(blank=True, null=True)), ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), ('related_docs', models.ManyToManyField(blank=True, to='doc.Document')), ('related_groups', models.ManyToManyField(blank=True, to='group.Group')), @@ -56,6 +42,21 @@ class Migration(migrations.Migration): 'ordering': ['time'], }, ), + migrations.CreateModel( + name='SendQueue', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time', models.DateTimeField(default=django.utils.timezone.now)), + ('send_at', models.DateTimeField(blank=True, null=True)), + ('sent_at', models.DateTimeField(blank=True, null=True)), + ('note', models.TextField(blank=True)), + ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('message', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='message.Message')), + ], + options={ + 'ordering': ['time'], + }, + ), migrations.CreateModel( name='MessageAttachment', fields=[ @@ -69,18 +70,23 @@ class Migration(migrations.Migration): ], ), migrations.CreateModel( - name='SendQueue', + name='AnnouncementFrom', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('send_at', models.DateTimeField(blank=True, null=True)), - ('sent_at', models.DateTimeField(blank=True, null=True)), - ('note', models.TextField(blank=True)), - ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('message', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='message.Message')), + ('address', models.CharField(max_length=255)), + ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('name', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.RoleName')), ], options={ - 'ordering': ['time'], + 'verbose_name_plural': 'Announcement From addresses', }, ), + migrations.AddIndex( + model_name='sendqueue', + index=models.Index(fields=['time'], name='message_sen_time_07ab31_idx'), + ), + migrations.AddIndex( + model_name='message', + index=models.Index(fields=['time'], name='message_mes_time_20eabf_idx'), + ), ] diff --git a/ietf/message/migrations/0002_add_message_docs2_m2m.py b/ietf/message/migrations/0002_add_message_docs2_m2m.py deleted file mode 100644 index c6a138ba6..000000000 --- a/ietf/message/migrations/0002_add_message_docs2_m2m.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 14:23 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='MessageDocs', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('message', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='message.Message')), - ('document', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id')), - ], - ), - migrations.AddField( - model_name='message', - name='related_docs2', - field=models.ManyToManyField(blank=True, related_name='messages', through='message.MessageDocs', to='doc.Document'), - ), - ] diff --git a/ietf/message/migrations/0003_set_document_m2m_keys.py b/ietf/message/migrations/0003_set_document_m2m_keys.py deleted file mode 100644 index 6429af443..000000000 --- a/ietf/message/migrations/0003_set_document_m2m_keys.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 14:27 - - -import sys - -from tqdm import tqdm - -from django.db import migrations - - -def forward(apps, schema_editor): - - Document = apps.get_model('doc','Document') - Message = apps.get_model('message', 'Message') - MessageDocs = apps.get_model('message', 'MessageDocs') - - - # Document id fixup ------------------------------------------------------------ - - objs = Document.objects.in_bulk() - nameid = { o.name: o.id for id, o in objs.items() } - - sys.stderr.write('\n') - - sys.stderr.write(' %s.%s:\n' % (Message.__name__, 'related_docs')) - count = 0 - for m in tqdm(Message.objects.all()): - for d in m.related_docs.all(): - count += 1; - MessageDocs.objects.get_or_create(message=m, document_id=nameid[d.name]) - sys.stderr.write(' %s MessageDocs objects created\n' % (count, )) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0002_add_message_docs2_m2m'), - ('doc', '0014_set_document_docalias_id'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/message/migrations/0004_1_del_docs_m2m_table.py b/ietf/message/migrations/0004_1_del_docs_m2m_table.py deleted file mode 100644 index 7b116789d..000000000 --- a/ietf/message/migrations/0004_1_del_docs_m2m_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-22 08:01 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0003_set_document_m2m_keys'), - ] - - # The implementation of AlterField in Django 1.11 applies - # 'ALTER TABLE
MODIFY ...;' in order to fix foregn keys - # to the altered field, but as it seems does _not_ fix up m2m - # intermediary tables in an equivalent manner, so here we remove and - # then recreate the m2m tables so they will have the appropriate field - # types. - - operations = [ - migrations.RemoveField( - model_name='message', - name='related_docs', - ), - migrations.AddField( - model_name='message', - name='related_docs', - field=models.ManyToManyField(to='doc.Document'), - ), - ] diff --git a/ietf/message/migrations/0004_2_add_docs_m2m_table.py b/ietf/message/migrations/0004_2_add_docs_m2m_table.py deleted file mode 100644 index 4f24a26fe..000000000 --- a/ietf/message/migrations/0004_2_add_docs_m2m_table.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-22 08:01 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0004_1_del_docs_m2m_table'), - ] - - # The implementation of AlterField in Django 1.11 applies - # 'ALTER TABLE
MODIFY ...;' in order to fix foregn keys - # to the altered field, but as it seems does _not_ fix up m2m - # intermediary tables in an equivalent manner, so here we remove and - # then recreate the m2m tables so they will have the appropriate field - # types. - - operations = [ - migrations.RemoveField( - model_name='message', - name='related_docs', - ), - migrations.AddField( - model_name='message', - name='related_docs', - field=models.ManyToManyField(blank=True, to='doc.Document'), - ), - ] diff --git a/ietf/message/migrations/0005_copy_docs_m2m_table.py b/ietf/message/migrations/0005_copy_docs_m2m_table.py deleted file mode 100644 index 8f7c18588..000000000 --- a/ietf/message/migrations/0005_copy_docs_m2m_table.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-27 05:56 - - -import sys, time - -from django.db import migrations - - -def timestamp(apps, schema_editor): - sys.stderr.write('\n %s' % time.strftime('%Y-%m-%d %H:%M:%S')) - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0004_2_add_docs_m2m_table'), - ] - - operations = [ - #migrations.RunPython(forward, reverse), - migrations.RunPython(timestamp, timestamp), - migrations.RunSQL( - "INSERT INTO message_message_related_docs SELECT * FROM message_messagedocs;", - "" - ), - migrations.RunPython(timestamp, timestamp), - ] diff --git a/ietf/message/migrations/0006_remove_docs2_m2m.py b/ietf/message/migrations/0006_remove_docs2_m2m.py deleted file mode 100644 index 97e3ef5f0..000000000 --- a/ietf/message/migrations/0006_remove_docs2_m2m.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-30 03:32 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0005_copy_docs_m2m_table'), - ] - - operations = [ - migrations.RemoveField( - model_name='messagedocs', - name='document', - ), - migrations.RemoveField( - model_name='messagedocs', - name='message', - ), - migrations.RemoveField( - model_name='message', - name='related_docs2', - ), - migrations.DeleteModel( - name='MessageDocs', - ), - ] diff --git a/ietf/message/migrations/0007_message_sent.py b/ietf/message/migrations/0007_message_sent.py deleted file mode 100644 index 9ab1a4041..000000000 --- a/ietf/message/migrations/0007_message_sent.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-02-22 09:29 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0006_remove_docs2_m2m'), - ] - - operations = [ - migrations.AddField( - model_name='message', - name='sent', - field=models.DateTimeField(blank=True, null=True), - ), - ] diff --git a/ietf/message/migrations/0008_set_message_sent.py b/ietf/message/migrations/0008_set_message_sent.py deleted file mode 100644 index 281099305..000000000 --- a/ietf/message/migrations/0008_set_message_sent.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 14:27 - - -from tqdm import tqdm - -from django.db import migrations - - -def forward(apps, schema_editor): - - Message = apps.get_model('message', 'Message') - - for m in tqdm(Message.objects.filter(sent=None)): - if m.sendqueue_set.exists(): - q = m.sendqueue_set.last() - m.sent = q.sent_at - else: - m.sent = m.time - m.save() - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0007_message_sent'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/message/migrations/0009_fix_address_lists.py b/ietf/message/migrations/0009_fix_address_lists.py deleted file mode 100644 index e14b6511c..000000000 --- a/ietf/message/migrations/0009_fix_address_lists.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 14:27 - - -from tqdm import tqdm - -from django.db import migrations - -import debug # pyflakes:ignore - - -def forward(apps, schema_editor): - - Message = apps.get_model('message', 'Message') - - for m in tqdm(Message.objects.all()): - dirty = False - for fieldname in ['to', 'cc', 'bcc', ]: - f = getattr(m, fieldname) - if f.startswith("['") or f.startswith('[]') or f.startswith("[u'"): - l = eval(f) - if isinstance(l, list): - f = ','.join(l) - setattr(m, fieldname, f) - dirty = True - if dirty: - m.save() - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0008_set_message_sent'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/message/migrations/0010_fix_content_type.py b/ietf/message/migrations/0010_fix_content_type.py deleted file mode 100644 index 074114290..000000000 --- a/ietf/message/migrations/0010_fix_content_type.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 14:27 - - -from tqdm import tqdm - -from django.db import migrations - -import debug # pyflakes:ignore - - -def forward(apps, schema_editor): - - Message = apps.get_model('message', 'Message') - - for m in tqdm(Message.objects.filter(content_type='')): - m.content_type = 'text/plain' - m.save() - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0009_fix_address_lists'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/message/migrations/0011_auto_20201109_0439.py b/ietf/message/migrations/0011_auto_20201109_0439.py deleted file mode 100644 index 5134592cf..000000000 --- a/ietf/message/migrations/0011_auto_20201109_0439.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0010_fix_content_type'), - ] - - operations = [ - migrations.AddIndex( - model_name='message', - index=models.Index(fields=['time'], name='message_mes_time_20eabf_idx'), - ), - migrations.AddIndex( - model_name='sendqueue', - index=models.Index(fields=['time'], name='message_sen_time_07ab31_idx'), - ), - ] diff --git a/ietf/message/migrations/0012_use_timezone_now_for_message_models.py b/ietf/message/migrations/0012_use_timezone_now_for_message_models.py deleted file mode 100644 index dbef893ea..000000000 --- a/ietf/message/migrations/0012_use_timezone_now_for_message_models.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-12 11:24 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('message', '0011_auto_20201109_0439'), - ] - - operations = [ - migrations.AlterField( - model_name='message', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='sendqueue', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - ] diff --git a/ietf/name/migrations/0001_initial.py b/ietf/name/migrations/0001_initial.py index 075054504..fbe9cc1b6 100644 --- a/ietf/name/migrations/0001_initial.py +++ b/ietf/name/migrations/0001_initial.py @@ -1,13 +1,10 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - - -from typing import List, Tuple # pyflakes:ignore +# 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 +import ietf.utils.validators +import jsonfield.fields class Migration(migrations.Migration): @@ -15,9 +12,37 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ] # type: List[Tuple[str]] + ] operations = [ + migrations.CreateModel( + name='AgendaFilterTypeName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='AgendaTypeName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), migrations.CreateModel( name='BallotPositionName', fields=[ @@ -42,6 +67,7 @@ class Migration(migrations.Migration): ('used', models.BooleanField(default=True)), ('order', models.IntegerField(default=0)), ('penalty', models.IntegerField(default=0, help_text='The penalty for violating this kind of constraint; for instance 10 (small penalty) or 10000 (large penalty)')), + ('is_group_conflict', models.BooleanField(default=False, help_text='Does this constraint capture a conflict between groups?')), ], options={ 'ordering': ['order', 'name'], @@ -62,22 +88,6 @@ class Migration(migrations.Migration): 'abstract': False, }, ), - migrations.CreateModel( - name='CountryName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ('in_eu', models.BooleanField(default=False, verbose_name='In EU')), - ('continent', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ContinentName')), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), migrations.CreateModel( name='DBTemplateTypeName', fields=[ @@ -165,14 +175,13 @@ class Migration(migrations.Migration): }, ), migrations.CreateModel( - name='DraftSubmissionStateName', + name='ExtResourceTypeName', fields=[ ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), ('name', models.CharField(max_length=255)), ('desc', models.TextField(blank=True)), ('used', models.BooleanField(default=True)), ('order', models.IntegerField(default=0)), - ('next_states', models.ManyToManyField(blank=True, related_name='previous_states', to='name.DraftSubmissionStateName')), ], options={ 'ordering': ['order', 'name'], @@ -405,6 +414,48 @@ class Migration(migrations.Migration): 'abstract': False, }, ), + migrations.CreateModel( + name='ProceedingsMaterialTypeName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='ReviewAssignmentStateName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='ReviewerQueuePolicyName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), migrations.CreateModel( name='ReviewRequestStateName', fields=[ @@ -475,6 +526,22 @@ class Migration(migrations.Migration): 'abstract': False, }, ), + migrations.CreateModel( + name='SessionPurposeName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ('timeslot_types', jsonfield.fields.JSONField(default=[], help_text='Allowed TimeSlotTypeNames', max_length=256, validators=[ietf.utils.validators.JSONForeignKeyListValidator('name.TimeSlotTypeName')])), + ('on_agenda', models.BooleanField(default=True, help_text='Are sessions of this purpose visible on the agenda by default?')), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), migrations.CreateModel( name='SessionStatusName', fields=[ @@ -489,6 +556,20 @@ class Migration(migrations.Migration): 'abstract': False, }, ), + migrations.CreateModel( + name='SlideSubmissionStatusName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), migrations.CreateModel( name='StdLevelName', fields=[ @@ -517,6 +598,20 @@ class Migration(migrations.Migration): 'abstract': False, }, ), + migrations.CreateModel( + name='TimerangeName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), migrations.CreateModel( name='TimeSlotTypeName', fields=[ @@ -545,4 +640,50 @@ class Migration(migrations.Migration): 'abstract': False, }, ), + migrations.CreateModel( + name='ExtResourceName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceTypeName')), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='DraftSubmissionStateName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ('next_states', models.ManyToManyField(blank=True, related_name='previous_states', to='name.DraftSubmissionStateName')), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), + migrations.CreateModel( + name='CountryName', + fields=[ + ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=255)), + ('desc', models.TextField(blank=True)), + ('used', models.BooleanField(default=True)), + ('order', models.IntegerField(default=0)), + ('in_eu', models.BooleanField(default=False, verbose_name='In EU')), + ('continent', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ContinentName')), + ], + options={ + 'ordering': ['order', 'name'], + 'abstract': False, + }, + ), ] diff --git a/ietf/name/migrations/0002_agendatypename.py b/ietf/name/migrations/0002_agendatypename.py deleted file mode 100644 index f916f60da..000000000 --- a/ietf/name/migrations/0002_agendatypename.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.13 on 2018-07-10 13:47 - - -from django.db import migrations, models - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='AgendaTypeName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - ] diff --git a/ietf/name/migrations/0003_agendatypename_data.py b/ietf/name/migrations/0003_agendatypename_data.py deleted file mode 100644 index 4db2056d7..000000000 --- a/ietf/name/migrations/0003_agendatypename_data.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.13 on 2018-07-10 13:47 - - -from django.db import migrations - -agenda_type_names = ( - { - 'slug': 'ietf', - 'name': 'IETF Agenda', - 'desc': '', - 'used': True, - 'order': 0, - }, - { - 'slug': 'ad', - 'name': 'AD Office Hours', - 'desc': '', - 'used': True, - 'order': 0, - }, - { - 'slug': 'side', - 'name': 'Side Meetings', - 'desc': '', - 'used': True, - 'order': 0, - }, - { - 'slug': 'workshop', - 'name': 'Workshops', - 'desc': '', - 'used': True, - 'order': 0, - }, -) - -def forward(apps, schema_editor): - AgendaTypeName = apps.get_model('name', 'AgendaTypeName') - for entry in agenda_type_names: - AgendaTypeName.objects.create(**entry) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0002_agendatypename'), - ('group', '0002_groupfeatures_historicalgroupfeatures'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0004_add_prefix_to_doctypenames.py b/ietf/name/migrations/0004_add_prefix_to_doctypenames.py deleted file mode 100644 index 05c103319..000000000 --- a/ietf/name/migrations/0004_add_prefix_to_doctypenames.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-10-19 11:34 - - -from django.db import migrations - -def forward(apps, schema_editor): - DocTypeName = apps.get_model('name','DocTypeName') - DocTypeName.objects.filter(slug='liaison').update(prefix='liaison') - DocTypeName.objects.filter(slug='review').update(prefix='review') - DocTypeName.objects.filter(slug='shepwrit').update(prefix='shepherd') - -def reverse(apps, schema_editor): - DocTypeName = apps.get_model('name','DocTypeName') - DocTypeName.objects.filter(slug='liaison').update(prefix='') - DocTypeName.objects.filter(slug='review').update(prefix='') - DocTypeName.objects.filter(slug='shepwrit').update(prefix='') - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0003_agendatypename_data'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0005_reviewassignmentstatename.py b/ietf/name/migrations/0005_reviewassignmentstatename.py deleted file mode 100644 index d75f9b774..000000000 --- a/ietf/name/migrations/0005_reviewassignmentstatename.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.18 on 2019-01-04 13:59 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0004_add_prefix_to_doctypenames'), - ] - - operations = [ - migrations.CreateModel( - name='ReviewAssignmentStateName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - ] diff --git a/ietf/name/migrations/0006_adjust_statenames.py b/ietf/name/migrations/0006_adjust_statenames.py deleted file mode 100644 index 6c6092407..000000000 --- a/ietf/name/migrations/0006_adjust_statenames.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.18 on 2019-01-04 14:02 - - -from django.db import migrations - -def forward(apps, schema_editor): - ReviewRequestStateName = apps.get_model('name','ReviewRequestStateName') - ReviewAssignmentStateName = apps.get_model('name','ReviewAssignmentStateName') - - # TODO: Remove these newly unused states in a future release - ReviewRequestStateName.objects.filter(slug__in=['accepted', 'rejected', 'no-response', 'part-completed', 'completed', 'unknown']).update(used=False) - name, created = ReviewRequestStateName.objects.get_or_create(slug = 'assigned') - if created: - name.name = 'Assigned' - name.desc = 'The ReviewRequest has been assigned to at least one reviewer' - name.used = True - name.order = 0 - name.save() - - assignment_states = [ - { 'slug': 'assigned', - 'name': 'Assigned', - 'desc': 'The review has been assigned to this reviewer', - 'used': True, - 'order': 0 - }, - { 'slug':'accepted', - 'name':'Accepted', - 'desc':'The reviewer has accepted the assignment', - 'used': True, - 'order':0 - }, - { 'slug':'rejected', - 'name':'Rejected', - 'desc':'The reviewer has rejected the assignment', - 'used': True, - 'order':0 - }, - { 'slug':'withdrawn', - 'name':'Withdrawn by Team', - 'desc':'The team secretary has withdrawn the assignment', - 'used': True, - 'order':0 - }, - { 'slug':'overtaken', - 'name':'Overtaken By Events', - 'desc':'The review was abandoned because of circumstances', - 'used': True, - 'order':0 - }, - { 'slug':'no-response', - 'name':'No Response', - 'desc':'The reviewer did not provide a review by the deadline', - 'used': True, - 'order':0 - }, - { 'slug':'part-completed', - 'name':'Partially Completed', - 'desc':'The reviewer partially completed the assignment', - 'used': True, - 'order':0 - }, - { 'slug':'completed', - 'name':'Completed', - 'desc':'The reviewer completed the assignment', - 'used': True, - 'order':0 - }, - { 'slug':'unknown', - 'name':'Unknown', - 'desc':'The assignment is was imported from an earlier database and its state could not be computed', - 'used':'True', - 'order':0 - } - ] - - for entry in assignment_states: - name, created = ReviewAssignmentStateName.objects.get_or_create(slug=entry['slug']) - if created: - for k, v in entry.items(): - setattr(name, k, v) - name.save() - -def reverse(apps, schema_editor): - ReviewRequestStateName = apps.get_model('name','ReviewRequestStateName') - ReviewAssignmentStateName = apps.get_model('name','ReviewAssignmentStateName') - ReviewRequestStateName.objects.filter(slug__in=['accepted', 'rejected', 'no-response', 'part-completed', 'completed', 'unknown']).update(used=True) - ReviewRequestStateName.objects.filter(slug='assigned').update(used=False) - ReviewAssignmentStateName.objects.update(used=False) - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0005_reviewassignmentstatename'), - ('doc','0011_reviewassignmentdocevent'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0007_fix_m2m_slug_id_length.py b/ietf/name/migrations/0007_fix_m2m_slug_id_length.py deleted file mode 100644 index 578415bc5..000000000 --- a/ietf/name/migrations/0007_fix_m2m_slug_id_length.py +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0006_adjust_statenames'), - ] - - operations = [ - migrations.RunSQL("ALTER TABLE doc_ballottype_positions MODIFY ballotpositionname_id varchar(32);", ""), - migrations.RunSQL("ALTER TABLE doc_dochistory_tags MODIFY doctagname_id varchar(32);", ""), - migrations.RunSQL("ALTER TABLE group_group_unused_tags MODIFY doctagname_id varchar(32);", ""), - migrations.RunSQL("ALTER TABLE group_grouphistory_unused_tags MODIFY doctagname_id varchar(32);", ""), - ] diff --git a/ietf/name/migrations/0008_reviewerqueuepolicyname.py b/ietf/name/migrations/0008_reviewerqueuepolicyname.py deleted file mode 100644 index caee6384b..000000000 --- a/ietf/name/migrations/0008_reviewerqueuepolicyname.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.23 on 2019-11-18 08:35 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - def forward(apps, schema_editor): - ReviewerQueuePolicyName = apps.get_model('name', 'ReviewerQueuePolicyName') - ReviewerQueuePolicyName.objects.create(slug='RotateAlphabetically', name='Rotate alphabetically') - ReviewerQueuePolicyName.objects.create(slug='LeastRecentlyUsed', name='Least recently used') - - def reverse(self, apps): - pass - - dependencies = [ - ('name', '0007_fix_m2m_slug_id_length'), - ] - - operations = [ - migrations.CreateModel( - name='ReviewerQueuePolicyName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0009_add_verified_errata_to_doctagname.py b/ietf/name/migrations/0009_add_verified_errata_to_doctagname.py deleted file mode 100644 index 94c1134d6..000000000 --- a/ietf/name/migrations/0009_add_verified_errata_to_doctagname.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - -def forward(apps, schema_editor): - DocTagName = apps.get_model('name','DocTagName') - DocTagName.objects.get_or_create(slug='verified-errata', name='Has verified errata', desc='', used=True, order=0) - -def reverse(apps, schema_editor): - DocTagName = apps.get_model('name','DocTagName') - DocTagName.objects.filter(slug='verified-errata').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0008_reviewerqueuepolicyname'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0010_timerangename.py b/ietf/name/migrations/0010_timerangename.py deleted file mode 100644 index b6b17c9da..000000000 --- a/ietf/name/migrations/0010_timerangename.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-02-04 05:43 -from __future__ import unicode_literals - -from django.db import migrations, models - - -def forward(apps, schema_editor): - TimerangeName = apps.get_model('name', 'TimerangeName') - timeranges = [ - ('monday-morning', 'Monday morning'), - ('monday-afternoon-early', 'Monday early afternoon'), - ('monday-afternoon-late', 'Monday late afternoon'), - ('tuesday-morning', 'Tuesday morning'), - ('tuesday-afternoon-early', 'Tuesday early afternoon'), - ('tuesday-afternoon-late', 'Tuesday late afternoon'), - ('wednesday-morning', 'Wednesday morning'), - ('wednesday-afternoon-early', 'Wednesday early afternoon'), - ('wednesday-afternoon-late', 'Wednesday late afternoon'), - ('thursday-morning', 'Thursday morning'), - ('thursday-afternoon-early', 'Thursday early afternoon'), - ('thursday-afternoon-late', 'Thursday late afternoon'), - ('friday-morning', 'Friday morning'), - ('friday-afternoon-early', 'Friday early afternoon'), - ('friday-afternoon-late', 'Friday late afternoon'), - ] - for order, (slug, desc) in enumerate(timeranges): - TimerangeName.objects.create(slug=slug, name=slug, desc=desc, used=True, order=order) - - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0009_add_verified_errata_to_doctagname'), - ] - - operations = [ - migrations.CreateModel( - name='TimerangeName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0011_constraintname_editor_label.py b/ietf/name/migrations/0011_constraintname_editor_label.py deleted file mode 100644 index 0425785a4..000000000 --- a/ietf/name/migrations/0011_constraintname_editor_label.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0010_timerangename'), - ] - - def fill_in_editor_labels(apps, schema_editor): - ConstraintName = apps.get_model('name', 'ConstraintName') - for cn in ConstraintName.objects.all(): - cn.editor_label = { - 'conflict': "(1)", - 'conflic2': "(2)", - 'conflic3': "(3)", - 'bethere': "(person)", - }.get(cn.slug, cn.slug) - cn.save() - - def noop(apps, schema_editor): - pass - - operations = [ - migrations.AddField( - model_name='constraintname', - name='editor_label', - field=models.CharField(blank=True, help_text='Very short label for producing warnings inline in the sessions in the schedule editor.', max_length=32), - ), - migrations.RunPython(fill_in_editor_labels, noop, elidable=True), - ] diff --git a/ietf/name/migrations/0012_role_name_robots.py b/ietf/name/migrations/0012_role_name_robots.py deleted file mode 100644 index bc5c37980..000000000 --- a/ietf/name/migrations/0012_role_name_robots.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- - - -from django.db import migrations - -def forward(apps, schema_editor): - RoleName = apps.get_model('name','RoleName') - RoleName.objects.get_or_create(slug='robot', name='Automation Robot', desc='A role for API access by external scripts or entities, such as the mail archive, registrations system, etc.', used=True, order=0) - -def reverse(apps, schema_editor): - RoleName = apps.get_model('name','RoleName') - RoleName.objects.filter(slug='robot').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0011_constraintname_editor_label'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0013_add_auth48_docurltagname.py b/ietf/name/migrations/0013_add_auth48_docurltagname.py deleted file mode 100644 index 6bede736b..000000000 --- a/ietf/name/migrations/0013_add_auth48_docurltagname.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 2.0.13 on 2020-06-02 10:13 - -from django.db import migrations - -def forward(apps, schema_editor): - DocUrlTagName = apps.get_model('name', 'DocUrlTagName') - DocUrlTagName.objects.create( - slug='auth48', - name='RFC Editor Auth48 status', - used=True, - ) - -def reverse(apps, schema_editor): - DocUrlTagName = apps.get_model('name', 'DocUrlTagName') - auth48_tag = DocUrlTagName.objects.get(slug='auth48') - auth48_tag.delete() - -class Migration(migrations.Migration): - """Add DocUrlTagName entry for RFC Ed Auth48 URL""" - dependencies = [ - ('name', '0012_role_name_robots'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0014_extres.py b/ietf/name/migrations/0014_extres.py deleted file mode 100644 index 576a98ea3..000000000 --- a/ietf/name/migrations/0014_extres.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-03-19 13:56 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0013_add_auth48_docurltagname'), - ] - - operations = [ - migrations.CreateModel( - name='ExtResourceName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - migrations.CreateModel( - name='ExtResourceTypeName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - migrations.AddField( - model_name='extresourcename', - name='type', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceTypeName'), - ), - ] diff --git a/ietf/name/migrations/0015_populate_extres.py b/ietf/name/migrations/0015_populate_extres.py deleted file mode 100644 index 64a6bf08a..000000000 --- a/ietf/name/migrations/0015_populate_extres.py +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-03-19 11:42 -from __future__ import unicode_literals - -from collections import namedtuple - -from django.db import migrations - - -def forward(apps, schema_editor): - ExtResourceName = apps.get_model('name','ExtResourceName') - ExtResourceTypeName = apps.get_model('name','ExtResourceTypeName') - - ExtResourceTypeName.objects.create(slug='email', name="Email address", desc="Email address", used=True, order=0) - ExtResourceTypeName.objects.create(slug='url', name="URL", desc="URL", used=True, order=0) - ExtResourceTypeName.objects.create(slug='string', name="string", desc="string", used=True, order=0) - - resourcename = namedtuple('resourcename', ['slug', 'name', 'type']) - resourcenames= [ - resourcename("webpage", "Additional Web Page", "url"), - resourcename("faq", "Frequently Asked Questions", "url"), - resourcename("github_username","GitHub Username", "string"), - resourcename("github_org","GitHub Organization", "url"), - resourcename("github_repo","GitHub Repository", "url"), - resourcename("gitlab_username","GitLab Username", "string"), - resourcename("tracker","Issuer Tracker", "url"), - resourcename("slack","Slack Channel", "url"), - resourcename("wiki","Wiki", "url"), - resourcename("yc_entry","Yang Catalog Entry", "url"), - resourcename("yc_impact","Yang Impact Analysis", "url"), - resourcename("jabber_room","Jabber Room", "url"), - resourcename("jabber_log","Jabber Log", "url"), - resourcename("mailing_list","Mailing List", "url"), - resourcename("mailing_list_archive","Mailing List Archive","url"), - resourcename("repo","Other Repository", "url") - ] - - for name in resourcenames: - ExtResourceName.objects.create(slug=name.slug, name=name.name, desc=name.name, used=True, order=0, type_id=name.type) - - - -def reverse(apps, schema_editor): - ExtResourceName = apps.get_model('name','ExtResourceName') - ExtResourceTypeName = apps.get_model('name','ExtResourceTypeName') - - ExtResourceName.objects.all().delete() - ExtResourceTypeName.objects.all().delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0014_extres'), - ('group', '0033_extres'), - ('doc', '0034_extres'), - ('person', '0015_extres'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0016_add_research_area_groups.py b/ietf/name/migrations/0016_add_research_area_groups.py deleted file mode 100644 index 79ab86d40..000000000 --- a/ietf/name/migrations/0016_add_research_area_groups.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 2.2.14 on 2020-07-28 09:29 - -from django.db import migrations - -def forward(apps, schema_editor): - GroupTypeName = apps.get_model('name','GroupTypeName') - GroupTypeName.objects.create( - slug = 'rag', - name = 'RAG', - desc = 'Research Area Group', - used = True, - order = 0, - verbose_name='Research Area Group' - ) - -def reverse(apps, schema_editor): - GroupTypeName = apps.get_model('name','GroupTypeName') - GroupTypeName.objects.filter(slug='rag').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0015_populate_extres'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - ] diff --git a/ietf/name/migrations/0017_update_constraintname_order_and_label.py b/ietf/name/migrations/0017_update_constraintname_order_and_label.py deleted file mode 100644 index 3b552baf6..000000000 --- a/ietf/name/migrations/0017_update_constraintname_order_and_label.py +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ('name', '0016_add_research_area_groups'), - ] - - def update_editor_labels(apps, schema_editor): - ConstraintName = apps.get_model('name', 'ConstraintName') - for cn in ConstraintName.objects.all(): - cn.editor_label = { - 'bethere': "{count}", - 'wg_adjacent': "", - 'conflict': "1", - 'conflic2': "2", - 'conflic3': "3", - 'time_relation': "Δ", - 'timerange': "", - }.get(cn.slug, cn.editor_label) - - cn.order = { - 'conflict': 1, - 'conflic2': 2, - 'conflic3': 3, - 'bethere': 4, - 'timerange': 5, - 'time_relation': 6, - 'wg_adjacent': 7, - }.get(cn.slug, cn.order) - - cn.save() - - def noop(apps, schema_editor): - pass - - operations = [ - migrations.AlterField( - model_name='constraintname', - name='editor_label', - field=models.CharField(blank=True, help_text='Very short label for producing warnings inline in the sessions in the schedule editor.', max_length=64), - ), - migrations.RunPython(update_editor_labels, noop, elidable=True), - ] diff --git a/ietf/name/migrations/0018_slidesubmissionstatusname.py b/ietf/name/migrations/0018_slidesubmissionstatusname.py deleted file mode 100644 index b0f1e18e4..000000000 --- a/ietf/name/migrations/0018_slidesubmissionstatusname.py +++ /dev/null @@ -1,42 +0,0 @@ -# Generated by Django 2.2.14 on 2020-08-03 11:53 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0017_update_constraintname_order_and_label'), - ] - - def forward(apps, schema_editor): - SlideSubmissionStatusName = apps.get_model('name', 'SlideSubmissionStatusName') - slide_submission_status_names = [ - ('pending', 'Pending'), - ('approved', 'Approved'), - ('rejected', 'Rejected'), - ] - for order, (slug, desc) in enumerate(slide_submission_status_names): - SlideSubmissionStatusName.objects.create(slug=slug, name=slug, desc=desc, used=True, order=order) - - - def reverse(apps, schema_editor): - pass - - operations = [ - migrations.CreateModel( - name='SlideSubmissionStatusName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0019_add_timeslottypename_private.py b/ietf/name/migrations/0019_add_timeslottypename_private.py deleted file mode 100644 index f515769aa..000000000 --- a/ietf/name/migrations/0019_add_timeslottypename_private.py +++ /dev/null @@ -1,26 +0,0 @@ -# Generated by Django 2.2.15 on 2020-08-20 02:40 - -from django.db import migrations, models - -def set_private_bit_on_timeslottypename(apps, schema_editor): - TimeSlotTypeName = apps.get_model('name', 'TimeSlotTypeName') - - TimeSlotTypeName.objects.filter(slug__in=['lead', 'offagenda']).update(private=True) - -def noop(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0018_slidesubmissionstatusname'), - ] - - operations = [ - migrations.AddField( - model_name='timeslottypename', - name='private', - field=models.BooleanField(default=False, help_text='Whether sessions of this type should be kept off the public agenda'), - ), - migrations.RunPython(set_private_bit_on_timeslottypename, noop), - ] diff --git a/ietf/name/migrations/0020_add_rescheduled_session_name.py b/ietf/name/migrations/0020_add_rescheduled_session_name.py deleted file mode 100644 index d86c5237f..000000000 --- a/ietf/name/migrations/0020_add_rescheduled_session_name.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0019_add_timeslottypename_private'), - ] - - def add_rescheduled_session_status_name(apps, schema_editor): - SessionStatusName = apps.get_model('name', 'SessionStatusName') - SessionStatusName.objects.get_or_create( - slug='resched', - name="Rescheduled", - ) - - def noop(apps, schema_editor): - pass - - operations = [ - migrations.RunPython(add_rescheduled_session_status_name, noop, elidable=True), - ] diff --git a/ietf/name/migrations/0021_add_ad_appr_draftsubmissionstatename.py b/ietf/name/migrations/0021_add_ad_appr_draftsubmissionstatename.py deleted file mode 100644 index 825c93e6a..000000000 --- a/ietf/name/migrations/0021_add_ad_appr_draftsubmissionstatename.py +++ /dev/null @@ -1,70 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-18 07:41 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0020_add_rescheduled_session_name'), - ] - - def up(apps, schema_editor): - DraftSubmissionStateName = apps.get_model('name', 'DraftSubmissionStateName') - new_state_name = DraftSubmissionStateName.objects.create( - slug='ad-appr', - name='Awaiting AD Approval', - used=True, - ) - new_state_name.next_states.add(DraftSubmissionStateName.objects.get(slug='posted')) - new_state_name.next_states.add(DraftSubmissionStateName.objects.get(slug='cancel')) - DraftSubmissionStateName.objects.get(slug='uploaded').next_states.add(new_state_name) - - # Order so the '-appr' states are together - for slug, order in ( - ('confirmed', 0), - ('uploaded', 1), - ('auth', 2), - ('aut-appr', 3), - ('grp-appr', 4), - ('ad-appr', 5), - ('manual', 6), - ('cancel', 7), - ('posted', 8), - ('waiting-for-draft', 9), - ): - state_name = DraftSubmissionStateName.objects.get(slug=slug) - state_name.order = order - state_name.save() - - def down(apps, schema_editor): - DraftSubmissionStateName = apps.get_model('name', 'DraftSubmissionStateName') - Submission = apps.get_model('submit', 'Submission') - - name_to_delete = DraftSubmissionStateName.objects.get(slug='ad-appr') - - # Refuse to migrate if there are any Submissions using the state we're about to remove - assert(Submission.objects.filter(state=name_to_delete).count() == 0) - - DraftSubmissionStateName.objects.get(slug='uploaded').next_states.remove(name_to_delete) - name_to_delete.delete() - - # restore original order - for slug, order in ( - ('confirmed', 0), - ('uploaded', 1), - ('auth', 2), - ('aut-appr', 3), - ('grp-appr', 4), - ('manual', 5), - ('cancel', 6), - ('posted', 7), - ('waiting-for-draft', 8), - ): - state_name = DraftSubmissionStateName.objects.get(slug=slug) - state_name.order = order - state_name.save() - - operations = [ - migrations.RunPython(up, down), - ] diff --git a/ietf/name/migrations/0022_add_liaison_contact_rolenames.py b/ietf/name/migrations/0022_add_liaison_contact_rolenames.py deleted file mode 100644 index e5edb2399..000000000 --- a/ietf/name/migrations/0022_add_liaison_contact_rolenames.py +++ /dev/null @@ -1,41 +0,0 @@ -# Generated by Django 2.2.17 on 2020-12-09 07:02 - -from django.db import migrations - - -def forward(apps, schema_editor): - """Perform forward migration - - Adds RoleNames for liaison contacts - """ - RoleName = apps.get_model('name', 'RoleName') - RoleName.objects.create( - slug='liaison_contact', - name='Liaison Contact', - ) - RoleName.objects.create( - slug='liaison_cc_contact', - name='Liaison CC Contact', - ) - - -def reverse(apps, schema_editor): - """Perform reverse migration - - Removes RoleNames for liaison contacts - """ - RoleName = apps.get_model('name', 'RoleName') - RoleName.objects.filter( - slug__in=['liaison_contact', 'liaison_cc_contact'] - ).delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0021_add_ad_appr_draftsubmissionstatename'), - ('group', '0040_lengthen_used_roles_fields'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0023_change_stream_descriptions.py b/ietf/name/migrations/0023_change_stream_descriptions.py deleted file mode 100644 index e6e578e22..000000000 --- a/ietf/name/migrations/0023_change_stream_descriptions.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright The IETF Trust 2019-2021, All Rights Reserved -# -*- coding: utf-8 -*- - -from django.db import migrations - - -def forward(apps, schema_editor): - # Change the StreamName descriptions to match what appears in modern RFCs - StreamName = apps.get_model('name', 'StreamName') - for streamName in StreamName.objects.all(): - if streamName.name == "IETF": - streamName.desc = "Internent Engineering Task Force (IETF)" - elif streamName.name == "IRTF": - streamName.desc = "Internet Research Task Force (IRTF)" - elif streamName.name == "IAB": - streamName.desc = "Internet Architecture Board (IAB)" - elif streamName.name == "ISE": - streamName.desc = "Independent Submission" - streamName.save() - - -def reverse(apps, schema_editor): - StreamName = apps.get_model('name', 'StreamName') - for streamName in StreamName.objects.all(): - if streamName.name == "IETF": - streamName.desc = "IETF stream" - elif streamName.name == "IRTF": - streamName.desc = "IRTF Stream" - elif streamName.name == "IAB": - streamName.desc = "IAB stream" - elif streamName.name == "ISE": - streamName.desc = "Independent Submission Editor stream" - streamName.save() - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0022_add_liaison_contact_rolenames'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - - ] - diff --git a/ietf/name/migrations/0024_constraintname_is_group_conflict.py b/ietf/name/migrations/0024_constraintname_is_group_conflict.py deleted file mode 100644 index 47810c6da..000000000 --- a/ietf/name/migrations/0024_constraintname_is_group_conflict.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-19 09:45 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ('name', '0023_change_stream_descriptions'), - ] - - operations = [ - migrations.AddField( - model_name='constraintname', - name='is_group_conflict', - field=models.BooleanField(default=False, - help_text='Does this constraint capture a conflict between groups?'), - ), - ] diff --git a/ietf/name/migrations/0025_set_constraintname_is_group_conflict.py b/ietf/name/migrations/0025_set_constraintname_is_group_conflict.py deleted file mode 100644 index 86deb9bd2..000000000 --- a/ietf/name/migrations/0025_set_constraintname_is_group_conflict.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-19 09:55 - -from django.db import migrations - - -def forward(apps, schema_editor): - """Set is_group_conflict for ConstraintNames that need it to be True""" - ConstraintName = apps.get_model('name', 'ConstraintName') - ConstraintName.objects.filter( - slug__in=['conflict', 'conflic2', 'conflic3'] - ).update(is_group_conflict=True) - - -def reverse(apps, schema_editor): - pass # nothing to be done - - -class Migration(migrations.Migration): - dependencies = [ - ('name', '0024_constraintname_is_group_conflict'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0026_add_conflict_constraintnames.py b/ietf/name/migrations/0026_add_conflict_constraintnames.py deleted file mode 100644 index d404e2cf3..000000000 --- a/ietf/name/migrations/0026_add_conflict_constraintnames.py +++ /dev/null @@ -1,75 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-05 10:05 - -from collections import namedtuple -from django.db import migrations -from django.db.models import Max - - -# Simple type for representing constraint name data that will be -# modified. -ConstraintInfo = namedtuple( - 'ConstraintInfo', - ['replaces', 'slug', 'name', 'desc', 'editor_label'], -) - -constraint_names_to_add = [ - ConstraintInfo( - replaces='conflict', - slug='chair_conflict', - name='Chair conflict', - desc='Indicates other WGs the chairs also lead or will be active participants in', - editor_label='', - ), - ConstraintInfo( - replaces='conflic2', - slug='tech_overlap', - name='Technology overlap', - desc='Indicates WGs with a related technology or a closely related charter', - editor_label='', - ), - ConstraintInfo( - replaces='conflic3', - slug='key_participant', - name='Key participant conflict', - desc='Indicates WGs with which key participants (presenter, secretary, etc.) may overlap', - editor_label='', - ) -] - - -def forward(apps, schema_editor): - ConstraintName = apps.get_model('name', 'ConstraintName') - max_order = ConstraintName.objects.all().aggregate(Max('order'))['order__max'] - - for index, new_constraint in enumerate(constraint_names_to_add): - # hack_constraint is the constraint type relabeled by the hack fix in #2754 - hack_constraint = ConstraintName.objects.get(slug=new_constraint.replaces) - ConstraintName.objects.create( - slug=new_constraint.slug, - name=new_constraint.name, - desc=new_constraint.desc, - used=hack_constraint.used, - order=max_order + index + 1, - penalty=hack_constraint.penalty, - editor_label=new_constraint.editor_label, - is_group_conflict=True, - ) - - -def reverse(apps, schema_editor): - ConstraintName = apps.get_model('name', 'ConstraintName') - for new_constraint in constraint_names_to_add: - ConstraintName.objects.filter(slug=new_constraint.slug).delete() - -class Migration(migrations.Migration): - dependencies = [ - ('name', '0025_set_constraintname_is_group_conflict'), - # Reversing this migration requires that the 'day' field be removed from - # the Constraint model, so we indirectly depend on the migration that - # removed it. - ('meeting', '0027_add_constraint_options_and_joint_groups'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] \ No newline at end of file diff --git a/ietf/name/migrations/0027_add_bofrequest.py b/ietf/name/migrations/0027_add_bofrequest.py deleted file mode 100644 index c4e31bb2d..000000000 --- a/ietf/name/migrations/0027_add_bofrequest.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.23 on 2021-05-21 12:48 - -from django.db import migrations - -def forward(apps,schema_editor): - DocTypeName = apps.get_model('name','DocTypeName') - DocTypeName.objects.create(prefix='bofreq', slug='bofreq', name="BOF Request", desc="", used=True, order=0) - -def reverse(apps,schema_editor): - DocTypeName = apps.get_model('name','DocTypeName') - DocTypeName.objects.filter(slug='bofreq').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0026_add_conflict_constraintnames'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0028_iabasg.py b/ietf/name/migrations/0028_iabasg.py deleted file mode 100644 index f339341ea..000000000 --- a/ietf/name/migrations/0028_iabasg.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - GroupTypeName = apps.get_model('name', 'GroupTypeName') - GroupTypeName.objects.create(slug='iabasg', name='IAB ASG', verbose_name='IAB Administrative Support Group', desc='') - -def reverse(apps, schema_editor): - GroupTypeName = apps.get_model('name', 'GroupTypeName') - GroupTypeName.objects.filter(slug='iabasg').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0027_add_bofrequest'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0029_proceedingsmaterialtypename.py b/ietf/name/migrations/0029_proceedingsmaterialtypename.py deleted file mode 100644 index 97606c17b..000000000 --- a/ietf/name/migrations/0029_proceedingsmaterialtypename.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.24 on 2021-07-26 16:42 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0028_iabasg'), - ] - - operations = [ - migrations.CreateModel( - name='ProceedingsMaterialTypeName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - ] diff --git a/ietf/name/migrations/0030_populate_proceedingsmaterialtypename.py b/ietf/name/migrations/0030_populate_proceedingsmaterialtypename.py deleted file mode 100644 index 3e3936a50..000000000 --- a/ietf/name/migrations/0030_populate_proceedingsmaterialtypename.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.24 on 2021-07-26 16:55 - -from django.db import migrations - - -def forward(apps, schema_editor): - ProceedingsMaterialTypeName = apps.get_model('name', 'ProceedingsMaterialTypeName') - names = [ - {'slug': 'supporters', 'name': 'Sponsors and Supporters', 'desc': 'Sponsors and supporters', 'order': 0}, - {'slug': 'host_speaker_series', 'name': 'Host Speaker Series', 'desc': 'Host speaker series', 'order': 1}, - {'slug': 'social_event', 'name': 'Social Event', 'desc': 'Social event', 'order': 2}, - {'slug': 'wiki', 'name': 'Meeting Wiki', 'desc': 'Meeting wiki', 'order': 3}, - {'slug': 'additional_information', 'name': 'Additional Information', 'desc': 'Any other materials', 'order': 4}, - ] - for name in names: - ProceedingsMaterialTypeName.objects.create(used=True, **name) - - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0029_proceedingsmaterialtypename'), - ('meeting', '0046_meetinghost'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0031_add_procmaterials.py b/ietf/name/migrations/0031_add_procmaterials.py deleted file mode 100644 index 3ceb575a9..000000000 --- a/ietf/name/migrations/0031_add_procmaterials.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.24 on 2021-07-27 08:04 - -from django.db import migrations - - -def forward(apps, schema_editor): - DocTypeName = apps.get_model('name', 'DocTypeName') - DocTypeName.objects.create( - prefix='proc-materials', - slug='procmaterials', - name="Proceedings Materials", - desc="", - used=True, - order=0 - ) - - -def reverse(apps, schema_editor): - DocTypeName = apps.get_model('name', 'DocTypeName') - DocTypeName.objects.filter(slug='procmaterials').delete() - - -class Migration(migrations.Migration): - # Most of these dependencies are needed to permit the reverse migration - # to work. Without them Django does not replay enough migrations and during - # migration believes that there are foreign key references to the old - # PK (name) on the Document model. - dependencies = [ - ('doc', '0043_bofreq_docevents'), - ('group', '0044_populate_groupfeatures_parent_type_fields'), - ('liaisons', '0006_document_primary_key_cleanup'), - ('meeting', '0018_document_primary_key_cleanup'), - ('name', '0030_populate_proceedingsmaterialtypename'), - ('review', '0014_document_primary_key_cleanup'), - ('submit', '0008_submissionextresource'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0032_agendafiltertypename.py b/ietf/name/migrations/0032_agendafiltertypename.py deleted file mode 100644 index 6c6fa4eab..000000000 --- a/ietf/name/migrations/0032_agendafiltertypename.py +++ /dev/null @@ -1,27 +0,0 @@ -# Generated by Django 2.2.19 on 2021-04-02 12:03 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0031_add_procmaterials'), - ] - - operations = [ - migrations.CreateModel( - name='AgendaFilterTypeName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - ] diff --git a/ietf/name/migrations/0033_populate_agendafiltertypename.py b/ietf/name/migrations/0033_populate_agendafiltertypename.py deleted file mode 100644 index 9f450ca24..000000000 --- a/ietf/name/migrations/0033_populate_agendafiltertypename.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 2.2.20 on 2021-04-20 13:56 - -from django.db import migrations - - -def forward(apps, schema_editor): - AgendaFilterTypeName = apps.get_model('name', 'AgendaFilterTypeName') - names = ( - ('none', 'None', 'Not used except for a timeslot-type column (e.g., officehours)'), - ('normal', 'Normal', 'Non-heading filter button'), - ('heading', 'Heading', 'Column heading button'), - ('special', 'Special', 'Button in the catch-all column'), - ) - for order, (slug, name, desc) in enumerate(names): - AgendaFilterTypeName.objects.get_or_create( - slug=slug, - defaults=dict(name=name, desc=desc, order=order, used=True) - ) - - -def reverse(apps, schema_editor): - pass # nothing to do, model about to be destroyed anyway - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0032_agendafiltertypename'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0034_sessionpurposename.py b/ietf/name/migrations/0034_sessionpurposename.py deleted file mode 100644 index ca22e1a15..000000000 --- a/ietf/name/migrations/0034_sessionpurposename.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.24 on 2021-09-16 09:42 - -from django.db import migrations, models -import ietf.name.models -import jsonfield - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0033_populate_agendafiltertypename'), - ] - - operations = [ - migrations.CreateModel( - name='SessionPurposeName', - fields=[ - ('slug', models.CharField(max_length=32, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=255)), - ('desc', models.TextField(blank=True)), - ('used', models.BooleanField(default=True)), - ('order', models.IntegerField(default=0)), - ('timeslot_types', jsonfield.fields.JSONField(default=[], help_text='Allowed TimeSlotTypeNames', max_length=256, validators=[ietf.name.models.JSONForeignKeyListValidator('name.TimeSlotTypeName')])), - ('on_agenda', models.BooleanField(default=True, help_text='Are sessions of this purpose visible on the agenda by default?')), - ], - options={ - 'ordering': ['order', 'name'], - 'abstract': False, - }, - ), - ] diff --git a/ietf/name/migrations/0035_populate_sessionpurposename.py b/ietf/name/migrations/0035_populate_sessionpurposename.py deleted file mode 100644 index 8af7d60d1..000000000 --- a/ietf/name/migrations/0035_populate_sessionpurposename.py +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved - -# Generated by Django 2.2.24 on 2021-09-16 09:42 - -from django.db import migrations - - -def forward(apps, schema_editor): - SessionPurposeName = apps.get_model('name', 'SessionPurposeName') - TimeSlotTypeName = apps.get_model('name', 'TimeSlotTypeName') - - for order, (slug, name, desc, tstypes, on_agenda, used) in enumerate(( - ('none', 'None', 'Value not set (do not use for new sessions)', [], True, False), - ('regular', 'Regular', 'Regular group session', ['regular'], True, True), - ('tutorial', 'Tutorial', 'Tutorial or training session', ['other'], True, True), - ('officehours', 'Office hours', 'Office hours session', ['other'], True, True), - ('coding', 'Coding', 'Coding session', ['other'], True, True), - ('admin', 'Administrative', 'Meeting administration', ['other', 'reg'], True, True), - ('social', 'Social', 'Social event or activity', ['break', 'other'], True, True), - ('plenary', 'Plenary', 'Plenary session', ['plenary'], True, True), - ('presentation', 'Presentation', 'Presentation session', ['other', 'regular'], True, True), - ('open_meeting', 'Open meeting', 'Open meeting', ['other'], True, True), - ('closed_meeting', 'Closed meeting', 'Closed meeting', ['other', 'regular'], False, True), - )): - # verify that we're not about to use an invalid type - for ts_type in tstypes: - TimeSlotTypeName.objects.get(pk=ts_type) # throws an exception unless exists - - SessionPurposeName.objects.create( - slug=slug, - name=name, - desc=desc, - used=used, - order=order, - timeslot_types = tstypes, - on_agenda=on_agenda, - ) - - -def reverse(apps, schema_editor): - SessionPurposeName = apps.get_model('name', 'SessionPurposeName') - SessionPurposeName.objects.all().delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0034_sessionpurposename'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0036_depopulate_timeslottypename_private.py b/ietf/name/migrations/0036_depopulate_timeslottypename_private.py deleted file mode 100644 index 352ab8d58..000000000 --- a/ietf/name/migrations/0036_depopulate_timeslottypename_private.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 2.2.24 on 2021-10-25 16:58 - -from django.db import migrations - - -PRIVATE_TIMESLOT_SLUGS = {'lead', 'offagenda'} # from DB 2021 Oct - - -def forward(apps, schema_editor): - TimeSlotTypeName = apps.get_model('name', 'TimeSlotTypeName') - slugs = TimeSlotTypeName.objects.filter(private=True).values_list('slug', flat=True) - if set(slugs) != PRIVATE_TIMESLOT_SLUGS: - # the reverse migration will not restore the database, refuse to migrate - raise ValueError('Disagreement between migration data and database') - - -def reverse(apps, schema_editor): - TimeSlotTypeName = apps.get_model('name', 'TimeSlotTypeName') - TimeSlotTypeName.objects.filter(slug__in=PRIVATE_TIMESLOT_SLUGS).update(private=True) - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0035_populate_sessionpurposename'), - ('meeting', '0051_populate_session_on_agenda'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0037_remove_timeslottypename_private.py b/ietf/name/migrations/0037_remove_timeslottypename_private.py deleted file mode 100644 index 2a8678056..000000000 --- a/ietf/name/migrations/0037_remove_timeslottypename_private.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.24 on 2021-10-25 17:23 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0036_depopulate_timeslottypename_private'), - ] - - operations = [ - migrations.RemoveField( - model_name='timeslottypename', - name='private', - ), - ] diff --git a/ietf/name/migrations/0038_disuse_offagenda_and_reserved.py b/ietf/name/migrations/0038_disuse_offagenda_and_reserved.py deleted file mode 100644 index be0b507bd..000000000 --- a/ietf/name/migrations/0038_disuse_offagenda_and_reserved.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.2.24 on 2021-10-29 06:44 - -from django.db import migrations - - -def forward(apps, schema_editor): - TimeSlotTypeName = apps.get_model('name', 'TimeSlotTypeName') - TimeSlotTypeName.objects.filter(slug__in=('offagenda', 'reserved')).update(used=False) - - -def reverse(apps, schema_editor): - TimeSlotTypeName = apps.get_model('name', 'TimeSlotTypeName') - TimeSlotTypeName.objects.filter(slug__in=('offagenda', 'reserved')).update(used=True) - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0037_remove_timeslottypename_private'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0039_depopulate_constraintname_editor_label.py b/ietf/name/migrations/0039_depopulate_constraintname_editor_label.py deleted file mode 100644 index 9949002be..000000000 --- a/ietf/name/migrations/0039_depopulate_constraintname_editor_label.py +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by Django 2.2.27 on 2022-03-11 07:55 - -from django.db import migrations - - -def forward(apps, schema_editor): - pass # nothing to do, row will be dropped - - -def reverse(apps, schema_editor): - # Restore data from when this migration was written. Dumped with: - # >>> from pprint import pp - # >>> from ietf.name.models import ConstraintName - # >>> pp(list(ConstraintName.objects.values_list('slug', 'editor_label'))) - ConstraintName = apps.get_model('name', 'ConstraintName') - for slug, editor_label in [ - ('conflict', '1'), - ('conflic2', '2'), - ('conflic3', '3'), - ('bethere', '{count}'), - ('timerange', ''), - ('time_relation', 'Δ'), - ('wg_adjacent', ''), - ('chair_conflict', ''), - ('tech_overlap', ''), - ('key_participant', ''), - ]: - ConstraintName.objects.filter(slug=slug).update(editor_label=editor_label) - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0038_disuse_offagenda_and_reserved'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0040_remove_constraintname_editor_label.py b/ietf/name/migrations/0040_remove_constraintname_editor_label.py deleted file mode 100644 index 85390c77a..000000000 --- a/ietf/name/migrations/0040_remove_constraintname_editor_label.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.27 on 2022-03-11 10:05 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0039_depopulate_constraintname_editor_label'), - ] - - operations = [ - migrations.RemoveField( - model_name='constraintname', - name='editor_label', - ), - ] diff --git a/ietf/name/migrations/0041_update_rfcedtyp.py b/ietf/name/migrations/0041_update_rfcedtyp.py deleted file mode 100644 index 8ebae6aa1..000000000 --- a/ietf/name/migrations/0041_update_rfcedtyp.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2022 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - GroupTypeName = apps.get_model('name', 'GroupTypeName') - GroupTypeName.objects.filter(slug='rfcedtyp').update(order=2, verbose_name='RFC Editor Group') - -def reverse(apps, schema_editor): - GroupTypeName = apps.get_model('name', 'GroupTypeName') - GroupTypeName.objects.filter(slug='rfcedtyp').update(order=0, verbose_name='The RFC Editor') - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0040_remove_constraintname_editor_label'), - ] - - operations = [ - migrations.RunPython(forward,reverse), - ] diff --git a/ietf/name/migrations/0042_editorial_stream.py b/ietf/name/migrations/0042_editorial_stream.py deleted file mode 100644 index 1b9aaaf07..000000000 --- a/ietf/name/migrations/0042_editorial_stream.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright The IETF Trust 2022 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - StreamName = apps.get_model('name', 'StreamName') - StreamName.objects.create( - slug = 'editorial', - name = 'Editorial', - desc = 'Editorial', - used = True, - order = 5, - ) - StreamName.objects.filter(slug='legacy').update(order=6) - - -def reverse(apps, schema_editor): - StreamName = apps.get_model('name', 'StreamName') - StreamName.objects.filter(slug='editorial').delete() - StreamName.objects.filter(slug='legacy').update(order=5) - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0041_update_rfcedtyp'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0043_editorial_stream_grouptype.py b/ietf/name/migrations/0043_editorial_stream_grouptype.py deleted file mode 100644 index 5fe839174..000000000 --- a/ietf/name/migrations/0043_editorial_stream_grouptype.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2022 All Rights Reserved - -from django.db import migrations - -def forward(apps, schema_editor): - GroupTypeName = apps.get_model('name', 'GroupTypeName') - GroupTypeName.objects.create( - slug = 'editorial', - name = 'Editorial', - desc = 'Editorial Stream Group', - used = True, - ) - -def reverse(apps, schema_editor): - GroupTypeName = apps.get_model('name', 'GroupTypeName') - GroupTypeName.objects.filter(slug='editorial').delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0042_editorial_stream'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/name/migrations/0044_validating_draftsubmissionstatename.py b/ietf/name/migrations/0044_validating_draftsubmissionstatename.py deleted file mode 100644 index de82bbeef..000000000 --- a/ietf/name/migrations/0044_validating_draftsubmissionstatename.py +++ /dev/null @@ -1,40 +0,0 @@ -# Generated by Django 2.2.28 on 2022-05-17 11:35 - -from django.db import migrations - - -def forward(apps, schema_editor): - DraftSubmissionStateName = apps.get_model('name', 'DraftSubmissionStateName') - new_state = DraftSubmissionStateName.objects.create( - slug='validating', - name='Validating Submitted Draft', - desc='Running validation checks on received submission', - used=True, - order=1 + DraftSubmissionStateName.objects.order_by('-order').first().order, - ) - new_state.next_states.set( - DraftSubmissionStateName.objects.filter( - slug__in=['cancel', 'uploaded'], - ) - ) - - -def reverse(apps, schema_editor): - Submission = apps.get_model('submit', 'Submission') - # Any submissions in the state we are about to delete would be deleted. - # Remove these manually if you really mean to do this. - assert Submission.objects.filter(state__slug='validating').count() == 0 - DraftSubmissionStateName = apps.get_model('name', 'DraftSubmissionStateName') - DraftSubmissionStateName.objects.filter(slug='validating').delete() - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0043_editorial_stream_grouptype'), - ('submit', '0001_initial'), # ensure Submission model exists - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/name/migrations/0045_polls_and_chatlogs.py b/ietf/name/migrations/0045_polls_and_chatlogs.py deleted file mode 100644 index 1014a9dce..000000000 --- a/ietf/name/migrations/0045_polls_and_chatlogs.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved -from django.db import migrations - -def forward(apps, schema_editor): - DocTypeName = apps.get_model("name", "DocTypeName") - DocTypeName.objects.create( - slug = "chatlog", - name = "Chat Log", - prefix = "chatlog", - desc = "", - order = 0, - used = True, - ) - DocTypeName.objects.create( - slug = "polls", - name = "Polls", - prefix = "polls", - desc = "", - order = 0, - used = True, - ) - -def reverse(apps, schema_editor): - DocTypeName = apps.get_model("name", "DocTypeName") - DocTypeName.objects.filter(slug__in=("chatlog", "polls")).delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0044_validating_draftsubmissionstatename'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/nomcom/migrations/0001_initial.py b/ietf/nomcom/migrations/0001_initial.py index 9ef8e5476..81eaabc60 100644 --- a/ietf/nomcom/migrations/0001_initial.py +++ b/ietf/nomcom/migrations/0001_initial.py @@ -1,12 +1,8 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.conf import settings from django.db import migrations, models import django.db.models.deletion -import ietf.nomcom.fields import ietf.nomcom.models import ietf.utils.models import ietf.utils.storage @@ -17,11 +13,11 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('group', '0001_initial'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('dbtemplate', '0001_initial'), ('name', '0001_initial'), ('person', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('group', '0001_initial'), ] operations = [ @@ -31,20 +27,13 @@ class Migration(migrations.Migration): ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('author', models.EmailField(blank=True, max_length=254, verbose_name='Author')), ('subject', models.TextField(blank=True, verbose_name='Subject')), - ('comments', ietf.nomcom.fields.EncryptedTextField(verbose_name='Comments')), + ('comments', models.BinaryField(verbose_name='Comments')), ('time', models.DateTimeField(auto_now_add=True)), ], options={ 'ordering': ['time'], }, ), - migrations.CreateModel( - name='FeedbackLastSeen', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(auto_now=True)), - ], - ), migrations.CreateModel( name='NomCom', fields=[ @@ -54,6 +43,9 @@ class Migration(migrations.Migration): ('reminder_interval', models.PositiveIntegerField(blank=True, help_text='If the nomcom user sets the interval field then a cron command will send reminders to the nominees who have not responded using the following formula: (today - nomination_date) % interval == 0.', null=True)), ('initial_text', models.TextField(blank=True, verbose_name='Help text for nomination form')), ('show_nominee_pictures', models.BooleanField(default=True, help_text='Display pictures of each nominee (if available) on the feedback pages', verbose_name='Show nominee pictures')), + ('show_accepted_nominees', models.BooleanField(default=True, help_text='Show accepted nominees on the public nomination page', verbose_name='Show accepted nominees')), + ('is_accepting_volunteers', models.BooleanField(default=False, help_text='Is this nomcom currently accepting volunteers?', verbose_name='Accepting volunteers')), + ('first_call_for_volunteers', models.DateField(blank=True, null=True, verbose_name='Date of the first call for volunteers')), ('group', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), ], options={ @@ -61,6 +53,102 @@ class Migration(migrations.Migration): 'verbose_name_plural': 'NomComs', }, ), + migrations.CreateModel( + name='Nominee', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('duplicated', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='nomcom.Nominee')), + ('email', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Email')), + ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), + ], + options={ + 'verbose_name_plural': 'Nominees', + 'ordering': ['-nomcom__group__acronym', 'person__name'], + }, + ), + migrations.CreateModel( + name='Topic', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('subject', models.CharField(help_text='This short description will appear on the Feedback pages.', max_length=255, verbose_name='Name')), + ('accepting_feedback', models.BooleanField(default=False, verbose_name='Is accepting feedback')), + ('audience', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.TopicAudienceName', verbose_name='Who can provide feedback (intended audience)')), + ('description', ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='description', to='dbtemplate.DBTemplate')), + ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), + ], + options={ + 'verbose_name_plural': 'Topics', + }, + ), + migrations.CreateModel( + name='Volunteer', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('affiliation', models.CharField(blank=True, max_length=255)), + ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), + ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + ), + migrations.CreateModel( + name='TopicFeedbackLastSeen', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time', models.DateTimeField(auto_now=True)), + ('reviewer', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('topic', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Topic')), + ], + ), + migrations.CreateModel( + name='ReminderDates', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('date', models.DateField()), + ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), + ], + ), + migrations.CreateModel( + name='Position', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(help_text='This short description will appear on the Nomination and Feedback pages. Be as descriptive as necessary. Past examples: "Transport AD", "IAB Member"', max_length=255, verbose_name='Name')), + ('is_open', models.BooleanField(default=False, help_text='Set is_open when the nomcom is working on a position. Clear it when an appointment is confirmed.', verbose_name='Is open')), + ('accepting_nominations', models.BooleanField(default=False, verbose_name='Is accepting nominations')), + ('accepting_feedback', models.BooleanField(default=False, verbose_name='Is accepting feedback')), + ('is_iesg_position', models.BooleanField(default=False, verbose_name='Is IESG Position')), + ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), + ('questionnaire', ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='questionnaire', to='dbtemplate.DBTemplate')), + ('requirement', ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='requirement', to='dbtemplate.DBTemplate')), + ], + options={ + 'verbose_name_plural': 'Positions', + }, + ), + migrations.CreateModel( + name='NomineePosition', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time', models.DateTimeField(auto_now_add=True)), + ('nominee', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Nominee')), + ('position', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Position')), + ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.NomineePositionStateName')), + ], + options={ + 'verbose_name': 'Nominee position', + 'verbose_name_plural': 'Nominee positions', + 'ordering': ['nominee'], + 'unique_together': {('position', 'nominee')}, + }, + ), + migrations.AddField( + model_name='nominee', + name='nominee_position', + field=models.ManyToManyField(through='nomcom.NomineePosition', to='nomcom.Position'), + ), + migrations.AddField( + model_name='nominee', + name='person', + field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + ), migrations.CreateModel( name='Nomination', fields=[ @@ -72,129 +160,23 @@ class Migration(migrations.Migration): ('time', models.DateTimeField(auto_now_add=True)), ('share_nominator', models.BooleanField(default=False, help_text='Check this box to allow the NomCom to let the person you are nominating know that you were one of the people who nominated them. If you do not check this box, your name will be confidential and known only within NomCom.', verbose_name='Share nominator name with candidate')), ('comments', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Feedback')), + ('nominee', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Nominee')), + ('position', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Position')), + ('user', ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), ], options={ 'verbose_name_plural': 'Nominations', }, ), migrations.CreateModel( - name='Nominee', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('duplicated', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='nomcom.Nominee')), - ('email', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Email')), - ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), - ], - options={ - 'ordering': ['-nomcom__group__acronym', 'email__address'], - 'verbose_name_plural': 'Nominees', - }, - ), - migrations.CreateModel( - name='NomineePosition', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(auto_now_add=True)), - ('nominee', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Nominee')), - ], - options={ - 'ordering': ['nominee'], - 'verbose_name': 'Nominee position', - 'verbose_name_plural': 'Nominee positions', - }, - ), - migrations.CreateModel( - name='Position', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(help_text='This short description will appear on the Nomination and Feedback pages. Be as descriptive as necessary. Past examples: "Transport AD", "IAB Member"', max_length=255, verbose_name='Name')), - ('is_open', models.BooleanField(default=False, help_text='Set is_open when the nomcom is working on a position. Clear it when an appointment is confirmed.', verbose_name='Is open')), - ('accepting_nominations', models.BooleanField(default=False, verbose_name='Is accepting nominations')), - ('accepting_feedback', models.BooleanField(default=False, verbose_name='Is accepting feedback')), - ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), - ('questionnaire', ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='questionnaire', to='dbtemplate.DBTemplate')), - ('requirement', ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='requirement', to='dbtemplate.DBTemplate')), - ], - options={ - 'verbose_name_plural': 'Positions', - }, - ), - migrations.CreateModel( - name='ReminderDates', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('date', models.DateField()), - ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), - ], - ), - migrations.CreateModel( - name='Topic', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('subject', models.CharField(help_text='This short description will appear on the Feedback pages.', max_length=255, verbose_name='Name')), - ('accepting_feedback', models.BooleanField(default=False, verbose_name='Is accepting feedback')), - ('audience', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.TopicAudienceName')), - ('description', ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='description', to='dbtemplate.DBTemplate')), - ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), - ], - options={ - 'verbose_name_plural': 'Topics', - }, - ), - migrations.CreateModel( - name='TopicFeedbackLastSeen', + name='FeedbackLastSeen', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('time', models.DateTimeField(auto_now=True)), + ('nominee', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Nominee')), ('reviewer', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('topic', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Topic')), ], ), - migrations.AddField( - model_name='nomineeposition', - name='position', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Position'), - ), - migrations.AddField( - model_name='nomineeposition', - name='state', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.NomineePositionStateName'), - ), - migrations.AddField( - model_name='nominee', - name='nominee_position', - field=models.ManyToManyField(through='nomcom.NomineePosition', to='nomcom.Position'), - ), - migrations.AddField( - model_name='nominee', - name='person', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person'), - ), - migrations.AddField( - model_name='nomination', - name='nominee', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Nominee'), - ), - migrations.AddField( - model_name='nomination', - name='position', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Position'), - ), - migrations.AddField( - model_name='nomination', - name='user', - field=ietf.utils.models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - migrations.AddField( - model_name='feedbacklastseen', - name='nominee', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.Nominee'), - ), - migrations.AddField( - model_name='feedbacklastseen', - name='reviewer', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), - ), migrations.AddField( model_name='feedback', name='nomcom', @@ -223,14 +205,14 @@ class Migration(migrations.Migration): migrations.AddField( model_name='feedback', name='user', - field=ietf.utils.models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - migrations.AlterUniqueTogether( - name='nomineeposition', - unique_together=set([('position', 'nominee')]), + field=ietf.utils.models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), ), migrations.AlterUniqueTogether( name='nominee', - unique_together=set([('email', 'nomcom')]), + unique_together={('email', 'nomcom')}, + ), + migrations.AddIndex( + model_name='feedback', + index=models.Index(fields=['time'], name='nomcom_feed_time_35cf38_idx'), ), ] diff --git a/ietf/nomcom/migrations/0002_auto_20180918_0550.py b/ietf/nomcom/migrations/0002_auto_20180918_0550.py deleted file mode 100644 index 44fd8d4df..000000000 --- a/ietf/nomcom/migrations/0002_auto_20180918_0550.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.15 on 2018-09-18 05:50 - - -from django.conf import settings -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='feedback', - name='user', - field=ietf.utils.models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), - ), - migrations.AlterField( - model_name='nomination', - name='user', - field=ietf.utils.models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), - ), - ] diff --git a/ietf/nomcom/migrations/0003_nomcom_show_accepted_nominees.py b/ietf/nomcom/migrations/0003_nomcom_show_accepted_nominees.py deleted file mode 100644 index cc7d73283..000000000 --- a/ietf/nomcom/migrations/0003_nomcom_show_accepted_nominees.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.15 on 2018-09-26 11:10 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0002_auto_20180918_0550'), - ] - - operations = [ - migrations.AddField( - model_name='nomcom', - name='show_accepted_nominees', - field=models.BooleanField(default=True, help_text='Show accepted nominees on the public nomination page', verbose_name='Show accepted nominees'), - ), - ] diff --git a/ietf/nomcom/migrations/0004_set_show_accepted_nominees_false_on_existing_nomcoms.py b/ietf/nomcom/migrations/0004_set_show_accepted_nominees_false_on_existing_nomcoms.py deleted file mode 100644 index 7f4746a27..000000000 --- a/ietf/nomcom/migrations/0004_set_show_accepted_nominees_false_on_existing_nomcoms.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.15 on 2018-09-26 11:12 - - -from django.db import migrations - -def forward(apps, schema_editor): - NomCom = apps.get_model('nomcom','NomCom') - NomCom.objects.update(show_accepted_nominees=False) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0003_nomcom_show_accepted_nominees'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] - diff --git a/ietf/nomcom/migrations/0005_auto_20181008_0602.py b/ietf/nomcom/migrations/0005_auto_20181008_0602.py deleted file mode 100644 index cd56b0993..000000000 --- a/ietf/nomcom/migrations/0005_auto_20181008_0602.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-10-08 06:02 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0004_set_show_accepted_nominees_false_on_existing_nomcoms'), - ] - - operations = [ - migrations.AlterModelOptions( - name='nominee', - options={'ordering': ['-nomcom__group__acronym', 'person__name'], 'verbose_name_plural': 'Nominees'}, - ), - ] diff --git a/ietf/nomcom/migrations/0006_auto_20190716_1216.py b/ietf/nomcom/migrations/0006_auto_20190716_1216.py deleted file mode 100644 index 7c3a374f4..000000000 --- a/ietf/nomcom/migrations/0006_auto_20190716_1216.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.22 on 2019-07-16 12:16 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0005_auto_20181008_0602'), - ] - - operations = [ - migrations.AlterField( - model_name='feedback', - name='comments', - field=models.BinaryField(verbose_name='Comments'), - ), - ] diff --git a/ietf/nomcom/migrations/0007_position_is_iesg_position.py b/ietf/nomcom/migrations/0007_position_is_iesg_position.py deleted file mode 100644 index edd4cf0f0..000000000 --- a/ietf/nomcom/migrations/0007_position_is_iesg_position.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.27 on 2020-01-07 14:41 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0006_auto_20190716_1216'), - ] - - operations = [ - migrations.AddField( - model_name='position', - name='is_iesg_position', - field=models.BooleanField(default=False, verbose_name='Is IESG Position'), - ), - ] diff --git a/ietf/nomcom/migrations/0008_auto_20201008_0506.py b/ietf/nomcom/migrations/0008_auto_20201008_0506.py deleted file mode 100644 index b14e8da27..000000000 --- a/ietf/nomcom/migrations/0008_auto_20201008_0506.py +++ /dev/null @@ -1,20 +0,0 @@ -# Generated by Django 2.2.16 on 2020-10-08 05:06 - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0007_position_is_iesg_position'), - ] - - operations = [ - migrations.AlterField( - model_name='topic', - name='audience', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.TopicAudienceName', verbose_name='Who can provide feedback (intended audience)'), - ), - ] diff --git a/ietf/nomcom/migrations/0009_auto_20201109_0439.py b/ietf/nomcom/migrations/0009_auto_20201109_0439.py deleted file mode 100644 index 8b6efe2a8..000000000 --- a/ietf/nomcom/migrations/0009_auto_20201109_0439.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0008_auto_20201008_0506'), - ] - - operations = [ - migrations.AddIndex( - model_name='feedback', - index=models.Index(fields=['time'], name='nomcom_feed_time_35cf38_idx'), - ), - ] diff --git a/ietf/nomcom/migrations/0010_nomcom_first_call_for_volunteers.py b/ietf/nomcom/migrations/0010_nomcom_first_call_for_volunteers.py deleted file mode 100644 index 01f2f3335..000000000 --- a/ietf/nomcom/migrations/0010_nomcom_first_call_for_volunteers.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.20 on 2021-04-22 14:32 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0009_auto_20201109_0439'), - ] - - operations = [ - migrations.AddField( - model_name='nomcom', - name='first_call_for_volunteers', - field=models.DateField(blank=True, null=True, verbose_name='Date of the first call for volunteers'), - ), - ] diff --git a/ietf/nomcom/migrations/0011_volunteers.py b/ietf/nomcom/migrations/0011_volunteers.py deleted file mode 100644 index 651e1dc54..000000000 --- a/ietf/nomcom/migrations/0011_volunteers.py +++ /dev/null @@ -1,30 +0,0 @@ -# Generated by Django 2.2.24 on 2021-06-09 12:15 - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0019_auto_20210604_1443'), - ('nomcom', '0010_nomcom_first_call_for_volunteers'), - ] - - operations = [ - migrations.AddField( - model_name='nomcom', - name='is_accepting_volunteers', - field=models.BooleanField(default=False, help_text='Is this nomcom is currently accepting volunteers?', verbose_name='Accepting volunteers'), - ), - migrations.CreateModel( - name='Volunteer', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('affiliation', models.CharField(blank=True, max_length=255)), - ('nomcom', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='nomcom.NomCom')), - ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ], - ), - ] diff --git a/ietf/nomcom/migrations/0012_populate_volunteers.py b/ietf/nomcom/migrations/0012_populate_volunteers.py deleted file mode 100644 index 4da1bbaf0..000000000 --- a/ietf/nomcom/migrations/0012_populate_volunteers.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright The IETF Trust 2021 All Rights Reserved -# Generated by Django 2.2.24 on 2021-06-10 12:50 - -from django.db import migrations - -def forward(apps, schema_editor): - NomCom = apps.get_model('nomcom','NomCom') - nc = NomCom.objects.filter(group__acronym='nomcom2021').first() - if nc is None: - return # nothing to do if the NomCom in question does not exist - - nc.is_accepting_volunteers = True - nc.save() - - volunteers = [ - (21684, 'Futurewei Technologies'), # Barry Leiba - (117988, 'Google LLC'), # Benjamin M. Schwartz - (122671, 'Fastmail Pty Ltd'), # Bron Gondwana - (124329, 'Huawei'), # Cheng Li - (113580, 'China Mobile'), # Weiqiang Cheng - (22933, 'LabN Consulting'), # Christian Hopps - (102391, 'Futurewei Technologies, Inc'), # Donald E. Eastlake 3rd - (111477, 'Huawei'), # Dhruv Dhody - (12695, 'Mozilla'), # Eric Rescorla - (17141, 'APNIC'), # George G. Michaelson - (108833, 'Huawei'), # Luigi Iannone - (118908, 'Huawei Technologies'), # Giuseppe Fioccola - (5376, 'Vigil Security, LLC'), # Russ Housley - (118100, 'Equinix'), # Ignas Bagdonas - (107287, 'rtfm llp'), # Jim Reid - (123344, 'Netflix'), # Theresa Enghardt - (109226, 'Huawei'), # Italo Busi - (113152, 'Ericsson'), # Jaime Jimenez - (111354, 'Juniper Networks'), # John Drake - (112342, 'Cisco Systems, Inc.'), # Jakob Heitz - (109207, 'Huawei Technologies Co., Ltd.'), # 江元龙 - (110737, 'Huawei Technologies'), # Jie Dong - (109330, 'Ericsson'), # John Preuß Mattsson - (123589, 'Nokia'), # Julien Maisonneuve - (124655, 'UK National Cyber Security Centre (NCSC)'), # Kirsty Paine - (119463, 'Akamai Technologies, Inc.'), # Kyle Rose - (109983, 'Huawei Technologies Co.,Ltd.'), # Bo Wu - (2097, 'Cisco Systems'), # Eliot Lear - (567, 'UCLA'), # Lixia Zhang - (107762, 'Huawei'), # Mach Chen - (125198, 'Juniper Networks'), # Melchior Aelmans - (104294, 'Ericsson'), # Magnus Westerlund - (104495, 'Impedance Mismatch LLC'), # Marc Petit-Huguenin - (119947, 'Painless Security, LLC'), # Margaret Cullen - (102830, 'Independent'), # Mary Barnes - (116593, 'Fastly'), # Patrick McManus - (102254, 'Sandelman Software Works'), # Michael Richardson - (20356, 'Apple'), # Ted Lemon - (103881, 'Fastly'), # Mark Nottingham - (106741, 'NthPermutation Security'), # Michael StJohns - (116323, 'Moulay Ismail University of Meknes, Morocco'), # Nabil Benamar - (20106, 'W3C/MIT'), # Samuel Weiler - (105691, 'cisco'), # Ole Trøan - (121160, 'Independent, Amazon'), # Padma Pillay-Esnault - (115824, 'Cisco Systems'), # Pascal Thubert - (122637, 'Huawei Technologies Co.,Ltd.'), # Shuping Peng - (112952, 'Huawei'), # Haibo Wang - (5234, 'IIJ Research Lab & Arrcus Inc'), # Randy Bush - (101568, 'Juniper Networks'), # Ron Bonica - (123443, 'Huawei Technologies Co.,Ltd.'), # Bing Liu (Remy) - (18321, 'Episteme Technology Consulting LLC'), # Pete Resnick - (18427, 'Akamai'), # Rich Salz - (126259, 'Huawei Technologies Co.,Ltd.'), # Fan Yang - (115724, 'Juniper Networks'), # Shraddha Hegde - (125509, 'Tencent'), # Shuai Zhao - (110614, 'Huawei'), # Tal Mizrahi - (123395, 'APNIC'), # Tom Harrison - (116516, 'Juniper Networks'), # Tarek Saad - (11834, 'Futurewei USA'), # Toerless Eckert - (123962, 'Open-Xchange'), # Vittorio Bertola - (126530, 'Huawei'), # Yali Wang - (106199, 'Ericsson'), # Wassim Haddad - (125173, 'Huawei'), # Wei Pan - (111299, 'ZTE Corporation'), # Xiao Min - (113285, 'Huawei Technologies'), # XiPeng Xiao - (116337, 'Futurewei Technologies Inc.'), # Yingzhen Qu - (123974, 'ZTE'), # Zheng Zhang - (117500, 'Huawei'), # Guangying Zheng - (115934, 'Huawei Technologies'), # Haomian Zheng - (110966, 'Juniper'), # Zhaohui (Jeffrey) Zhang - ] - - for pk, affiliation in volunteers: - nc.volunteer_set.create(person_id=pk, affiliation=affiliation) - -def reverse(apps, schema_editor): - Volunteer = apps.get_model('nomcom','Volunteer') - Volunteer.objects.all().delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0011_volunteers'), - ] - - operations = [ - migrations.RunPython(forward,reverse) - ] diff --git a/ietf/nomcom/migrations/0013_update_accepting_volunteers_helptext.py b/ietf/nomcom/migrations/0013_update_accepting_volunteers_helptext.py deleted file mode 100644 index 718e3b49f..000000000 --- a/ietf/nomcom/migrations/0013_update_accepting_volunteers_helptext.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-23 13:14 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('nomcom', '0012_populate_volunteers'), - ] - - operations = [ - migrations.AlterField( - model_name='nomcom', - name='is_accepting_volunteers', - field=models.BooleanField(default=False, help_text='Is this nomcom currently accepting volunteers?', verbose_name='Accepting volunteers'), - ), - ] diff --git a/ietf/person/migrations/0001_initial.py b/ietf/person/migrations/0001_initial.py index 72f6c9105..d0f6f239a 100644 --- a/ietf/person/migrations/0001_initial.py +++ b/ietf/person/migrations/0001_initial.py @@ -1,16 +1,16 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 +# Generated by Django 2.2.28 on 2023-03-20 19:22 - -import datetime from django.conf import settings +import django.contrib.postgres.fields.citext import django.core.validators from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone import ietf.person.models import ietf.utils.models import ietf.utils.storage +import jsonfield.fields +import simple_history.models class Migration(migrations.Migration): @@ -19,53 +19,64 @@ class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('name', '0001_initial'), ] operations = [ - migrations.CreateModel( - name='Alias', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(db_index=True, max_length=255)), - ], - options={ - 'verbose_name_plural': 'Aliases', - }, - ), - migrations.CreateModel( - name='Email', - fields=[ - ('address', models.CharField(max_length=64, primary_key=True, serialize=False, validators=[django.core.validators.EmailValidator()])), - ('time', models.DateTimeField(auto_now_add=True)), - ('primary', models.BooleanField(default=False)), - ('active', models.BooleanField(default=True)), - ], - ), migrations.CreateModel( name='Person', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('name', models.CharField(db_index=True, help_text='Preferred form of name.', max_length=255, verbose_name='Full Name (Unicode)')), + ('time', models.DateTimeField(default=django.utils.timezone.now)), + ('name', models.CharField(db_index=True, help_text='Preferred long form of name.', max_length=255, validators=[ietf.person.models.name_character_validator], verbose_name='Full Name (Unicode)')), + ('plain', models.CharField(blank=True, default='', help_text="Use this if you have a Spanish double surname. Don't use this for nicknames, and don't use it unless you've actually observed that the datatracker shows your name incorrectly.", max_length=64, verbose_name='Plain Name correction (Unicode)')), ('ascii', models.CharField(help_text='Name as rendered in ASCII (Latin, unaccented) characters.', max_length=255, verbose_name='Full Name (ASCII)')), ('ascii_short', models.CharField(blank=True, help_text='Example: A. Nonymous. Fill in this with initials and surname only if taking the initials and surname of the ASCII name above produces an incorrect initials-only form. (Blank is OK).', max_length=32, null=True, verbose_name='Abbreviated Name (ASCII)')), - ('affiliation', models.CharField(blank=True, help_text='Employer, university, sponsor, etc.', max_length=255)), - ('address', models.TextField(blank=True, help_text='Postal mailing address.', max_length=255)), + ('pronouns_selectable', jsonfield.fields.JSONCharField(blank=True, default=list, max_length=120, null=True, verbose_name='Pronouns')), + ('pronouns_freetext', models.CharField(blank=True, help_text='Optionally provide your personal pronouns. These will be displayed on your public profile page and alongside your name in Meetecho and, in future, other systems. Select any number of the checkboxes OR provide a custom string up to 30 characters.', max_length=30, null=True, verbose_name=' ')), ('biography', models.TextField(blank=True, help_text='Short biography for use on leadership pages. Use plain text or reStructuredText markup.')), ('photo', models.ImageField(blank=True, default=None, storage=ietf.utils.storage.NoLocationMigrationFileSystemStorage(location=None), upload_to='photo')), ('photo_thumb', models.ImageField(blank=True, default=None, storage=ietf.utils.storage.NoLocationMigrationFileSystemStorage(location=None), upload_to='photo')), - ('user', ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('name_from_draft', models.CharField(editable=False, help_text='Name as found in an Internet-Draft submission.', max_length=255, null=True, verbose_name='Full Name (from submission)')), + ('user', ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='PersonEvent', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time', models.DateTimeField(default=django.utils.timezone.now, help_text='When the event happened')), + ('type', models.CharField(choices=[('apikey_login', 'API key login'), ('email_address_deactivated', 'Email address deactivated')], max_length=50)), + ('desc', models.TextField()), + ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), ], options={ - 'abstract': False, + 'ordering': ['-time', '-id'], }, ), + migrations.CreateModel( + name='PersonApiKeyEvent', + fields=[ + ('personevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='person.PersonEvent')), + ], + bases=('person.personevent',), + ), + migrations.CreateModel( + name='PersonExtResource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('display_name', models.CharField(blank=True, default='', max_length=255)), + ('value', models.CharField(max_length=2083)), + ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceName')), + ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + ), migrations.CreateModel( name='PersonalApiKey', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('endpoint', models.CharField(choices=[('/api/iesg/position', '/api/iesg/position')], max_length=128)), - ('created', models.DateTimeField(default=datetime.datetime.now)), + ('endpoint', models.CharField(choices=[('/api/appauth/authortools', '/api/appauth/authortools'), ('/api/appauth/bibxml', '/api/appauth/bibxml'), ('/api/iesg/position', '/api/iesg/position'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/notify/meeting/bluesheet', '/api/notify/meeting/bluesheet'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration'), ('/api/notify/session/attendees', '/api/notify/session/attendees'), ('/api/notify/session/chatlog', '/api/notify/session/chatlog'), ('/api/notify/session/polls', '/api/notify/session/polls'), ('/api/v2/person/person', '/api/v2/person/person')], max_length=128)), + ('created', models.DateTimeField(default=django.utils.timezone.now)), ('valid', models.BooleanField(default=True)), ('salt', models.BinaryField(default=ietf.person.models.salt, max_length=12)), ('count', models.IntegerField(default=0)), @@ -74,58 +85,87 @@ class Migration(migrations.Migration): ], ), migrations.CreateModel( - name='PersonEvent', + name='HistoricalPerson', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now, help_text='When the event happened')), - ('type', models.CharField(choices=[('apikey_login', 'API key login')], max_length=50)), - ('desc', models.TextField()), - ], - options={ - 'ordering': ['-time', '-id'], - }, - ), - migrations.CreateModel( - name='PersonHistory', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('name', models.CharField(db_index=True, help_text='Preferred form of name.', max_length=255, verbose_name='Full Name (Unicode)')), + ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('time', models.DateTimeField(default=django.utils.timezone.now)), + ('name', models.CharField(db_index=True, help_text='Preferred long form of name.', max_length=255, validators=[ietf.person.models.name_character_validator], verbose_name='Full Name (Unicode)')), + ('plain', models.CharField(blank=True, default='', help_text="Use this if you have a Spanish double surname. Don't use this for nicknames, and don't use it unless you've actually observed that the datatracker shows your name incorrectly.", max_length=64, verbose_name='Plain Name correction (Unicode)')), ('ascii', models.CharField(help_text='Name as rendered in ASCII (Latin, unaccented) characters.', max_length=255, verbose_name='Full Name (ASCII)')), ('ascii_short', models.CharField(blank=True, help_text='Example: A. Nonymous. Fill in this with initials and surname only if taking the initials and surname of the ASCII name above produces an incorrect initials-only form. (Blank is OK).', max_length=32, null=True, verbose_name='Abbreviated Name (ASCII)')), - ('affiliation', models.CharField(blank=True, help_text='Employer, university, sponsor, etc.', max_length=255)), - ('address', models.TextField(blank=True, help_text='Postal mailing address.', max_length=255)), + ('pronouns_selectable', jsonfield.fields.JSONCharField(blank=True, default=list, max_length=120, null=True, verbose_name='Pronouns')), + ('pronouns_freetext', models.CharField(blank=True, help_text='Optionally provide your personal pronouns. These will be displayed on your public profile page and alongside your name in Meetecho and, in future, other systems. Select any number of the checkboxes OR provide a custom string up to 30 characters.', max_length=30, null=True, verbose_name=' ')), ('biography', models.TextField(blank=True, help_text='Short biography for use on leadership pages. Use plain text or reStructuredText markup.')), - ('photo', models.ImageField(blank=True, default=None, storage=ietf.utils.storage.NoLocationMigrationFileSystemStorage(location=None), upload_to='photo')), - ('photo_thumb', models.ImageField(blank=True, default=None, storage=ietf.utils.storage.NoLocationMigrationFileSystemStorage(location=None), upload_to='photo')), - ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='history_set', to='person.Person')), - ('user', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('photo', models.TextField(blank=True, default=None, max_length=100)), + ('photo_thumb', models.TextField(blank=True, default=None, max_length=100)), + ('name_from_draft', models.CharField(editable=False, help_text='Name as found in an Internet-Draft submission.', max_length=255, null=True, verbose_name='Full Name (from submission)')), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField(db_index=True)), + ('history_change_reason', models.CharField(max_length=100, null=True)), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)), ], options={ - 'abstract': False, + 'verbose_name': 'historical person', + 'verbose_name_plural': 'historical persons', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': ('history_date', 'history_id'), }, + bases=(simple_history.models.HistoricalChanges, models.Model), ), migrations.CreateModel( - name='PersonApiKeyEvent', + name='HistoricalEmail', fields=[ - ('personevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='person.PersonEvent')), - ('key', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.PersonalApiKey')), + ('address', django.contrib.postgres.fields.citext.CICharField(db_index=True, max_length=64, validators=[django.core.validators.EmailValidator()])), + ('time', models.DateTimeField(blank=True, editable=False)), + ('primary', models.BooleanField(default=False)), + ('origin', models.CharField(help_text="The origin of the address: the user's email address, or 'author: DRAFTNAME' if an Internet-Draft, or 'role: GROUP/ROLE' if a role.", max_length=150)), + ('active', models.BooleanField(default=True)), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField(db_index=True)), + ('history_change_reason', models.CharField(max_length=100, null=True)), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('person', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Person')), ], - bases=('person.personevent',), + options={ + 'verbose_name': 'historical email', + 'verbose_name_plural': 'historical emails', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': ('history_date', 'history_id'), + }, + bases=(simple_history.models.HistoricalChanges, models.Model), ), - migrations.AddField( + migrations.CreateModel( + name='Email', + fields=[ + ('address', django.contrib.postgres.fields.citext.CICharField(max_length=64, primary_key=True, serialize=False, validators=[django.core.validators.EmailValidator()])), + ('time', models.DateTimeField(auto_now_add=True)), + ('primary', models.BooleanField(default=False)), + ('origin', models.CharField(help_text="The origin of the address: the user's email address, or 'author: DRAFTNAME' if an Internet-Draft, or 'role: GROUP/ROLE' if a role.", max_length=150)), + ('active', models.BooleanField(default=True)), + ('person', ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + ), + migrations.CreateModel( + name='Alias', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(db_index=True, max_length=255)), + ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + options={ + 'verbose_name_plural': 'Aliases', + }, + ), + migrations.AddIndex( model_name='personevent', - name='person', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + index=models.Index(fields=['-time', '-id'], name='person_pers_time_8dfbc5_idx'), ), migrations.AddField( - model_name='email', - name='person', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person'), - ), - migrations.AddField( - model_name='alias', - name='person', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + model_name='personapikeyevent', + name='key', + field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.PersonalApiKey'), ), ] diff --git a/ietf/person/migrations/0002_auto_20180330_0808.py b/ietf/person/migrations/0002_auto_20180330_0808.py deleted file mode 100644 index ec2d2d893..000000000 --- a/ietf/person/migrations/0002_auto_20180330_0808.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.11 on 2018-03-30 08:08 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/iesg/position', '/api/iesg/position'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0003_auto_20180504_1519.py b/ietf/person/migrations/0003_auto_20180504_1519.py deleted file mode 100644 index 928c637c5..000000000 --- a/ietf/person/migrations/0003_auto_20180504_1519.py +++ /dev/null @@ -1,111 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.12 on 2018-05-04 15:19 - - -import datetime -from django.conf import settings -import django.core.validators -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('person', '0002_auto_20180330_0808'), - ] - - operations = [ - migrations.CreateModel( - name='HistoricalEmail', - fields=[ - ('address', models.CharField(db_index=True, max_length=64, validators=[django.core.validators.EmailValidator()])), - ('time', models.DateTimeField(blank=True, editable=False)), - ('primary', models.BooleanField(default=False)), - ('origin', models.CharField(default='', editable=False, max_length=150)), - ('active', models.BooleanField(default=True)), - ('history_id', models.AutoField(primary_key=True, serialize=False)), - ('history_date', models.DateTimeField()), - ('history_change_reason', models.CharField(max_length=100, null=True)), - ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), - ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), - ], - options={ - 'ordering': ('-history_date', '-history_id'), - 'get_latest_by': 'history_date', - 'verbose_name': 'historical email', - }, - ), - migrations.CreateModel( - name='HistoricalPerson', - fields=[ - ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('name', models.CharField(db_index=True, help_text='Preferred form of name.', max_length=255, verbose_name='Full Name (Unicode)')), - ('ascii', models.CharField(help_text='Name as rendered in ASCII (Latin, unaccented) characters.', max_length=255, verbose_name='Full Name (ASCII)')), - ('ascii_short', models.CharField(blank=True, help_text='Example: A. Nonymous. Fill in this with initials and surname only if taking the initials and surname of the ASCII name above produces an incorrect initials-only form. (Blank is OK).', max_length=32, null=True, verbose_name='Abbreviated Name (ASCII)')), - ('biography', models.TextField(blank=True, help_text='Short biography for use on leadership pages. Use plain text or reStructuredText markup.')), - ('photo', models.TextField(blank=True, default=None, max_length=100)), - ('photo_thumb', models.TextField(blank=True, default=None, max_length=100)), - ('name_from_draft', models.CharField(editable=False, help_text='Name as found in a draft submission.', max_length=255, null=True, verbose_name='Full Name (from submission)')), - ('history_id', models.AutoField(primary_key=True, serialize=False)), - ('history_date', models.DateTimeField()), - ('history_change_reason', models.CharField(max_length=100, null=True)), - ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), - ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), - ('user', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to=settings.AUTH_USER_MODEL)), - ], - options={ - 'ordering': ('-history_date', '-history_id'), - 'get_latest_by': 'history_date', - 'verbose_name': 'historical person', - }, - ), - migrations.RemoveField( - model_name='personhistory', - name='person', - ), - migrations.RemoveField( - model_name='personhistory', - name='user', - ), - migrations.RemoveField( - model_name='person', - name='address', - ), - migrations.RemoveField( - model_name='person', - name='affiliation', - ), - migrations.AddField( - model_name='email', - name='origin', - field=models.CharField(default='', editable=False, max_length=150), - ), - migrations.AddField( - model_name='person', - name='name_from_draft', - field=models.CharField(editable=False, help_text='Name as found in a draft submission.', max_length=255, null=True, verbose_name='Full Name (from submission)'), - ), - migrations.DeleteModel( - name='PersonHistory', - ), - migrations.AddField( - model_name='historicalemail', - name='person', - field=ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Person'), - ), - migrations.AddField( - model_name='historicalperson', - name='consent', - field=models.NullBooleanField(default=None, verbose_name='I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker'), - ), - migrations.AddField( - model_name='person', - name='consent', - field=models.NullBooleanField(default=None, verbose_name='I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker'), - ), - ] diff --git a/ietf/person/migrations/0004_populate_email_origin.py b/ietf/person/migrations/0004_populate_email_origin.py deleted file mode 100644 index 147b7b70c..000000000 --- a/ietf/person/migrations/0004_populate_email_origin.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.12 on 2018-05-10 05:28 - - -import sys - -from django.db import migrations - -import debug # pyflakes:ignore - -def populate_email_origin(apps, schema_editor): - Submission = apps.get_model('submit', 'Submission') - Document = apps.get_model('doc', 'Document') - DocHistory = apps.get_model('doc', 'DocHistory') - DocumentAuthor = apps.get_model('doc', 'DocumentAuthor') - DocHistoryAuthor= apps.get_model('doc', 'DocHistoryAuthor') - Role = apps.get_model('group', 'Role') - RoleHistory = apps.get_model('group', 'RoleHistory') - ReviewRequest = apps.get_model('review', 'ReviewRequest') - LiaisonStatement= apps.get_model('liaisons', 'LiaisonStatement') - # - Email = apps.get_model('person', 'Email') - # - sys.stdout.write("\n") - # - sys.stdout.write("\n ** This migration may take some time. Expect at least a few minutes **.\n\n") - sys.stdout.write(" Initializing data structures...\n") - emails = dict([ (e.address, e) for e in Email.objects.filter(origin='') ]) - - count = 0 - sys.stdout.write(" Assigning email origins from Submission records...\n") - for o in Submission.objects.all().order_by('-submission_date'): - for a in o.authors: - addr = a['email'] - if addr in emails: - e = emails[addr] - if e.origin != o.name: - e.origin = "author: %s" % o.name - count += 1 - e.save() - del emails[addr] - sys.stdout.write(" Submission email origins assigned: %d\n" % count) - - for model in (DocumentAuthor, DocHistoryAuthor, ): - count = 0 - sys.stdout.write(" Assigning email origins from %s records...\n" % model.__name__) - for o in model.objects.filter(email__origin=''): - if not o.email.origin: - o.email.origin = "author: %s" % o.document.name - o.email.save() - count += 1 - sys.stdout.write(" %s email origins assigned: %d\n" % (model.__name__, count)) - - for model in (Role, RoleHistory, ): - count = 0 - sys.stdout.write(" Assigning email origins from %s records...\n" % model.__name__) - for o in model.objects.filter(email__origin=''): - if not o.email.origin: - o.email.origin = "role: %s %s" % (o.group.acronym, o.name.slug) - o.email.save() - count += 1 - sys.stdout.write(" %s email origins assigned: %d\n" % (model.__name__, count)) - - for model in (ReviewRequest, ): - count = 0 - sys.stdout.write(" Assigning email origins from %s records...\n" % model.__name__) - for o in model.objects.filter(reviewer__origin=''): - if not o.reviewer.origin: - o.reviewer.origin = "reviewer: %s" % (o.doc.name) - o.reviewer.save() - count += 1 - sys.stdout.write(" %s email origins assigned: %d\n" % (model.__name__, count)) - - for model in (LiaisonStatement, ): - count = 0 - sys.stdout.write(" Assigning email origins from %s records...\n" % model.__name__) - for o in model.objects.filter(from_contact__origin=''): - if not o.from_contact.origin: - o.from_contact.origin = "liaison: %s" % (','.join([ g.acronym for g in o.from_groups.all() ])) - o.from_contact.save() - count += 1 - sys.stdout.write(" %s email origins assigned: %d\n" % (model.__name__, count)) - - for model in (Document, DocHistory, ): - count = 0 - sys.stdout.write(" Assigning email origins from %s records...\n" % model.__name__) - for o in model.objects.filter(shepherd__origin=''): - if not o.shepherd.origin: - o.shepherd.origin = "shepherd: %s" % o.name - o.shepherd.save() - count += 1 - sys.stdout.write(" %s email origins assigned: %d\n" % (model.__name__, count)) - - sys.stdout.write("\n") - sys.stdout.write(" Email records with origin indication: %d\n" % Email.objects.exclude(origin='').count()) - sys.stdout.write(" Email records without origin indication: %d\n" % Email.objects.filter(origin='').count()) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0003_auto_20180504_1519'), - ] - - operations = [ - migrations.RunPython(populate_email_origin, reverse) - ] diff --git a/ietf/person/migrations/0005_populate_person_name_from_draft.py b/ietf/person/migrations/0005_populate_person_name_from_draft.py deleted file mode 100644 index d83dd2284..000000000 --- a/ietf/person/migrations/0005_populate_person_name_from_draft.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.12 on 2018-05-10 05:28 - - -import sys - -from django.db import migrations - -import debug # pyflakes:ignore - -def populate_person_name_from_draft(apps, schema_editor): - Submission = apps.get_model('submit', 'Submission') - Email = apps.get_model('person', 'Email') - # - sys.stdout.write("\n") - # - sys.stdout.write("\n ** This migration may take some time. Expect at least a few minutes **.\n\n") - sys.stdout.write(" Initializing data structures...\n") - persons = dict([ (e.address, e.person) for e in Email.objects.all() ]) - - count = 0 - sys.stdout.write(" Assigning Person.name_from_draft from Submission records...\n") - for o in Submission.objects.all().order_by('-submission_date'): - for a in o.authors: - name = a['name'] - email = a['email'] - if email in persons: - p = persons[email] - if not p.name_from_draft: - p.name_from_draft = name - count += 1 - p.save() - del persons[email] - sys.stdout.write(" Submission author names assigned: %d\n" % count) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0004_populate_email_origin'), - ] - - operations = [ - migrations.RunPython(populate_person_name_from_draft, reverse) - ] diff --git a/ietf/person/migrations/0006_auto_20180910_0719.py b/ietf/person/migrations/0006_auto_20180910_0719.py deleted file mode 100644 index 9e17137a8..000000000 --- a/ietf/person/migrations/0006_auto_20180910_0719.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.13 on 2018-09-10 07:19 - - -from django.conf import settings -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0005_populate_person_name_from_draft'), - ] - - operations = [ - migrations.AlterField( - model_name='person', - name='user', - field=ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL), - ), - ] diff --git a/ietf/person/migrations/0007_auto_20180929_1303.py b/ietf/person/migrations/0007_auto_20180929_1303.py deleted file mode 100644 index b4e41d7fa..000000000 --- a/ietf/person/migrations/0007_auto_20180929_1303.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.15 on 2018-09-29 13:03 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0006_auto_20180910_0719'), - ] - - operations = [ - migrations.AlterField( - model_name='personevent', - name='type', - field=models.CharField(choices=[('apikey_login', 'API key login'), ('gdpr_notice_email', 'GDPR consent request email sent'), ('email_address_deactivated', 'Email address deactivated')], max_length=50), - ), - ] diff --git a/ietf/person/migrations/0008_auto_20181014_1448.py b/ietf/person/migrations/0008_auto_20181014_1448.py deleted file mode 100644 index f6d765b02..000000000 --- a/ietf/person/migrations/0008_auto_20181014_1448.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-10-14 14:48 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0007_auto_20180929_1303'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/iesg/position', '/api/iesg/position'), ('/api/v2/person/person', '/api/v2/person/person'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0009_auto_20190118_0725.py b/ietf/person/migrations/0009_auto_20190118_0725.py deleted file mode 100644 index be609f109..000000000 --- a/ietf/person/migrations/0009_auto_20190118_0725.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.18 on 2019-01-18 07:25 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0008_auto_20181014_1448'), - ] - - operations = [ - migrations.AlterField( - model_name='email', - name='origin', - field=models.CharField(help_text="The origin of the address: the user's email address, or 'author: DRAFTNAME' if a draft, or 'role: GROUP/ROLE' if a role.", max_length=150), - ), - migrations.AlterField( - model_name='historicalemail', - name='origin', - field=models.CharField(help_text="The origin of the address: the user's email address, or 'author: DRAFTNAME' if a draft, or 'role: GROUP/ROLE' if a role.", max_length=150), - ), - ] diff --git a/ietf/person/migrations/0010_auto_20200415_1133.py b/ietf/person/migrations/0010_auto_20200415_1133.py deleted file mode 100644 index 80aea5efa..000000000 --- a/ietf/person/migrations/0010_auto_20200415_1133.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-04-15 11:33 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0009_auto_20190118_0725'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/iesg/position', '/api/iesg/position'), ('/api/v2/person/person', '/api/v2/person/person'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/person/access/meetecho', '/api/person/access/meetecho')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0011_auto_20200608_1212.py b/ietf/person/migrations/0011_auto_20200608_1212.py deleted file mode 100644 index ea64411aa..000000000 --- a/ietf/person/migrations/0011_auto_20200608_1212.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.13 on 2020-06-08 12:12 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0010_auto_20200415_1133'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/iesg/position', '/api/iesg/position'), ('/api/v2/person/person', '/api/v2/person/person'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/person/access/meetecho', '/api/person/access/meetecho'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0012_auto_20200624_1332.py b/ietf/person/migrations/0012_auto_20200624_1332.py deleted file mode 100644 index bba2ff621..000000000 --- a/ietf/person/migrations/0012_auto_20200624_1332.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.1.15 on 2020-06-24 13:32 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0011_auto_20200608_1212'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalperson', - name='consent', - field=models.BooleanField(default=None, null=True, verbose_name='I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker'), - ), - migrations.AlterField( - model_name='person', - name='consent', - field=models.BooleanField(default=None, null=True, verbose_name='I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker'), - ), - ] diff --git a/ietf/person/migrations/0013_auto_20200711_1036.py b/ietf/person/migrations/0013_auto_20200711_1036.py deleted file mode 100644 index df031f6da..000000000 --- a/ietf/person/migrations/0013_auto_20200711_1036.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 2.2.14 on 2020-07-11 13:28 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0012_auto_20200624_1332'), - ] - - operations = [ - migrations.AddField( - model_name='historicalperson', - name='plain', - field=models.CharField(blank=True, default='', help_text='Preferred plain form of name, if different from the automatic plain form.', max_length=64, verbose_name='Plain Name (Unicode)'), - ), - migrations.AddField( - model_name='person', - name='plain', - field=models.CharField(blank=True, default='', help_text='Preferred plain form of name, if different from the automatic plain form.', max_length=64, verbose_name='Plain Name (Unicode)'), - ), - migrations.AlterField( - model_name='historicalperson', - name='name', - field=models.CharField(db_index=True, help_text='Preferred long form of name.', max_length=255, verbose_name='Full Name (Unicode)'), - ), - migrations.AlterField( - model_name='person', - name='name', - field=models.CharField(db_index=True, help_text='Preferred long form of name.', max_length=255, verbose_name='Full Name (Unicode)'), - ), - ] diff --git a/ietf/person/migrations/0014_auto_20200717_0743.py b/ietf/person/migrations/0014_auto_20200717_0743.py deleted file mode 100644 index 4c8742685..000000000 --- a/ietf/person/migrations/0014_auto_20200717_0743.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.14 on 2020-07-17 07:43 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0013_auto_20200711_1036'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/iesg/position', '/api/iesg/position'), ('/api/v2/person/person', '/api/v2/person/person'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0015_extres.py b/ietf/person/migrations/0015_extres.py deleted file mode 100644 index 1b9828585..000000000 --- a/ietf/person/migrations/0015_extres.py +++ /dev/null @@ -1,28 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.11.29 on 2020-04-15 10:20 -from __future__ import unicode_literals - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0014_extres'), - ('person', '0014_auto_20200717_0743'), - ] - - operations = [ - migrations.CreateModel( - name='PersonExtResource', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('display_name', models.CharField(blank=True, default='', max_length=255)), - ('value', models.CharField(max_length=2083)), - ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceName')), - ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ], - ), - ] diff --git a/ietf/person/migrations/0016_auto_20200807_0750.py b/ietf/person/migrations/0016_auto_20200807_0750.py deleted file mode 100644 index a956d608b..000000000 --- a/ietf/person/migrations/0016_auto_20200807_0750.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.15 on 2020-08-07 07:50 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0015_extres'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/iesg/position', '/api/iesg/position'), ('/api/v2/person/person', '/api/v2/person/person'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration'), ('/api/notify/meeting/bluesheet', '/api/notify/meeting/bluesheet')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0017_auto_20201028_0902.py b/ietf/person/migrations/0017_auto_20201028_0902.py deleted file mode 100644 index 275de3e1b..000000000 --- a/ietf/person/migrations/0017_auto_20201028_0902.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.2.16 on 2020-10-28 09:02 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0016_auto_20200807_0750'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalperson', - name='plain', - field=models.CharField(blank=True, default='', help_text="Use this if you have a Spanish double surname. Don't use this for nicknames, and don't use it unless you've actually observed that the datatracker shows your name incorrectly.", max_length=64, verbose_name='Plain Name correction (Unicode)'), - ), - migrations.AlterField( - model_name='person', - name='plain', - field=models.CharField(blank=True, default='', help_text="Use this if you have a Spanish double surname. Don't use this for nicknames, and don't use it unless you've actually observed that the datatracker shows your name incorrectly.", max_length=64, verbose_name='Plain Name correction (Unicode)'), - ), - ] diff --git a/ietf/person/migrations/0018_auto_20201109_0439.py b/ietf/person/migrations/0018_auto_20201109_0439.py deleted file mode 100644 index 51f1d2d91..000000000 --- a/ietf/person/migrations/0018_auto_20201109_0439.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0017_auto_20201028_0902'), - ] - - operations = [ - migrations.AddIndex( - model_name='personevent', - index=models.Index(fields=['-time', '-id'], name='person_pers_time_8dfbc5_idx'), - ), - ] diff --git a/ietf/person/migrations/0019_auto_20210604_1443.py b/ietf/person/migrations/0019_auto_20210604_1443.py deleted file mode 100644 index 432f7541d..000000000 --- a/ietf/person/migrations/0019_auto_20210604_1443.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.20 on 2021-06-04 14:43 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0018_auto_20201109_0439'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/iesg/position', '/api/iesg/position'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/notify/meeting/bluesheet', '/api/notify/meeting/bluesheet'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration'), ('/api/v2/person/person', '/api/v2/person/person')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0020_auto_20210920_0924.py b/ietf/person/migrations/0020_auto_20210920_0924.py deleted file mode 100644 index bcb9dc1c3..000000000 --- a/ietf/person/migrations/0020_auto_20210920_0924.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.24 on 2021-09-20 09:24 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0019_auto_20210604_1443'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/appauth/authortools', '/api/appauth/authortools'), ('/api/iesg/position', '/api/iesg/position'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/notify/meeting/bluesheet', '/api/notify/meeting/bluesheet'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration'), ('/api/v2/person/person', '/api/v2/person/person')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0021_auto_20211210_0805.py b/ietf/person/migrations/0021_auto_20211210_0805.py deleted file mode 100644 index d65b1a99b..000000000 --- a/ietf/person/migrations/0021_auto_20211210_0805.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.25 on 2021-12-10 08:05 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0020_auto_20210920_0924'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/appauth/authortools', '/api/appauth/authortools'), ('/api/appauth/bibxml', '/api/appauth/bibxml'), ('/api/iesg/position', '/api/iesg/position'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/notify/meeting/bluesheet', '/api/notify/meeting/bluesheet'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration'), ('/api/v2/person/person', '/api/v2/person/person')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0022_auto_20220513_1456.py b/ietf/person/migrations/0022_auto_20220513_1456.py deleted file mode 100644 index 96f942496..000000000 --- a/ietf/person/migrations/0022_auto_20220513_1456.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 2.2.28 on 2022-05-13 14:56 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0021_auto_20211210_0805'), - ] - - operations = [ - migrations.AlterModelOptions( - name='historicalemail', - options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical email', 'verbose_name_plural': 'historical emails'}, - ), - migrations.AlterModelOptions( - name='historicalperson', - options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical person', 'verbose_name_plural': 'historical persons'}, - ), - migrations.AlterField( - model_name='historicalemail', - name='history_date', - field=models.DateTimeField(db_index=True), - ), - migrations.AlterField( - model_name='historicalperson', - name='history_date', - field=models.DateTimeField(db_index=True), - ), - ] diff --git a/ietf/person/migrations/0023_auto_20220615_1006.py b/ietf/person/migrations/0023_auto_20220615_1006.py deleted file mode 100644 index 22b50a25a..000000000 --- a/ietf/person/migrations/0023_auto_20220615_1006.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.28 on 2022-06-15 10:06 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0022_auto_20220513_1456'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/appauth/authortools', '/api/appauth/authortools'), ('/api/appauth/bibxml', '/api/appauth/bibxml'), ('/api/iesg/position', '/api/iesg/position'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/notify/meeting/bluesheet', '/api/notify/meeting/bluesheet'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration'), ('/api/notify/session/attendees', '/api/notify/session/attendees'), ('/api/v2/person/person', '/api/v2/person/person')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0024_pronouns.py b/ietf/person/migrations/0024_pronouns.py deleted file mode 100644 index 1ef9514b0..000000000 --- a/ietf/person/migrations/0024_pronouns.py +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved -# Generated by Django 2.2.28 on 2022-06-17 15:09 - -from django.db import migrations, models -import jsonfield.fields - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0023_auto_20220615_1006'), - ] - - operations = [ - migrations.AddField( - model_name='historicalperson', - name='pronouns_freetext', - field=models.CharField(blank=True, help_text='Optionally provide your personal pronouns. These will be displayed on your public profile page and alongside your name in Meetecho and, in future, other systems. Select any number of the checkboxes OR provide a custom string up to 30 characters.', max_length=30, null=True, verbose_name=' '), - ), - migrations.AddField( - model_name='historicalperson', - name='pronouns_selectable', - field=jsonfield.fields.JSONCharField(blank=True, default=list, max_length=120, null=True, verbose_name='Pronouns'), - ), - migrations.AddField( - model_name='person', - name='pronouns_freetext', - field=models.CharField(blank=True, help_text='Optionally provide your personal pronouns. These will be displayed on your public profile page and alongside your name in Meetecho and, in future, other systems. Select any number of the checkboxes OR provide a custom string up to 30 characters.', max_length=30, null=True, verbose_name=' '), - ), - migrations.AddField( - model_name='person', - name='pronouns_selectable', - field=jsonfield.fields.JSONCharField(blank=True, default=list, max_length=120, null=True, verbose_name='Pronouns'), - ), - migrations.AlterField( - model_name='historicalperson', - name='consent', - field=models.BooleanField(default=None, null=True, verbose_name='I hereby give my consent to the use of the personal details I have provided (photo, bio, name, pronouns, email) within the IETF Datatracker'), - ), - migrations.AlterField( - model_name='person', - name='consent', - field=models.BooleanField(default=None, null=True, verbose_name='I hereby give my consent to the use of the personal details I have provided (photo, bio, name, pronouns, email) within the IETF Datatracker'), - ), - ] diff --git a/ietf/person/migrations/0025_chat_and_polls_apikey.py b/ietf/person/migrations/0025_chat_and_polls_apikey.py deleted file mode 100644 index 03afdc599..000000000 --- a/ietf/person/migrations/0025_chat_and_polls_apikey.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved - -from django.db import migrations, models - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0024_pronouns'), - ] - - operations = [ - migrations.AlterField( - model_name='personalapikey', - name='endpoint', - field=models.CharField(choices=[('/api/appauth/authortools', '/api/appauth/authortools'), ('/api/appauth/bibxml', '/api/appauth/bibxml'), ('/api/iesg/position', '/api/iesg/position'), ('/api/meeting/session/video/url', '/api/meeting/session/video/url'), ('/api/notify/meeting/bluesheet', '/api/notify/meeting/bluesheet'), ('/api/notify/meeting/registration', '/api/notify/meeting/registration'), ('/api/notify/session/attendees', '/api/notify/session/attendees'), ('/api/notify/session/chatlog', '/api/notify/session/chatlog'), ('/api/notify/session/polls', '/api/notify/session/polls'), ('/api/v2/person/person', '/api/v2/person/person')], max_length=128), - ), - ] diff --git a/ietf/person/migrations/0026_drop_consent.py b/ietf/person/migrations/0026_drop_consent.py deleted file mode 100644 index 2acaad678..000000000 --- a/ietf/person/migrations/0026_drop_consent.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0025_chat_and_polls_apikey'), - ] - - operations = [ - migrations.RemoveField( - model_name='historicalperson', - name='consent', - ), - migrations.RemoveField( - model_name='person', - name='consent', - ), - ] diff --git a/ietf/person/migrations/0027_personevent_drop_consent.py b/ietf/person/migrations/0027_personevent_drop_consent.py deleted file mode 100644 index e2443596f..000000000 --- a/ietf/person/migrations/0027_personevent_drop_consent.py +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0026_drop_consent'), - ] - - operations = [ - migrations.AlterField( - model_name='personevent', - name='type', - field=models.CharField(choices=[('apikey_login', 'API key login'), ('email_address_deactivated', 'Email address deactivated')], max_length=50), - ), - ] diff --git a/ietf/person/migrations/0028_name_character_validator.py b/ietf/person/migrations/0028_name_character_validator.py deleted file mode 100644 index c7e4a9305..000000000 --- a/ietf/person/migrations/0028_name_character_validator.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2022, All Rights Reserved - -from django.db import migrations, models -import ietf.person.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0027_personevent_drop_consent'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalperson', - name='name', - field=models.CharField(db_index=True, help_text='Preferred long form of name.', max_length=255, validators=[ietf.person.models.name_character_validator], verbose_name='Full Name (Unicode)'), - ), - migrations.AlterField( - model_name='person', - name='name', - field=models.CharField(db_index=True, help_text='Preferred long form of name.', max_length=255, validators=[ietf.person.models.name_character_validator], verbose_name='Full Name (Unicode)'), - ), - ] diff --git a/ietf/person/migrations/0029_use_timezone_now_for_person_models.py b/ietf/person/migrations/0029_use_timezone_now_for_person_models.py deleted file mode 100644 index 4848573ee..000000000 --- a/ietf/person/migrations/0029_use_timezone_now_for_person_models.py +++ /dev/null @@ -1,34 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-12 11:24 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0028_name_character_validator'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalperson', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='person', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='personalapikey', - name='created', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='personevent', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now, help_text='When the event happened'), - ), - ] diff --git a/ietf/person/migrations/0030_id_term.py b/ietf/person/migrations/0030_id_term.py deleted file mode 100644 index 3be33c9b3..000000000 --- a/ietf/person/migrations/0030_id_term.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 2.2.28 on 2023-02-10 19:58 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0029_use_timezone_now_for_person_models'), - ] - - operations = [ - migrations.AlterField( - model_name='email', - name='origin', - field=models.CharField(help_text="The origin of the address: the user's email address, or 'author: DRAFTNAME' if an Internet-Draft, or 'role: GROUP/ROLE' if a role.", max_length=150), - ), - migrations.AlterField( - model_name='historicalemail', - name='origin', - field=models.CharField(help_text="The origin of the address: the user's email address, or 'author: DRAFTNAME' if an Internet-Draft, or 'role: GROUP/ROLE' if a role.", max_length=150), - ), - migrations.AlterField( - model_name='historicalperson', - name='name_from_draft', - field=models.CharField(editable=False, help_text='Name as found in an Internet-Draft submission.', max_length=255, null=True, verbose_name='Full Name (from submission)'), - ), - migrations.AlterField( - model_name='person', - name='name_from_draft', - field=models.CharField(editable=False, help_text='Name as found in an Internet-Draft submission.', max_length=255, null=True, verbose_name='Full Name (from submission)'), - ), - ] diff --git a/ietf/person/migrations/0031_ci_email.py b/ietf/person/migrations/0031_ci_email.py deleted file mode 100644 index deeedce54..000000000 --- a/ietf/person/migrations/0031_ci_email.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 2.2.28 on 2023-01-26 19:45 - -import django.contrib.postgres.fields.citext -from django.contrib.postgres.operations import CITextExtension -import django.core.validators -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0030_id_term'), - ('utils', '0004_pause_to_change_database_engines'), - ] - - operations = [ - CITextExtension(), - migrations.AlterField( - model_name='email', - name='address', - field=django.contrib.postgres.fields.citext.CICharField(max_length=64, primary_key=True, serialize=False, validators=[django.core.validators.EmailValidator()]), - ), - migrations.AlterField( - model_name='historicalemail', - name='address', - field=django.contrib.postgres.fields.citext.CICharField(db_index=True, max_length=64, validators=[django.core.validators.EmailValidator()]), - ), - ] diff --git a/ietf/redirects/migrations/0001_initial.py b/ietf/redirects/migrations/0001_initial.py new file mode 100644 index 000000000..09fd76880 --- /dev/null +++ b/ietf/redirects/migrations/0001_initial.py @@ -0,0 +1,50 @@ +# 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 = [ + ] + + operations = [ + migrations.CreateModel( + name='Redirect', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('cgi', models.CharField(blank=True, max_length=50, unique=True)), + ('url', models.CharField(max_length=255)), + ('rest', models.CharField(blank=True, max_length=100)), + ('remove', models.CharField(blank=True, max_length=50)), + ], + ), + migrations.CreateModel( + name='Suffix', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rest', models.CharField(blank=True, max_length=100)), + ('remove', models.CharField(blank=True, max_length=50)), + ], + options={ + 'verbose_name_plural': 'Suffixes', + }, + ), + migrations.CreateModel( + name='Command', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('command', models.CharField(max_length=50)), + ('url', models.CharField(blank=True, max_length=50)), + ('script', ietf.utils.models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, related_name='commands', to='redirects.Redirect')), + ('suffix', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='redirects.Suffix')), + ], + options={ + 'unique_together': {('script', 'command')}, + }, + ), + ] diff --git a/ietf/redirects/migrations/__init__.py b/ietf/redirects/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/ietf/review/migrations/0001_initial.py b/ietf/review/migrations/0001_initial.py index 5e7fde9ec..4fc32caee 100644 --- a/ietf/review/migrations/0001_initial.py +++ b/ietf/review/migrations/0001_initial.py @@ -1,14 +1,14 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 +# Generated by Django 2.2.28 on 2023-03-20 19:22 - -import datetime +from django.conf import settings from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone import ietf.review.models import ietf.utils.models +import ietf.utils.timezone import ietf.utils.validators +import simple_history.models class Migration(migrations.Migration): @@ -16,71 +16,37 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('group', '0001_initial'), ('name', '0001_initial'), ('person', '0001_initial'), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('group', '0001_initial'), ('doc', '0001_initial'), ] operations = [ migrations.CreateModel( - name='NextReviewerInTeam', + name='UnavailablePeriod', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('next_reviewer', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('team', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ], - options={ - 'verbose_name': 'next reviewer in team setting', - 'verbose_name_plural': 'next reviewer in team settings', - }, - ), - migrations.CreateModel( - name='ReviewerSettings', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('min_interval', models.IntegerField(blank=True, choices=[(7, 'Once per week'), (14, 'Once per fortnight'), (30, 'Once per month'), (61, 'Once per two months'), (91, 'Once per quarter')], null=True, verbose_name='Can review at most')), - ('filter_re', models.CharField(blank=True, help_text='Draft names matching this regular expression should not be assigned', max_length=255, validators=[ietf.utils.validators.RegexStringValidator()], verbose_name='Filter regexp')), - ('skip_next', models.IntegerField(default=0, verbose_name='Skip next assignments')), - ('remind_days_before_deadline', models.IntegerField(blank=True, help_text="To get an email reminder in case you forget to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want a reminder.", null=True)), - ('expertise', models.TextField(blank=True, default='', help_text="Describe the reviewer's expertise in this team's area", max_length=2048, verbose_name="Reviewer's expertise in this team's area")), + ('start_date', models.DateField(default=ietf.utils.timezone.date_today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away. The default is today.", null=True)), + ('end_date', models.DateField(blank=True, help_text='Leaving the end date blank means that the period continues indefinitely. You can end it later.', null=True)), + ('availability', models.CharField(choices=[('canfinish', 'Can do follow-ups'), ('unavailable', 'Completely unavailable')], max_length=30)), + ('reason', models.TextField(blank=True, default='', help_text="Provide (for the secretary's benefit) the reason why the review is unavailable", max_length=2048, verbose_name='Reason why reviewer is unavailable (Optional)')), ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('team', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ], - options={ - 'verbose_name_plural': 'reviewer settings', - }, - ), - migrations.CreateModel( - name='ReviewRequest', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('old_id', models.IntegerField(blank=True, help_text='ID in previous review system', null=True)), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('deadline', models.DateField()), - ('requested_rev', models.CharField(blank=True, help_text='Fill in if a specific revision is to be reviewed, e.g. 02', max_length=16, verbose_name='requested revision')), - ('comment', models.TextField(blank=True, default='', help_text='Provide any additional information to show to the review team secretary and reviewer', max_length=2048, verbose_name="Requester's comments and instructions")), - ('reviewed_rev', models.CharField(blank=True, max_length=16, verbose_name='reviewed revision')), - ('doc', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviewrequest_set', to='doc.Document')), - ('requested_by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('result', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='name.ReviewResultName')), - ('review', ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), - ('reviewer', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Email')), - ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ReviewRequestStateName')), - ('team', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ReviewTypeName')), + ('team', ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group')), ], ), migrations.CreateModel( - name='ReviewSecretarySettings', + name='ReviewWish', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('remind_days_before_deadline', models.IntegerField(blank=True, help_text="To get an email reminder in case a reviewer forgets to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want a reminder.", null=True)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), + ('doc', 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')), - ('team', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('team', ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group')), ], options={ - 'verbose_name_plural': 'review secretary settings', + 'verbose_name_plural': 'review wishes', }, ), migrations.CreateModel( @@ -88,9 +54,13 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('autosuggest', models.BooleanField(default=True, verbose_name='Automatically suggest possible review requests')), + ('secr_mail_alias', models.CharField(blank=True, help_text='Email alias for all of the review team secretaries', max_length=255, verbose_name='Email alias for all of the review team secretaries')), + ('remind_days_unconfirmed_assignments', models.PositiveIntegerField(blank=True, help_text="To send a periodic email reminder to reviewers of review assignments they have neither accepted nor rejected, enter the number of days between these reminders. Clear the field if you don't want these reminders to be sent.", null=True, verbose_name='Periodic reminder of not yet accepted or rejected review assignments to reviewer every X days')), ('group', ietf.utils.models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), - ('review_results', models.ManyToManyField(default=ietf.review.models.get_default_review_results, to='name.ReviewResultName')), + ('notify_ad_when', models.ManyToManyField(blank=True, related_name='reviewteamsettings_notify_ad_set', to='name.ReviewResultName')), + ('review_results', models.ManyToManyField(default=ietf.review.models.get_default_review_results, related_name='reviewteamsettings_review_results_set', to='name.ReviewResultName')), ('review_types', models.ManyToManyField(default=ietf.review.models.get_default_review_types, to='name.ReviewTypeName')), + ('reviewer_queue_policy', models.ForeignKey(default='RotateAlphabetically', on_delete=django.db.models.deletion.PROTECT, to='name.ReviewerQueuePolicyName')), ], options={ 'verbose_name': 'Review team settings', @@ -98,27 +68,186 @@ class Migration(migrations.Migration): }, ), migrations.CreateModel( - name='ReviewWish', + name='ReviewSecretarySettings', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('doc', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), + ('remind_days_before_deadline', models.IntegerField(blank=True, help_text="To get an email reminder in case a reviewer forgets to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want a reminder.", null=True)), + ('max_items_to_show_in_reviewer_list', models.IntegerField(blank=True, help_text='Maximum number of completed items to show for one reviewer in the reviewer list view, the list is also filtered by the days to show in reviews list setting.', null=True)), + ('days_to_show_in_reviewer_list', models.IntegerField(blank=True, help_text='Maximum number of days to show in reviewer list for completed items.', null=True)), ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('team', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('team', ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group')), ], options={ - 'verbose_name_plural': 'review wishes', + 'verbose_name_plural': 'review secretary settings', }, ), migrations.CreateModel( - name='UnavailablePeriod', + name='ReviewRequest', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('start_date', models.DateField(default=datetime.date.today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away.", null=True)), - ('end_date', models.DateField(blank=True, help_text='Leaving the end date blank means that the period continues indefinitely. You can end it later.', null=True)), - ('availability', models.CharField(choices=[('canfinish', 'Can do follow-ups'), ('unavailable', 'Completely unavailable')], max_length=30)), - ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ('team', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('time', models.DateTimeField(default=django.utils.timezone.now)), + ('deadline', models.DateField()), + ('requested_rev', models.CharField(blank=True, help_text='Fill in if a specific revision is to be reviewed, e.g. 02', max_length=16, verbose_name='requested revision')), + ('comment', models.TextField(blank=True, default='', help_text='Provide any additional information to show to the review team secretary and reviewer', max_length=2048, verbose_name="Requester's comments and instructions")), + ('doc', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviewrequest_set', to='doc.Document')), + ('requested_by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ReviewRequestStateName')), + ('team', ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ('type', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ReviewTypeName')), ], ), + migrations.CreateModel( + name='ReviewerSettings', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('min_interval', models.IntegerField(blank=True, choices=[(7, 'Once per week'), (14, 'Once per fortnight'), (30, 'Once per month'), (61, 'Once per two months'), (91, 'Once per quarter')], null=True, verbose_name='Can review at most')), + ('filter_re', models.CharField(blank=True, help_text='Internet-Draft names matching this regular expression should not be assigned', max_length=255, validators=[ietf.utils.validators.RegexStringValidator()], verbose_name='Filter regexp')), + ('skip_next', models.IntegerField(default=0, verbose_name='Skip next assignments')), + ('remind_days_before_deadline', models.IntegerField(blank=True, help_text="To get an email reminder in case you forget to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want this reminder.", null=True)), + ('remind_days_open_reviews', models.PositiveIntegerField(blank=True, help_text="To get a periodic email reminder of all your open reviews, enter the number of days between these reminders. Clear the field if you don't want these reminders.", null=True, verbose_name='Periodic reminder of open reviews every X days')), + ('request_assignment_next', models.BooleanField(default=False, help_text='If you would like to be assigned to a review as soon as possible, select this option. It is automatically reset once you receive any assignment.', verbose_name='Select me next for an assignment')), + ('expertise', models.TextField(blank=True, default='', help_text="Describe the reviewer's expertise in this team's area", max_length=2048, verbose_name="Reviewer's expertise in this team's area")), + ('person', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('team', ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ], + options={ + 'verbose_name_plural': 'reviewer settings', + }, + ), + migrations.CreateModel( + name='ReviewAssignment', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('assigned_on', models.DateTimeField(blank=True, null=True)), + ('completed_on', models.DateTimeField(blank=True, null=True)), + ('reviewed_rev', models.CharField(blank=True, max_length=16, verbose_name='reviewed revision')), + ('mailarch_url', models.URLField(blank=True, null=True)), + ('result', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='name.ReviewResultName')), + ('review', ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), + ('review_request', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='review.ReviewRequest')), + ('reviewer', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Email')), + ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ReviewAssignmentStateName')), + ], + ), + migrations.CreateModel( + name='NextReviewerInTeam', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('next_reviewer', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('team', ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group')), + ], + options={ + 'verbose_name': 'next reviewer in team setting', + 'verbose_name_plural': 'next reviewer in team settings', + }, + ), + migrations.CreateModel( + name='HistoricalUnavailablePeriod', + fields=[ + ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('history_change_reason', models.TextField(null=True)), + ('start_date', models.DateField(default=ietf.utils.timezone.date_today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away. The default is today.", null=True)), + ('end_date', models.DateField(blank=True, help_text='Leaving the end date blank means that the period continues indefinitely. You can end it later.', null=True)), + ('availability', models.CharField(choices=[('canfinish', 'Can do follow-ups'), ('unavailable', 'Completely unavailable')], max_length=30)), + ('reason', models.TextField(blank=True, default='', help_text="Provide (for the secretary's benefit) the reason why the review is unavailable", max_length=2048, verbose_name='Reason why reviewer is unavailable (Optional)')), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField(db_index=True)), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('person', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Person')), + ('team', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group')), + ], + options={ + 'verbose_name': 'historical unavailable period', + 'verbose_name_plural': 'historical unavailable periods', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': ('history_date', 'history_id'), + }, + bases=(simple_history.models.HistoricalChanges, models.Model), + ), + migrations.CreateModel( + name='HistoricalReviewRequest', + fields=[ + ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('history_change_reason', models.TextField(null=True)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), + ('deadline', models.DateField()), + ('requested_rev', models.CharField(blank=True, help_text='Fill in if a specific revision is to be reviewed, e.g. 02', max_length=16, verbose_name='requested revision')), + ('comment', models.TextField(blank=True, default='', help_text='Provide any additional information to show to the review team secretary and reviewer', max_length=2048, verbose_name="Requester's comments and instructions")), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField(db_index=True)), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('doc', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='doc.Document')), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('requested_by', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Person')), + ('state', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.ReviewRequestStateName')), + ('team', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group')), + ('type', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.ReviewTypeName')), + ], + options={ + 'verbose_name': 'historical review request', + 'verbose_name_plural': 'historical review requests', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': ('history_date', 'history_id'), + }, + bases=(simple_history.models.HistoricalChanges, models.Model), + ), + migrations.CreateModel( + name='HistoricalReviewerSettings', + fields=[ + ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('history_change_reason', models.TextField(null=True)), + ('min_interval', models.IntegerField(blank=True, choices=[(7, 'Once per week'), (14, 'Once per fortnight'), (30, 'Once per month'), (61, 'Once per two months'), (91, 'Once per quarter')], null=True, verbose_name='Can review at most')), + ('filter_re', models.CharField(blank=True, help_text='Internet-Draft names matching this regular expression should not be assigned', max_length=255, validators=[ietf.utils.validators.RegexStringValidator()], verbose_name='Filter regexp')), + ('skip_next', models.IntegerField(default=0, verbose_name='Skip next assignments')), + ('remind_days_before_deadline', models.IntegerField(blank=True, help_text="To get an email reminder in case you forget to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want this reminder.", null=True)), + ('remind_days_open_reviews', models.PositiveIntegerField(blank=True, help_text="To get a periodic email reminder of all your open reviews, enter the number of days between these reminders. Clear the field if you don't want these reminders.", null=True, verbose_name='Periodic reminder of open reviews every X days')), + ('request_assignment_next', models.BooleanField(default=False, help_text='If you would like to be assigned to a review as soon as possible, select this option. It is automatically reset once you receive any assignment.', verbose_name='Select me next for an assignment')), + ('expertise', models.TextField(blank=True, default='', help_text="Describe the reviewer's expertise in this team's area", max_length=2048, verbose_name="Reviewer's expertise in this team's area")), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField(db_index=True)), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('person', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Person')), + ('team', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group')), + ], + options={ + 'verbose_name': 'historical reviewer settings', + 'verbose_name_plural': 'historical reviewer settings', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': ('history_date', 'history_id'), + }, + bases=(simple_history.models.HistoricalChanges, models.Model), + ), + migrations.CreateModel( + name='HistoricalReviewAssignment', + fields=[ + ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), + ('history_change_reason', models.TextField(null=True)), + ('assigned_on', models.DateTimeField(blank=True, null=True)), + ('completed_on', models.DateTimeField(blank=True, null=True)), + ('reviewed_rev', models.CharField(blank=True, max_length=16, verbose_name='reviewed revision')), + ('mailarch_url', models.URLField(blank=True, null=True)), + ('history_id', models.AutoField(primary_key=True, serialize=False)), + ('history_date', models.DateTimeField(db_index=True)), + ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), + ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), + ('result', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.ReviewResultName')), + ('review', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='doc.Document')), + ('review_request', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='review.ReviewRequest')), + ('reviewer', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Email')), + ('state', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.ReviewAssignmentStateName')), + ], + options={ + 'verbose_name': 'historical review assignment', + 'verbose_name_plural': 'historical review assignments', + 'ordering': ('-history_date', '-history_id'), + 'get_latest_by': ('history_date', 'history_id'), + }, + bases=(simple_history.models.HistoricalChanges, models.Model), + ), + migrations.AddConstraint( + model_name='reviewersettings', + constraint=models.UniqueConstraint(fields=('team', 'person'), name='unique_reviewer_settings_per_team_person'), + ), ] diff --git a/ietf/review/migrations/0002_unavailableperiod_reason.py b/ietf/review/migrations/0002_unavailableperiod_reason.py deleted file mode 100644 index e4c81ad7c..000000000 --- a/ietf/review/migrations/0002_unavailableperiod_reason.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.14 on 2018-07-23 15:11 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='unavailableperiod', - name='reason', - field=models.TextField(blank=True, default='', help_text="Provide (for the secretary's benefit) the reason why the review is unavailable", max_length=2048, verbose_name='Reason why reviewer is unavailable (Optional)'), - ), - ] diff --git a/ietf/review/migrations/0003_add_notify_ad_when.py b/ietf/review/migrations/0003_add_notify_ad_when.py deleted file mode 100644 index 78e0d7959..000000000 --- a/ietf/review/migrations/0003_add_notify_ad_when.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-11-02 10:10 - - -from django.db import migrations, models -import ietf.review.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0004_add_prefix_to_doctypenames'), - ('review', '0002_unavailableperiod_reason'), - ] - - operations = [ - migrations.AddField( - model_name='reviewteamsettings', - name='notify_ad_when', - field=models.ManyToManyField(related_name='reviewteamsettings_notify_ad_set', to='name.ReviewResultName'), - ), - migrations.AlterField( - model_name='reviewteamsettings', - name='review_results', - field=models.ManyToManyField(default=ietf.review.models.get_default_review_results, related_name='reviewteamsettings_review_results_set', to='name.ReviewResultName'), - ), - ] diff --git a/ietf/review/migrations/0004_reviewteamsettings_secr_mail_alias.py b/ietf/review/migrations/0004_reviewteamsettings_secr_mail_alias.py deleted file mode 100644 index 96fb0ba1c..000000000 --- a/ietf/review/migrations/0004_reviewteamsettings_secr_mail_alias.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-11-03 03:10 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0003_add_notify_ad_when'), - ] - - operations = [ - migrations.AddField( - model_name='reviewteamsettings', - name='secr_mail_alias', - field=models.CharField(blank=True, help_text='Email alias for all of the review team secretaries', max_length=255, verbose_name='Email alias for all of the review team secretaries'), - ), - ] diff --git a/ietf/review/migrations/0005_set_secdir_notify_ad_when.py b/ietf/review/migrations/0005_set_secdir_notify_ad_when.py deleted file mode 100644 index 66b768a50..000000000 --- a/ietf/review/migrations/0005_set_secdir_notify_ad_when.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-11-02 10:20 - - -from django.db import migrations - -def forward(apps, schema_editor): - ReviewTeamSettings = apps.get_model('review','ReviewTeamSettings') - ReviewTeamSettings.objects.get(group__acronym='secdir').notify_ad_when.set(['serious-issues', 'issues', 'not-ready']) - -def reverse(apps, schema_editor): - ReviewTeamSettings = apps.get_model('review','ReviewTeamSettings') - ReviewTeamSettings.objects.get(group__acronym='secdir').notify_ad_when.set([]) - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0004_reviewteamsettings_secr_mail_alias'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/review/migrations/0006_historicalreviewersettings.py b/ietf/review/migrations/0006_historicalreviewersettings.py deleted file mode 100644 index 4129ab409..000000000 --- a/ietf/review/migrations/0006_historicalreviewersettings.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.16 on 2018-11-09 08:31 - - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models -import ietf.utils.validators -import simple_history.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('group', '0003_groupfeatures_data'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('person', '0008_auto_20181014_1448'), - ('review', '0005_set_secdir_notify_ad_when'), - ] - - operations = [ - migrations.CreateModel( - name='HistoricalReviewerSettings', - fields=[ - ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), - ('min_interval', models.IntegerField(blank=True, choices=[(7, 'Once per week'), (14, 'Once per fortnight'), (30, 'Once per month'), (61, 'Once per two months'), (91, 'Once per quarter')], null=True, verbose_name='Can review at most')), - ('filter_re', models.CharField(blank=True, help_text='Draft names matching this regular expression should not be assigned', max_length=255, validators=[ietf.utils.validators.RegexStringValidator()], verbose_name='Filter regexp')), - ('skip_next', models.IntegerField(default=0, verbose_name='Skip next assignments')), - ('remind_days_before_deadline', models.IntegerField(blank=True, help_text="To get an email reminder in case you forget to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want a reminder.", null=True)), - ('expertise', models.TextField(blank=True, default='', help_text="Describe the reviewer's expertise in this team's area", max_length=2048, verbose_name="Reviewer's expertise in this team's area")), - ('history_id', models.AutoField(primary_key=True, serialize=False)), - ('history_change_reason', models.CharField(max_length=100, null=True)), - ('history_date', models.DateTimeField()), - ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), - ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), - ('person', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Person')), - ('team', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group')), - ], - options={ - 'ordering': ('-history_date', '-history_id'), - 'get_latest_by': 'history_date', - 'verbose_name': 'historical reviewer settings', - }, - bases=(simple_history.models.HistoricalChanges, models.Model), - ), - ] diff --git a/ietf/review/migrations/0007_allow_notify_ad_when_to_be_blank.py b/ietf/review/migrations/0007_allow_notify_ad_when_to_be_blank.py deleted file mode 100644 index 11da10b36..000000000 --- a/ietf/review/migrations/0007_allow_notify_ad_when_to_be_blank.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.17 on 2018-12-06 13:16 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0006_historicalreviewersettings'), - ] - - operations = [ - migrations.AlterField( - model_name='reviewteamsettings', - name='notify_ad_when', - field=models.ManyToManyField(blank=True, related_name='reviewteamsettings_notify_ad_set', to='name.ReviewResultName'), - ), - ] diff --git a/ietf/review/migrations/0008_remove_reviewrequest_old_id.py b/ietf/review/migrations/0008_remove_reviewrequest_old_id.py deleted file mode 100644 index 7f3e0b24c..000000000 --- a/ietf/review/migrations/0008_remove_reviewrequest_old_id.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.17 on 2019-01-03 12:34 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0007_allow_notify_ad_when_to_be_blank'), - ] - - operations = [ - migrations.RemoveField( - model_name='reviewrequest', - name='old_id', - ), - ] diff --git a/ietf/review/migrations/0009_refactor_review_request.py b/ietf/review/migrations/0009_refactor_review_request.py deleted file mode 100644 index d3b22e138..000000000 --- a/ietf/review/migrations/0009_refactor_review_request.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.18 on 2019-01-04 14:27 - - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0009_move_non_url_externalurls_to_uploaded_filename'), - ('name', '0005_reviewassignmentstatename'), - ('person', '0008_auto_20181014_1448'), - ('review', '0008_remove_reviewrequest_old_id'), - ] - - operations = [ - migrations.CreateModel( - name='ReviewAssignment', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('assigned_on', models.DateTimeField(blank=True, null=True)), - ('completed_on', models.DateTimeField(blank=True, null=True)), - ('reviewed_rev', models.CharField(blank=True, max_length=16, verbose_name='reviewed revision')), - ('mailarch_url', models.URLField(blank=True, null=True)), - ('result', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='name.ReviewResultName')), - ('review', ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), - ], - ), - migrations.RenameField( - model_name='reviewrequest', - old_name='result', - new_name='unused_result', - ), - migrations.RenameField( - model_name='reviewrequest', - old_name='review', - new_name='unused_review', - ), - migrations.RenameField( - model_name='reviewrequest', - old_name='reviewed_rev', - new_name='unused_reviewed_rev', - ), - migrations.RenameField( - model_name='reviewrequest', - old_name='reviewer', - new_name='unused_reviewer', - ), - migrations.AddField( - model_name='reviewassignment', - name='review_request', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='review.ReviewRequest'), - ), - migrations.AddField( - model_name='reviewassignment', - name='reviewer', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Email'), - ), - migrations.AddField( - model_name='reviewassignment', - name='state', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ReviewAssignmentStateName'), - ), - ] diff --git a/ietf/review/migrations/0010_populate_review_assignments.py b/ietf/review/migrations/0010_populate_review_assignments.py deleted file mode 100644 index 83f87325b..000000000 --- a/ietf/review/migrations/0010_populate_review_assignments.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.18 on 2019-01-04 14:34 - - -import sys - -from tqdm import tqdm - -from django.db import migrations - -def assigned_time(model, request): - e = model.objects.filter(doc=request.doc, type="assigned_review_request", review_request=request).order_by('-time', '-id').first() - return e.time if e and e.time else None - -def done_time(model, request): - if request.unused_review and request.unused_review.time: - return request.unused_review.time - e = model.objects.filter(doc=request.doc, type="closed_review_request", review_request=request).order_by('-time', '-id').first() - time = e.time if e and e.time else None - return time if time else request.time - -def map_request_state_to_assignment_state(req_state_id): - if req_state_id == 'requested': - return 'assigned' - elif req_state_id in ('no-review-document', 'no-review-version'): - return 'withdrawn' - else: - return req_state_id - -def forward(apps, schema_editor): - ReviewRequest = apps.get_model('review', 'ReviewRequest') - ReviewAssignment = apps.get_model('review', 'ReviewAssignment') - Document = apps.get_model('doc', 'Document') - ReviewRequestDocEvent = apps.get_model('doc','ReviewRequestDocEvent') - ReviewAssignmentDocEvent = apps.get_model('doc','ReviewAssignmentDocEvent') - - sys.stderr.write('\n') # introduce a newline before tqdm starts writing - for request in tqdm(ReviewRequest.objects.exclude(unused_reviewer__isnull=True)): - assignment_state = map_request_state_to_assignment_state(request.state_id) - if not (assignment_state in ('assigned', 'accepted', 'completed', 'no-response', 'overtaken', 'part-completed', 'rejected', 'withdrawn', 'unknown')): - print(("Trouble with review_request",request.pk,"with state",request.state_id)) - exit(-1) - ReviewAssignment.objects.create( - review_request = request, - state_id = assignment_state, - reviewer = request.unused_reviewer, - assigned_on = assigned_time(ReviewRequestDocEvent, request), - completed_on = done_time(ReviewRequestDocEvent, request), - review = request.unused_review, - reviewed_rev = request.unused_reviewed_rev, - result = request.unused_result, - mailarch_url = request.unused_review and request.unused_review.external_url, - ) - Document.objects.filter(type_id='review').update(external_url='') - ReviewRequest.objects.filter(state_id__in=('accepted', 'rejected', 'no-response', 'part-completed', 'completed', 'unknown')).update(state_id='assigned') - ReviewRequest.objects.filter(state_id='requested',unused_reviewer__isnull=False).update(state_id='assigned') - - for req_event in tqdm(ReviewRequestDocEvent.objects.filter(type="assigned_review_request",review_request__unused_reviewer__isnull=False)): - ReviewAssignmentDocEvent.objects.create( - time = req_event.time, - type = req_event.type, - by = req_event.by, - doc = req_event.doc, - rev = req_event.rev, - desc = req_event.desc, - review_assignment = req_event.review_request.reviewassignment_set.first(), - state_id = 'assigned' - ) - - for req_event in tqdm(ReviewRequestDocEvent.objects.filter(type="closed_review_request", - state_id__in=('completed', 'no-response', 'part-completed', 'rejected', 'unknown', 'withdrawn'), - review_request__unused_reviewer__isnull=False)): - ReviewAssignmentDocEvent.objects.create( - time = req_event.time, - type = req_event.type, - by = req_event.by, - doc = req_event.doc, - rev = req_event.rev, - desc = req_event.desc, - review_assignment = req_event.review_request.reviewassignment_set.first(), - state_id = req_event.state_id - ) - - ReviewRequestDocEvent.objects.filter(type="closed_review_request", - state_id__in=('completed', 'no-response', 'part-completed', 'rejected', 'unknown', 'withdrawn'), - review_request__unused_reviewer__isnull=False).delete() - - -def reverse(apps, schema_editor): - ReviewAssignment = apps.get_model('review', 'ReviewAssignment') - ReviewRequestDocEvent = apps.get_model('doc','ReviewRequestDocEvent') - ReviewAssignmentDocEvent = apps.get_model('doc','ReviewAssignmentDocEvent') - - sys.stderr.write('\n') - for assignment in tqdm(ReviewAssignment.objects.all()): - if assignment.review_request.unused_review: - assignment.review_request.unused_review.external_url = assignment.mailarch_url - assignment.review_request.unused_review.save() - assignment.review_request.state_id = assignment.state_id - assignment.review_request.save() - - for asgn_event in tqdm(ReviewAssignmentDocEvent.objects.filter(state_id__in=('completed', 'no-response', 'part-completed', 'rejected', 'unknown', 'withdrawn'))): - ReviewRequestDocEvent.objects.create( - time = asgn_event.time, - type = asgn_event.type, - by = asgn_event.by, - doc = asgn_event.doc, - rev = asgn_event.rev, - desc = asgn_event.desc, - review_request = asgn_event.review_assignment.review_request, - state_id = asgn_event.state_id - ) - ReviewAssignmentDocEvent.objects.all().delete() - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0009_refactor_review_request'), - ('doc','0011_reviewassignmentdocevent') - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/review/migrations/0011_review_document2_fk.py b/ietf/review/migrations/0011_review_document2_fk.py deleted file mode 100644 index 1fca4fd4e..000000000 --- a/ietf/review/migrations/0011_review_document2_fk.py +++ /dev/null @@ -1,59 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 11:58 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0015_1_add_fk_to_document_id'), - ('review', '0010_populate_review_assignments'), - ] - - operations = [ - migrations.AddField( - model_name='reviewrequest', - name='doc2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='reviewrequest_set', to='doc.Document', to_field=b'id'), - ), - migrations.AddField( - model_name='reviewwish', - name='doc2', - field=ietf.utils.models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field=b'id'), - ), - migrations.AddField( - model_name='reviewrequest', - name='unused_review2', - field=ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='id'), - ), - migrations.AddField( - model_name='reviewassignment', - name='review2', - field=ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='id'), - ), - migrations.AlterField( - model_name='reviewrequest', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_revreq', to='doc.Document', to_field=b'name'), - ), - migrations.AlterField( - model_name='reviewwish', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='old_revwish', to='doc.Document', to_field=b'name'), - ), - migrations.AlterField( - model_name='reviewrequest', - name='unused_review', - field=ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='old_unused_review', to='doc.Document', to_field=b'name'), - ), - migrations.AlterField( - model_name='reviewassignment', - name='review', - field=ietf.utils.models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='old_reviewassignment', to='doc.Document', to_field=b'name'), - ), - ] diff --git a/ietf/review/migrations/0012_remove_old_document_field.py b/ietf/review/migrations/0012_remove_old_document_field.py deleted file mode 100644 index 2c5b5c277..000000000 --- a/ietf/review/migrations/0012_remove_old_document_field.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-20 09:53 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0011_review_document2_fk'), - ] - - operations = [ - migrations.RemoveField( - model_name='reviewrequest', - name='doc', - ), - migrations.RemoveField( - model_name='reviewrequest', - name='unused_reviewer', - ), - migrations.RemoveField( - model_name='reviewrequest', - name='unused_review', - ), - migrations.RemoveField( - model_name='reviewrequest', - name='unused_review2', - ), - migrations.RemoveField( - model_name='reviewrequest', - name='unused_reviewed_rev', - ), - migrations.RemoveField( - model_name='reviewrequest', - name='unused_result', - ), - migrations.RemoveField( - model_name='reviewwish', - name='doc', - ), - migrations.RemoveField( - model_name='reviewassignment', - name='review', - ), - ] diff --git a/ietf/review/migrations/0013_rename_field_document2.py b/ietf/review/migrations/0013_rename_field_document2.py deleted file mode 100644 index 0577b0d31..000000000 --- a/ietf/review/migrations/0013_rename_field_document2.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-21 05:31 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0019_rename_field_document2'), - ('review', '0012_remove_old_document_field'), - ] - - operations = [ - migrations.RenameField( - model_name='reviewrequest', - old_name='doc2', - new_name='doc', - ), - migrations.RenameField( - model_name='reviewwish', - old_name='doc2', - new_name='doc', - ), - migrations.RenameField( - model_name='reviewassignment', - old_name='review2', - new_name='review', - ), - ] diff --git a/ietf/review/migrations/0014_document_primary_key_cleanup.py b/ietf/review/migrations/0014_document_primary_key_cleanup.py deleted file mode 100644 index 20c28ace6..000000000 --- a/ietf/review/migrations/0014_document_primary_key_cleanup.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-06-10 03:47 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0013_rename_field_document2'), - ] - - operations = [ - migrations.AlterField( - model_name='reviewrequest', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reviewrequest_set', to='doc.Document'), - ), - migrations.AlterField( - model_name='reviewwish', - name='doc', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='doc.Document'), - ), - ] diff --git a/ietf/review/migrations/0015_populate_completed_on_for_rejected.py b/ietf/review/migrations/0015_populate_completed_on_for_rejected.py deleted file mode 100644 index feed8ea1c..000000000 --- a/ietf/review/migrations/0015_populate_completed_on_for_rejected.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.24 on 2019-09-30 08:17 - - -from django.db import migrations - -def forward(apps, schema_editor): - ReviewAssignmentDocEvent = apps.get_model('doc','ReviewAssignmentDocEvent') - for event in ReviewAssignmentDocEvent.objects.filter(type="closed_review_assignment",state_id='rejected',review_assignment__completed_on__isnull=True): - event.review_assignment.completed_on = event.time - event.review_assignment.save() - - -def reverse(apps, schema_editor): - # There's no harm in leaving the newly set completed_on values even if this is rolled back - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0014_document_primary_key_cleanup'), - ('doc', '0026_add_draft_rfceditor_state'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/review/migrations/0016_add_remind_days_open_reviews.py b/ietf/review/migrations/0016_add_remind_days_open_reviews.py deleted file mode 100644 index 57e991147..000000000 --- a/ietf/review/migrations/0016_add_remind_days_open_reviews.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.23 on 2019-09-05 05:03 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0015_populate_completed_on_for_rejected'), - ] - - operations = [ - migrations.AddField( - model_name='historicalreviewersettings', - name='remind_days_open_reviews', - field=models.PositiveIntegerField(blank=True, name="Periodic reminder of open reviews every X days", help_text="To get a periodic email reminder of all your open reviews, enter the number of days between these reminders. Clear the field if you don't want these reminders.", null=True), - ), - migrations.AddField( - model_name='reviewersettings', - name='remind_days_open_reviews', - field=models.PositiveIntegerField(blank=True, verbose_name="Periodic reminder of open reviews every X days", help_text="To get a periodic email reminder of all your open reviews, enter the number of days between these reminders. Clear the field if you don't want these reminders.", null=True), - ), - ] diff --git a/ietf/review/migrations/0017_add_review_team_remind_days_unconfirmed_assignments.py b/ietf/review/migrations/0017_add_review_team_remind_days_unconfirmed_assignments.py deleted file mode 100644 index af48a4243..000000000 --- a/ietf/review/migrations/0017_add_review_team_remind_days_unconfirmed_assignments.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.23 on 2019-10-01 04:40 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0016_add_remind_days_open_reviews'), - ] - - operations = [ - migrations.AddField( - model_name='reviewteamsettings', - name='remind_days_unconfirmed_assignments', - field=models.PositiveIntegerField(blank=True, help_text="To send a periodic email reminder to reviewers of review assignments that are not accepted yet, enter the number of days between these reminders. Clear the field if you don't want these reminders to be sent.", null=True, verbose_name='Periodic reminder of not yet accepted or rejected review assignments to reviewer every X days'), - ), - - ] diff --git a/ietf/review/migrations/0018_auto_20191015_1014.py b/ietf/review/migrations/0018_auto_20191015_1014.py deleted file mode 100644 index f61c75502..000000000 --- a/ietf/review/migrations/0018_auto_20191015_1014.py +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-15 10:14 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0017_add_review_team_remind_days_unconfirmed_assignments'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalreviewersettings', - name='remind_days_before_deadline', - field=models.IntegerField(blank=True, help_text="To get an email reminder in case you forget to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want this reminder.", null=True), - ), - migrations.AlterField( - model_name='historicalreviewersettings', - name='remind_days_open_reviews', - field=models.PositiveIntegerField(blank=True, help_text="To get a periodic email reminder of all your open reviews, enter the number of days between these reminders. Clear the field if you don't want these reminders.", null=True, verbose_name='Periodic reminder of open reviews every X days'), - ), - migrations.AlterField( - model_name='reviewersettings', - name='remind_days_before_deadline', - field=models.IntegerField(blank=True, help_text="To get an email reminder in case you forget to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want this reminder.", null=True), - ), - migrations.AlterField( - model_name='reviewteamsettings', - name='remind_days_unconfirmed_assignments', - field=models.PositiveIntegerField(blank=True, help_text="To send a periodic email reminder to reviewers of review assignments they have neither accepted nor rejected, enter the number of days between these reminders. Clear the field if you don't want these reminders to be sent.", null=True, verbose_name='Periodic reminder of not yet accepted or rejected review assignments to reviewer every X days'), - ), - ] diff --git a/ietf/review/migrations/0019_auto_20191023_0829.py b/ietf/review/migrations/0019_auto_20191023_0829.py deleted file mode 100644 index c5e84573c..000000000 --- a/ietf/review/migrations/0019_auto_20191023_0829.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.25 on 2019-10-23 08:29 - - -import datetime -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0018_auto_20191015_1014'), - ] - - operations = [ - migrations.AlterField( - model_name='unavailableperiod', - name='start_date', - field=models.DateField(default=datetime.date.today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away. The default is today.", null=True), - ), - ] diff --git a/ietf/review/migrations/0020_auto_20191115_2059.py b/ietf/review/migrations/0020_auto_20191115_2059.py deleted file mode 100644 index 025e3d2d3..000000000 --- a/ietf/review/migrations/0020_auto_20191115_2059.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.26 on 2019-11-15 20:59 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0019_auto_20191023_0829'), - ] - - operations = [ - migrations.AddField( - model_name='reviewsecretarysettings', - name='days_to_show_in_reviewer_list', - field=models.IntegerField(blank=True, help_text='Maximum number of days to show in reviewer list for completed items.', null=True), - ), - migrations.AddField( - model_name='reviewsecretarysettings', - name='max_items_to_show_in_reviewer_list', - field=models.IntegerField(blank=True, help_text='Maximum number of completed items to show for one reviewer in the reviewer list view, the list is also filtered by the days to show in reviews list setting.', null=True), - ), - ] diff --git a/ietf/review/migrations/0021_add_additional_history.py b/ietf/review/migrations/0021_add_additional_history.py deleted file mode 100644 index 58dc709ec..000000000 --- a/ietf/review/migrations/0021_add_additional_history.py +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.23 on 2019-11-19 04:36 - - -import datetime -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models -import ietf.utils.validators -import simple_history.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('person', '0009_auto_20190118_0725'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('doc', '0026_add_draft_rfceditor_state'), - ('name', '0007_fix_m2m_slug_id_length'), - ('group', '0019_rename_field_document2'), - ('review', '0020_auto_20191115_2059'), - ] - - operations = [ - migrations.CreateModel( - name='HistoricalReviewAssignment', - fields=[ - ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), - ('history_change_reason', models.TextField(null=True)), - ('assigned_on', models.DateTimeField(blank=True, null=True)), - ('completed_on', models.DateTimeField(blank=True, null=True)), - ('reviewed_rev', models.CharField(blank=True, max_length=16, verbose_name='reviewed revision')), - ('mailarch_url', models.URLField(blank=True, null=True)), - ('history_id', models.AutoField(primary_key=True, serialize=False)), - ('history_date', models.DateTimeField()), - ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), - ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), - ('result', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.ReviewResultName')), - ('review', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='doc.Document')), - ], - options={ - 'verbose_name': 'historical review assignment', - 'ordering': ('-history_date', '-history_id'), - 'get_latest_by': 'history_date', - }, - bases=(simple_history.models.HistoricalChanges, models.Model), - ), - migrations.CreateModel( - name='HistoricalReviewRequest', - fields=[ - ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), - ('history_change_reason', models.TextField(null=True)), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('deadline', models.DateField()), - ('requested_rev', models.CharField(blank=True, help_text='Fill in if a specific revision is to be reviewed, e.g. 02', max_length=16, verbose_name='requested revision')), - ('comment', models.TextField(blank=True, default='', help_text='Provide any additional information to show to the review team secretary and reviewer', max_length=2048, verbose_name="Requester's comments and instructions")), - ('history_id', models.AutoField(primary_key=True, serialize=False)), - ('history_date', models.DateTimeField()), - ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), - ('doc', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='doc.Document')), - ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), - ('requested_by', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Person')), - ('state', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.ReviewRequestStateName')), - ('team', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group')), - ('type', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.ReviewTypeName')), - ], - options={ - 'verbose_name': 'historical review request', - 'ordering': ('-history_date', '-history_id'), - 'get_latest_by': 'history_date', - }, - bases=(simple_history.models.HistoricalChanges, models.Model), - ), - migrations.CreateModel( - name='HistoricalUnavailablePeriod', - fields=[ - ('id', models.IntegerField(auto_created=True, blank=True, db_index=True, verbose_name='ID')), - ('history_change_reason', models.TextField(null=True)), - ('start_date', models.DateField(default=datetime.date.today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away. The default is today.", null=True)), - ('end_date', models.DateField(blank=True, help_text='Leaving the end date blank means that the period continues indefinitely. You can end it later.', null=True)), - ('availability', models.CharField(choices=[('canfinish', 'Can do follow-ups'), ('unavailable', 'Completely unavailable')], max_length=30)), - ('reason', models.TextField(blank=True, default='', help_text="Provide (for the secretary's benefit) the reason why the review is unavailable", max_length=2048, verbose_name='Reason why reviewer is unavailable (Optional)')), - ('history_id', models.AutoField(primary_key=True, serialize=False)), - ('history_date', models.DateTimeField()), - ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)), - ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)), - ('person', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Person')), - ('team', ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group')), - ], - options={ - 'verbose_name': 'historical unavailable period', - 'ordering': ('-history_date', '-history_id'), - 'get_latest_by': 'history_date', - }, - bases=(simple_history.models.HistoricalChanges, models.Model), - ), - migrations.AlterField( - model_name='historicalreviewersettings', - name='expertise', - field=models.TextField(blank=True, default='', help_text="Describe the reviewer's expertise in this team's area", max_length=2048, verbose_name="Reviewer's expertise in this team's area"), - ), - migrations.AlterField( - model_name='historicalreviewersettings', - name='filter_re', - field=models.CharField(blank=True, help_text='Draft names matching this regular expression should not be assigned', max_length=255, validators=[ietf.utils.validators.RegexStringValidator()], verbose_name='Filter regexp'), - ), - migrations.AlterField( - model_name='historicalreviewersettings', - name='min_interval', - field=models.IntegerField(blank=True, choices=[(7, 'Once per week'), (14, 'Once per fortnight'), (30, 'Once per month'), (61, 'Once per two months'), (91, 'Once per quarter')], null=True, verbose_name='Can review at most'), - ), - migrations.AlterField( - model_name='historicalreviewersettings', - name='remind_days_before_deadline', - field=models.IntegerField(blank=True, help_text="To get an email reminder in case you forget to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want this reminder.", null=True), - ), - migrations.AlterField( - model_name='historicalreviewersettings', - name='remind_days_open_reviews', - field=models.PositiveIntegerField(blank=True, help_text="To get a periodic email reminder of all your open reviews, enter the number of days between these reminders. Clear the field if you don't want these reminders.", null=True, verbose_name='Periodic reminder of open reviews every X days'), - ), - migrations.AlterField( - model_name='historicalreviewersettings', - name='skip_next', - field=models.IntegerField(default=0, verbose_name='Skip next assignments'), - ), - migrations.AlterField( - model_name='reviewassignment', - name='reviewed_rev', - field=models.CharField(blank=True, max_length=16, verbose_name='reviewed revision'), - ), - migrations.AlterField( - model_name='reviewersettings', - name='expertise', - field=models.TextField(blank=True, default='', help_text="Describe the reviewer's expertise in this team's area", max_length=2048, verbose_name="Reviewer's expertise in this team's area"), - ), - migrations.AlterField( - model_name='reviewersettings', - name='filter_re', - field=models.CharField(blank=True, help_text='Draft names matching this regular expression should not be assigned', max_length=255, validators=[ietf.utils.validators.RegexStringValidator()], verbose_name='Filter regexp'), - ), - migrations.AlterField( - model_name='reviewersettings', - name='min_interval', - field=models.IntegerField(blank=True, choices=[(7, 'Once per week'), (14, 'Once per fortnight'), (30, 'Once per month'), (61, 'Once per two months'), (91, 'Once per quarter')], null=True, verbose_name='Can review at most'), - ), - migrations.AlterField( - model_name='reviewersettings', - name='remind_days_before_deadline', - field=models.IntegerField(blank=True, help_text="To get an email reminder in case you forget to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want this reminder.", null=True), - ), - migrations.AlterField( - model_name='reviewersettings', - name='skip_next', - field=models.IntegerField(default=0, verbose_name='Skip next assignments'), - ), - migrations.AlterField( - model_name='reviewrequest', - name='comment', - field=models.TextField(blank=True, default='', help_text='Provide any additional information to show to the review team secretary and reviewer', max_length=2048, verbose_name="Requester's comments and instructions"), - ), - migrations.AlterField( - model_name='reviewrequest', - name='requested_rev', - field=models.CharField(blank=True, help_text='Fill in if a specific revision is to be reviewed, e.g. 02', max_length=16, verbose_name='requested revision'), - ), - migrations.AlterField( - model_name='reviewsecretarysettings', - name='remind_days_before_deadline', - field=models.IntegerField(blank=True, help_text="To get an email reminder in case a reviewer forgets to do an assigned review, enter the number of days before review deadline you want to receive it. Clear the field if you don't want a reminder.", null=True), - ), - migrations.AlterField( - model_name='reviewteamsettings', - name='autosuggest', - field=models.BooleanField(default=True, verbose_name='Automatically suggest possible review requests'), - ), - migrations.AlterField( - model_name='reviewteamsettings', - name='remind_days_unconfirmed_assignments', - field=models.PositiveIntegerField(blank=True, help_text="To send a periodic email reminder to reviewers of review assignments they have neither accepted nor rejected, enter the number of days between these reminders. Clear the field if you don't want these reminders to be sent.", null=True, verbose_name='Periodic reminder of not yet accepted or rejected review assignments to reviewer every X days'), - ), - migrations.AlterField( - model_name='reviewteamsettings', - name='secr_mail_alias', - field=models.CharField(blank=True, help_text='Email alias for all of the review team secretaries', max_length=255, verbose_name='Email alias for all of the review team secretaries'), - ), - migrations.AlterField( - model_name='unavailableperiod', - name='availability', - field=models.CharField(choices=[('canfinish', 'Can do follow-ups'), ('unavailable', 'Completely unavailable')], max_length=30), - ), - migrations.AlterField( - model_name='unavailableperiod', - name='end_date', - field=models.DateField(blank=True, help_text='Leaving the end date blank means that the period continues indefinitely. You can end it later.', null=True), - ), - migrations.AlterField( - model_name='unavailableperiod', - name='reason', - field=models.TextField(blank=True, default='', help_text="Provide (for the secretary's benefit) the reason why the review is unavailable", max_length=2048, verbose_name='Reason why reviewer is unavailable (Optional)'), - ), - migrations.AlterField( - model_name='unavailableperiod', - name='start_date', - field=models.DateField(default=datetime.date.today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away. The default is today.", null=True), - ), - migrations.AddField( - model_name='historicalreviewassignment', - name='review_request', - field=ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='review.ReviewRequest'), - ), - migrations.AddField( - model_name='historicalreviewassignment', - name='reviewer', - field=ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='person.Email'), - ), - migrations.AddField( - model_name='historicalreviewassignment', - name='state', - field=ietf.utils.models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='name.ReviewAssignmentStateName'), - ), - ] diff --git a/ietf/review/migrations/0022_reviewer_queue_policy_and_request_assignment_next.py b/ietf/review/migrations/0022_reviewer_queue_policy_and_request_assignment_next.py deleted file mode 100644 index 9d705ea14..000000000 --- a/ietf/review/migrations/0022_reviewer_queue_policy_and_request_assignment_next.py +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.23 on 2019-11-18 08:50 - - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0008_reviewerqueuepolicyname'), - ('review', '0021_add_additional_history'), - ] - - operations = [ - migrations.AddField( - model_name='reviewteamsettings', - name='reviewer_queue_policy', - field=models.ForeignKey(default='RotateAlphabetically', on_delete=django.db.models.deletion.PROTECT, to='name.ReviewerQueuePolicyName'), - ), - migrations.AddField( - model_name='historicalreviewersettings', - name='request_assignment_next', - field=models.BooleanField(default=False, - help_text='If you would like to be assigned to a review as soon as possible, select this option. It is automatically reset once you receive any assignment.', - verbose_name='Select me next for an assignment'), - ), - migrations.AddField( - model_name='reviewersettings', - name='request_assignment_next', - field=models.BooleanField(default=False, - help_text='If you would like to be assigned to a review as soon as possible, select this option. It is automatically reset once you receive any assignment.', - verbose_name='Select me next for an assignment'), - ), - ] diff --git a/ietf/review/migrations/0023_historicalreviewersettings_change_reason_text_field.py b/ietf/review/migrations/0023_historicalreviewersettings_change_reason_text_field.py deleted file mode 100644 index 543fa3451..000000000 --- a/ietf/review/migrations/0023_historicalreviewersettings_change_reason_text_field.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright The IETF Trust 2020, All Rights Reserved -# Generated by Django 1.11.26 on 2019-12-21 11:52 -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0022_reviewer_queue_policy_and_request_assignment_next'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalreviewersettings', - name='history_change_reason', - field=models.TextField(null=True), - ), - ] diff --git a/ietf/review/migrations/0024_auto_20200520_0017.py b/ietf/review/migrations/0024_auto_20200520_0017.py deleted file mode 100644 index 1b1cba31f..000000000 --- a/ietf/review/migrations/0024_auto_20200520_0017.py +++ /dev/null @@ -1,60 +0,0 @@ -# Generated by Django 2.0.13 on 2020-05-20 00:17 - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0023_historicalreviewersettings_change_reason_text_field'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalreviewersettings', - name='team', - field=ietf.utils.models.ForeignKey(blank=True, db_constraint=False, limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group'), - ), - migrations.AlterField( - model_name='historicalreviewrequest', - name='team', - field=ietf.utils.models.ForeignKey(blank=True, db_constraint=False, limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group'), - ), - migrations.AlterField( - model_name='historicalunavailableperiod', - name='team', - field=ietf.utils.models.ForeignKey(blank=True, db_constraint=False, limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='group.Group'), - ), - migrations.AlterField( - model_name='nextreviewerinteam', - name='team', - field=ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group'), - ), - migrations.AlterField( - model_name='reviewersettings', - name='team', - field=ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group'), - ), - migrations.AlterField( - model_name='reviewrequest', - name='team', - field=ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group'), - ), - migrations.AlterField( - model_name='reviewsecretarysettings', - name='team', - field=ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group'), - ), - migrations.AlterField( - model_name='reviewwish', - name='team', - field=ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group'), - ), - migrations.AlterField( - model_name='unavailableperiod', - name='team', - field=ietf.utils.models.ForeignKey(limit_choices_to=models.Q(_negated=True, reviewteamsettings=None), on_delete=django.db.models.deletion.CASCADE, to='group.Group'), - ), - ] diff --git a/ietf/review/migrations/0025_repair_assignments.py b/ietf/review/migrations/0025_repair_assignments.py deleted file mode 100644 index 49ce65d02..000000000 --- a/ietf/review/migrations/0025_repair_assignments.py +++ /dev/null @@ -1,378 +0,0 @@ -# Copyright The IETF Trust 2020 All Rights Reserved - -import os - -from django.conf import settings -from django.db import migrations - - -class Helper(object): - - def __init__(self, review_path, comments_by, document_class): - self.review_path = review_path - self.comments_by = comments_by - self.document_class = document_class - - def remove_file(self,name): - filename = os.path.join(self.review_path, '{}.txt'.format(name)) - os.remove(filename) - - def rename_file(self, old_name, new_name): - old_filename = os.path.join(self.review_path, '{}.txt'.format(old_name)) - new_filename = os.path.join(self.review_path, '{}.txt'.format(new_name)) - os.rename(old_filename, new_filename) - - def add_comment(self, name, comment): - doc = self.document_class.objects.get(name=name) - doc.docevent_set.create( - type = 'added_comment', - by = self.comments_by, - rev = doc.rev, - desc = comment, - ) - -def forward(apps, schema_editor): - ReviewAssignment = apps.get_model('review','ReviewAssignment') - Document = apps.get_model('doc','Document') - Person = apps.get_model('person','Person') - - # The calculation of review_path makes the assumption that DOCUMENT_PATH_PATTERN only uses - # things that are invariant for review documents. For production, as of this commit, that's - # DOCUMENT_PATH_PATTERN = '/a/www/ietf-ftp/{doc.type_id}/' - - helper = Helper( - review_path = settings.DOCUMENT_PATH_PATTERN.format(doc=Document.objects.filter(type_id='review').last()), - comments_by = Person.objects.get(name='(System)'), - document_class = Document, - ) - - # review-allan-5g-fmc-encapsulation-04-tsvart-lc-black is a double-submit - # In [120]: for d in Document.objects.filter(name__contains='review-allan-5g-fmc-encapsulation-04-tsvart - # ...: ').order_by('name'): - # ...: print(d.name, d.time) - # ...: - # review-allan-5g-fmc-encapsulation-04-tsvart-lc-black-2020-06-30 2020-06-30 11:06:30 - # review-allan-5g-fmc-encapsulation-04-tsvart-lc-black-2020-06-30-2 2020-06-30 11:06:30 - # (I've put some more detail below on this as my understanding of double-submit improved) - # The recommendation is to point the reviewassignment at the first submission, and delete the -2. - # - a = ReviewAssignment.objects.get(review_request__doc__name='draft-allan-5g-fmc-encapsulation', review_request__team__acronym='tsvart') - a.review = Document.objects.get(name='review-allan-5g-fmc-encapsulation-04-tsvart-lc-black-2020-06-30') - a.save() - Document.objects.filter(name='review-allan-5g-fmc-encapsulation-04-tsvart-lc-black-2020-06-30-2').delete() - helper.remove_file('review-allan-5g-fmc-encapsulation-04-tsvart-lc-black-2020-06-30-2') - helper.add_comment('draft-allan-5g-fmc-encapsulation', 'Removed an unintended duplicate version of the tsvart lc review') - - - # This one is just simply disconnected. No duplicates or anything to remove. - a = ReviewAssignment.objects.get(review_request__doc__name='draft-ietf-6lo-minimal-fragment',review_request__team__acronym='opsdir') - r = Document.objects.get(name='review-ietf-6lo-minimal-fragment-09-opsdir-lc-banks-2020-01-31') - a.review = r - a.state_id = 'completed' - a.result_id = 'nits' - a.reviewed_rev = '09' - a.completed_on = r.time - a.save() - helper.add_comment('draft-ietf-6lo-minimal-fragment', 'Reconnected opsdir lc review') - - # This review took place when we were spinning up the review tool. I suspect there were bugs at the time that we no longer have insight into. - # These two do not exist on disk - # review-ietf-6lo-privacy-considerations-04-secdir-lc-kaduk-2016-11-30 - # review-ietf-6lo-privacy-considerations-04-secdir-lc-kaduk-2016-11-30-2 - # These are identical except for 0d0a vs 0a and newline at end of file - # review-ietf-6lo-privacy-considerations-04-secdir-lc-kaduk-2016-11-30-3 - # review-ietf-6lo-privacy-considerations-04-secdir-lc-kaduk-2016-12-01 - # -12-01 is already reachable from the assignment. I suggest: - Document.objects.filter(name__startswith='review-ietf-6lo-privacy-considerations-04-secdir-lc-kaduk-2016-11-30').delete() - helper.remove_file('review-ietf-6lo-privacy-considerations-04-secdir-lc-kaduk-2016-11-30-3') - helper.add_comment('draft-ietf-6lo-privacy-considerations','Removed unintended duplicates of secdir lc review') - - a = ReviewAssignment.objects.get(review_request__doc__name='draft-ietf-bess-nsh-bgp-control-plane',review_request__team__acronym='rtgdir',reviewer__person__name__icontains='singh') - r = Document.objects.get(name='review-ietf-bess-nsh-bgp-control-plane-13-rtgdir-lc-singh-2020-01-29') - a.review = r - a.state_id = 'completed' - a.reviewed_rev='13' - a.result_id='issues' - a.completed_on=r.time - a.save() - helper.add_comment('draft-ietf-bess-nsh-bgp-control-plane','Reconnected rtgdir lc review') - - # In [121]: for d in Document.objects.filter(name__contains='review-ietf-capport-architecture-08-genart-lc-halpern').order_by('name'): - # ...: print(d.name, d.time) - # review-ietf-capport-architecture-08-genart-lc-halpern-2020-05-16 2020-05-16 15:34:35 - # review-ietf-capport-architecture-08-genart-lc-halpern-2020-05-16-2 2020-05-16 15:35:55 - # Not the same as the other double-submits, but likely a failure on the first submit midway through processing that led to the second. - # rjsparks@ietfa:/a/www/ietf-ftp/review> ls review-ietf-capport-architecture-08-genart-lc-halpern* - # review-ietf-capport-architecture-08-genart-lc-halpern-2020-05-16-2.txt - # Only -2 exists on disk - # -2 is what is currently pointed to by the review assignment. - helper.rename_file('review-ietf-capport-architecture-08-genart-lc-halpern-2020-05-16-2','review-ietf-capport-architecture-08-genart-lc-halpern-2020-05-16') - a = ReviewAssignment.objects.get(review_request__doc__name='draft-ietf-capport-architecture',review_request__type_id='lc',reviewer__person__name='Joel M. Halpern') - a.review = Document.objects.get(name='review-ietf-capport-architecture-08-genart-lc-halpern-2020-05-16') - a.save() - Document.objects.filter(name='review-ietf-capport-architecture-08-genart-lc-halpern-2020-05-16-2').delete() - helper.add_comment('draft-ietf-capport-architecture','Removed an unintended duplicate version of the genart lc review') - # Any external references to -05-16-2 will now break, but I'm reticent to start down the path of putting something sensical there. - # Right now, any review document not pointed to by a reviewassignment is a database error, and the view code assumes it won't happen. - # We can make it more robust against crashing, but I don't think we should try to adapt the models to model the corruption. - - - # Opsdir last call review of draft-ietf-cbor-array-tags-07 - # Got sent to the opsdir list (which is has a private archive) twice - no resulting thread from either - # rjsparks@ietfa:/a/www/ietf-ftp/review> ls review-ietf-cbor-array-tags-07-opsdir-lc-dunbar* - # review-ietf-cbor-array-tags-07-opsdir-lc-dunbar-2019-08-26-2.txt - # review-ietf-cbor-array-tags-07-opsdir-lc-dunbar-2019-08-26.txt - # In [122]: for d in Document.objects.filter(name__contains='review-ietf-cbor-array-tags-07-opsdir-lc-dunbar').order_by('name'): - # ...: print(d.name, d.time) - # review-ietf-cbor-array-tags-07-opsdir-lc-dunbar-2019-08-26 2019-08-26 14:13:29 - # review-ietf-cbor-array-tags-07-opsdir-lc-dunbar-2019-08-26-2 2019-08-26 14:13:29 - # This is a double-submit. - # The ReviewAssignment already points to 08-26 - Document.objects.filter(name='review-ietf-cbor-array-tags-07-opsdir-lc-dunbar-2019-08-26-2').delete() - helper.remove_file('review-ietf-cbor-array-tags-07-opsdir-lc-dunbar-2019-08-26-2') - helper.add_comment('draft-ietf-cbor-array-tags','Removed unintended duplicate of opsdir lc review') - - # In [73]: for d in Document.objects.filter(name__startswith='review-ietf-detnet-mpls-over-udp-ip'): - # ...: print(d.name, d.time) - # - # review-ietf-detnet-mpls-over-udp-ip-06-genart-lc-holmberg-2020-09-01 2020-09-01 13:47:55 - # review-ietf-detnet-mpls-over-udp-ip-06-genart-lc-holmberg-2020-09-01-2 2020-09-01 13:47:55 - # review-ietf-detnet-mpls-over-udp-ip-06-opsdir-lc-romascanu-2020-09-03 2020-09-03 02:49:33 - # review-ietf-detnet-mpls-over-udp-ip-06-opsdir-lc-romascanu-2020-09-03-2 2020-09-03 02:49:33 - # - # Both of those are places where the submit button got hit twice in rapid succession. - # Messages went to the list twice. No threads were started - # The review assignments currently point to the -2 versions. I think we change them to point to the not -2 versions and delete the -2 version documents. - # - a = ReviewAssignment.objects.get(review__name='review-ietf-detnet-mpls-over-udp-ip-06-genart-lc-holmberg-2020-09-01-2') - a.review = Document.objects.get(name='review-ietf-detnet-mpls-over-udp-ip-06-genart-lc-holmberg-2020-09-01') - a.save() - Document.objects.filter(name='review-ietf-detnet-mpls-over-udp-ip-06-genart-lc-holmberg-2020-09-01-2').delete() - helper.remove_file('review-ietf-detnet-mpls-over-udp-ip-06-genart-lc-holmberg-2020-09-01-2') - # - a = ReviewAssignment.objects.get(review__name='review-ietf-detnet-mpls-over-udp-ip-06-opsdir-lc-romascanu-2020-09-03-2') - a.review = Document.objects.get(name='review-ietf-detnet-mpls-over-udp-ip-06-opsdir-lc-romascanu-2020-09-03') - a.save() - Document.objects.filter(name='review-ietf-detnet-mpls-over-udp-ip-06-opsdir-lc-romascanu-2020-09-03-2').delete() - helper.remove_file('review-ietf-detnet-mpls-over-udp-ip-06-opsdir-lc-romascanu-2020-09-03-2') - helper.add_comment('draft-ietf-detnet-mpls-over-udp-ip','Removed unintended duplicate of opsdir and genart lc reviews') - - # This draft had a contentious last call (not because of this review) - # rjsparks@ietfa:/a/www/ietf-ftp/review> ls -l review-ietf-dprive-rfc7626-bis-03-genart* - # -rw-r--r-- 1 wwwrun www 1087 Dec 4 2019 review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04-2.txt - # -rw-r--r-- 1 wwwrun www 1087 Dec 4 2019 review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04-3.txt - # -rw-r--r-- 1 wwwrun www 1087 Dec 4 2019 review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04.txt - # These files are identical. - # In [75]: Document.objects.filter(name__startswith='review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04').values_list('time',flat=True) - # Out[75]: - # So again, the submit button got hit several times in rapid succession - # Interestingly, this was a case where the review was sent to the list first and then Meral told the datatracker about it, so it's only on the list(s) once. - # I think we change the assignment to point to 12-04 and delete -2 and -3. - a = ReviewAssignment.objects.get(review__name='review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04-3') - a.review = Document.objects.get(name='review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04') - a.save() - Document.objects.filter(name__startswith='review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04-').delete() - helper.remove_file('review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04-2') - helper.remove_file('review-ietf-dprive-rfc7626-bis-03-genart-lc-shirazipour-2019-12-04-3') - helper.add_comment('draft-ietf-dprive-rfc7626-bis','Removed unintended duplicates of genart lc review') - - # In [76]: Document.objects.filter(name__startswith='review-ietf-emu-rfc5448bis-06-secdir-lc-rose') - # Out[76]: , ]> - # rjsparks@ietfa:/a/www/ietf-ftp/review> ls review-ietf-emu-rfc5448bis-06-secdir-lc-rose* - # review-ietf-emu-rfc5448bis-06-secdir-lc-rose-2020-02-06.txt - # review assignment points to 02-06. - # Suggest we delete -01-27 Document object. There's nothing matching on disk to remove. - Document.objects.filter(name='review-ietf-emu-rfc5448bis-06-secdir-lc-rose-2020-01-27').delete() - helper.add_comment('draft-ietf-emu-rfc5448bis','Removed duplicate secdir lc review') - - # rjsparks@ietfa:/a/www/ietf-ftp/review> ls review-ietf-mmusic-t140-usage-data-channel-11-tsvart* - # review-ietf-mmusic-t140-usage-data-channel-11-tsvart-lc-scharf-2020-01-28.txt - # review-ietf-mmusic-t140-usage-data-channel-11-tsvart-lc-scharf-2020-03-27.txt - # The second was derived from the list post, so it has "Reviewer: Michael Scharf Review result: Ready with Nits" added and is reflowed, but is otherwise identical. - # In [80]: Document.objects.filter(name__startswith='review-ietf-mmusic-t140-usage - # ...: -data-channel-11-tsvart-lc-scharf') - # Out[80]: , ]> - # the 03-27 version was a resubmission by a secretary (Wes). The assignment currently points to 03-07, and it points to the 01-29 (! date there is in UTC) list entry. - # 01-29 is in the window of confusion. - # Suggest we just delete the -01-28 document object. - Document.objects.filter(name='review-ietf-mmusic-t140-usage-data-channel-11-tsvart-lc-scharf-2020-01-28').delete() - helper.remove_file('review-ietf-mmusic-t140-usage-data-channel-11-tsvart-lc-scharf-2020-01-28') - helper.add_comment('draft-ietf-mmusic-t140-usage-data-channel','Removed duplicate tsvart lc review') - - # In [81]: Document.objects.filter(name__startswith='review-ietf-mpls-spl-terminology-03-opsdir-lc-jaeggli').values_list('time',flat=True) - # Out[81]: - # Another double-submit. - # The review assignment already points to -08-15. Suggest we delete -08-15-2 - Document.objects.filter(name='review-ietf-mpls-spl-terminology-03-opsdir-lc-jaeggli-2020-08-15-2').delete() - helper.remove_file('review-ietf-mpls-spl-terminology-03-opsdir-lc-jaeggli-2020-08-15-2') - helper.add_comment('draft-ietf-mpls-spl-terminology','Removed unintended duplicate opsdir lc review') - - - # In [82]: Document.objects.filter(name__startswith='review-ietf-netconf-subscribed-notifications-23-rtgdir').values_list('time',flat=True) - # Out[82]: - # Another double-submit. This time the second won and the review assignments points to -2. I suggest we change it to point to the base and delete -2. - a = ReviewAssignment.objects.get(review__name='review-ietf-netconf-subscribed-notifications-23-rtgdir-lc-singh-2019-04-16-2') - a.review = Document.objects.get(name='review-ietf-netconf-subscribed-notifications-23-rtgdir-lc-singh-2019-04-16') - a.save() - Document.objects.filter(name='review-ietf-netconf-subscribed-notifications-23-rtgdir-lc-singh-2019-04-16-2').delete() - helper.remove_file('review-ietf-netconf-subscribed-notifications-23-rtgdir-lc-singh-2019-04-16-2') - helper.add_comment('draft-ietf-netconf-subscribed-notifications','Removed unintended duplicate rtgdir lc review') - - # In [84]: Document.objects.filter(name__contains='ietf-netconf-yang-push-22-genart-lc-bryant').values_list('time',flat=True) - # Out[84]: - # In [85]: ReviewAssignment.objects.get(review__name__contains='ietf-netconf-yang- - # ...: push-22-genart-lc-bryant').review - # Out[85]: - # Same as above. - a = ReviewAssignment.objects.get(review__name='review-ietf-netconf-yang-push-22-genart-lc-bryant-2019-04-10-2') - a.review = Document.objects.get(name='review-ietf-netconf-yang-push-22-genart-lc-bryant-2019-04-10') - a.save() - Document.objects.filter(name='review-ietf-netconf-yang-push-22-genart-lc-bryant-2019-04-10-2').delete() - helper.remove_file('review-ietf-netconf-yang-push-22-genart-lc-bryant-2019-04-10-2') - helper.add_comment('draft-ietf-netconf-yang-push','Removed unintended duplicate genart lc review') - - # In [92]: for d in Document.objects.filter(name__contains='ietf-nfsv4-rpcrdma-cm-pvt-data-06').order_by('name'): - # ...: print(d.name, d.external_url) - # ...: - # review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-genart-lc-nandakumar-2020-01-27 https://mailarchive.ietf.org/arch/msg/gen-art/b'rGU9fbpAGtmz55Rcdfnl9ZsqMIo' - # review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-genart-lc-nandakumar-2020-01-30 https://mailarchive.ietf.org/arch/msg/gen-art/rGU9fbpAGtmz55Rcdfnl9ZsqMIo - # review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-opsdir-lc-comstedt-2020-01-27 https://mailarchive.ietf.org/arch/msg/ops-dir/b'BjEE4Y0ZDRALgueoS_lbL5U06js' - # review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-opsdir-lc-comstedt-2020-02-10 https://mailarchive.ietf.org/arch/msg/ops-dir/BjEE4Y0ZDRALgueoS_lbL5U06js - # review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-secdir-lc-sheffer-2020-01-26 https://mailarchive.ietf.org/arch/msg/secdir/hY6OTDbplzp9uONAvEjkcfa-N4A - # This straddled the period of confusion. - # For genart, Jean completed the review for the reviewer twice - # for opsdir the reviewer submitted on different dates. - # In both cases, the review only went to the list once, (the links above that are b'<>' are broken anyhow). - # rjsparks@ietfa:/a/www/ietf-ftp/review> ls review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-genart-lc-nandakumar* - # review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-genart-lc-nandakumar-2020-01-30.txt - # rjsparks@ietfa:/a/www/ietf-ftp/review> ls review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-opsdir-lc-comstedt* - # review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-opsdir-lc-comstedt-2020-02-10.txt - # The review assignment objects point to the ones that are backed by disk files. I suggest we delete the others. - Document.objects.filter(name='review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-genart-lc-nandakumar-2020-01-27').delete() - Document.objects.filter(name='review-ietf-nfsv4-rpcrdma-cm-pvt-data-06-opsdir-lc-comstedt-2020-01-27').delete() - ReviewAssignment.objects.filter(review_request__doc__name='draft-ietf-nfsv4-rpcrdma-cm-pvt-data').exclude(review__type_id='review').delete() - helper.add_comment('draft-ietf-nfsv4-rpcrdma-cm-pvt-data','Removed unintended duplicate genart and opsdir lc reviews') - - # In [101]: ReviewAssignment.objects.filter(review__name__contains='review-ietf-pce-pcep-flowspec-09-tsvart').values_list('review__name',flat=True) - # Out[101]: - # In [102]: for d in Document.objects.filter(name__contains='review-ietf-pce-pcep-flowspec-09-tsvart').order_by('name'): - # ...: print(d.name, d.time) - # review-ietf-pce-pcep-flowspec-09-tsvart-lc-touch-2020-07-03 2020-07-03 19:20:49 - # review-ietf-pce-pcep-flowspec-09-tsvart-lc-touch-2020-07-03-2 2020-07-03 19:20:49 - # Same as double-submits above. - a = ReviewAssignment.objects.get(review__name='review-ietf-pce-pcep-flowspec-09-tsvart-lc-touch-2020-07-03-2') - a.review = Document.objects.get(name='review-ietf-pce-pcep-flowspec-09-tsvart-lc-touch-2020-07-03') - a.save() - Document.objects.filter(name='review-ietf-pce-pcep-flowspec-09-tsvart-lc-touch-2020-07-03-2').delete() - helper.remove_file('review-ietf-pce-pcep-flowspec-09-tsvart-lc-touch-2020-07-03-2') - helper.add_comment('draft-ietf-pce-pcep-flowspec','Removed unintended duplicate tsvart lc review') - - # draft-ietf-pim-msdp-yang history is a bit more complicated. - # It is currently (23Sep2020) in AUTH48... - # There is a combination of secretaries trying to route around the confusion and a reviewer accidentally updating the wrong review. - # Everything went to lists. - # In [110]: for rq in ReviewRequest.objects.filter(doc__name__contains='ietf-pim-msdp-yang'): - # ...: print(rq) - # Early review on draft-ietf-pim-msdp-yang by YANG Doctors Assigned - # Last Call review on draft-ietf-pim-msdp-yang by YANG Doctors Assigned - # Last Call review on draft-ietf-pim-msdp-yang by Routing Area Directorate Assigned - # Last Call review on draft-ietf-pim-msdp-yang by General Area Review Team (Gen-ART) Overtaken by Events - # Last Call review on draft-ietf-pim-msdp-yang by Security Area Directorate Overtaken by Events - # Last Call review on draft-ietf-pim-msdp-yang by Ops Directorate Assigned - # Last Call review on draft-ietf-pim-msdp-yang by Transport Area Review Team Team Will not Review Document - # Telechat review on draft-ietf-pim-msdp-yang by Security Area Directorate Team Will not Review Version - # In [107]: for a in ReviewAssignment.objects.filter(review__name__contains='review-ietf-pim-msdp-yang').order_by('review__name'): - # ...: print (a) - # Assignment for Reshad Rahman (Completed) : yangdoctors Early of draft-ietf-pim-msdp-yang - # Assignment for Yingzhen Qu (Completed) : rtgdir Last Call of draft-ietf-pim-msdp-yang - # Assignment for Reshad Rahman (Completed) : yangdoctors Last Call of draft-ietf-pim-msdp-yang - # In [105]: for d in Document.objects.filter(name__contains='review-ietf-pim-msdp-yang').order_by('name'): - # ...: print(d.name, d.time) - # review-ietf-pim-msdp-yang-01-yangdoctors-early-rahman-2018-01-12 2020-02-12 15:00:06 - # review-ietf-pim-msdp-yang-08-rtgdir-lc-qu-2020-01-20 2020-01-20 15:00:00 - # review-ietf-pim-msdp-yang-12-secdir-lc-roca-2020-01-29 2020-01-29 00:18:10 - # review-ietf-pim-msdp-yang-12-yangdoctors-lc-rahman-2020-01-28 2020-01-28 19:05:44 - # review-ietf-pim-msdp-yang-16-yangdoctors-lc-rahman-2020-03-20 2020-03-20 06:16:25 - # But - # In [113]: for a in ReviewAssignment.objects.filter(review_request__doc__name='draft-ietf-pim-msdp-yang'): - # ...: print(a) - # Assignment for Reshad Rahman (Completed) : yangdoctors Early of draft-ietf-pim-msdp-yang - # Assignment for Reshad Rahman (Completed) : yangdoctors Last Call of draft-ietf-pim-msdp-yang - # Assignment for Yingzhen Qu (Completed) : rtgdir Last Call of draft-ietf-pim-msdp-yang - # Assignment for Meral Shirazipour (No Response) : genart Last Call of draft-ietf-pim-msdp-yang - # Assignment for Vincent Roca (No Response) : secdir Last Call of draft-ietf-pim-msdp-yang - # Assignment for Shwetha Bhandari (Accepted) : opsdir Last Call of draft-ietf-pim-msdp-yang - # So, the secdir assignment that exists needs to have the review added and its state changed. - a = ReviewAssignment.objects.get(review_request__doc__name='draft-ietf-pim-msdp-yang',review_request__type_id='lc',reviewer__person__name="Vincent Roca") - r = Document.objects.get(name='review-ietf-pim-msdp-yang-12-secdir-lc-roca-2020-01-29') - a.review = r - a.state_id = 'completed' - a.completed_on = r.time - a.reviewed_rev = '12' - a.save() - # A new ReviewAssignment needs to be added to point to the yangdoctor review of -12 - a16 = ReviewAssignment.objects.get(review__name='review-ietf-pim-msdp-yang-16-yangdoctors-lc-rahman-2020-03-20') - r12 = Document.objects.get(name='review-ietf-pim-msdp-yang-12-yangdoctors-lc-rahman-2020-01-28') - ReviewAssignment.objects.create( - review_request = a16.review_request, - state_id = 'completed', - reviewer = a16.reviewer, - # Intentionally not making up assigned_on - completed_on = r12.time, - review = r12, - reviewed_rev = '12', - result_id = 'ready-issues', - mailarch_url = r12.external_url, - ) - # The secdir review request state is not the best, but it's not worth changing that history. - # Intentionally not changing the state of the opsdir assignment - # No suggestions to delete anything here. - helper.add_comment('draft-ietf-pim-msdp-yang', 'Reconnected secdir lc review and changed assignment state to completed. Reconnected yangdoctors review of -12.') - - # review-ietf-spring-srv6-network-programming-17-opsdir-lc-romascanu-2020-08-20 2020-08-20 02:43:08 - # review-ietf-spring-srv6-network-programming-17-opsdir-lc-romascanu-2020-08-20-2 2020-08-20 02:43:08 - # Assignment currently points to -2. Another double-submit. Resolve as above. - a = ReviewAssignment.objects.get(review__name='review-ietf-spring-srv6-network-programming-17-opsdir-lc-romascanu-2020-08-20-2') - a.review = Document.objects.get(name='review-ietf-spring-srv6-network-programming-17-opsdir-lc-romascanu-2020-08-20') - a.save() - Document.objects.filter(name='review-ietf-spring-srv6-network-programming-17-opsdir-lc-romascanu-2020-08-20-2').delete() - helper.remove_file('review-ietf-spring-srv6-network-programming-17-opsdir-lc-romascanu-2020-08-20-2') - helper.add_comment('draft-ietf-spring-srv6-network-programming','Removed unintended duplicate opsdir lc review') - - # In [116]: ReviewAssignment.objects.filter(review__name__contains='review-ietf-stir-passport-divert-07- - # ...: opsdir').values_list('review__name',flat=True) - # Out[116]: - # In [117]: for d in Document.objects.filter(name__contains='review-ietf-stir-passport-divert-07-opsdir').order_by('name'): - # ...: print(d.name, d.time) - # review-ietf-stir-passport-divert-07-opsdir-lc-dunbar-2019-12-02 2019-12-02 14:59:57 - # review-ietf-stir-passport-divert-07-opsdir-lc-dunbar-2019-12-02-2 2019-12-02 14:59:57 - # Another double-submit. Same treatment as above. - a = ReviewAssignment.objects.get(review__name='review-ietf-stir-passport-divert-07-opsdir-lc-dunbar-2019-12-02-2') - a.review = Document.objects.get(name='review-ietf-stir-passport-divert-07-opsdir-lc-dunbar-2019-12-02') - a.save() - Document.objects.filter(name='review-ietf-stir-passport-divert-07-opsdir-lc-dunbar-2019-12-02-2').delete() - helper.remove_file('review-ietf-stir-passport-divert-07-opsdir-lc-dunbar-2019-12-02-2') - helper.add_comment('draft-ietf-stir-passport-divert','Removed unintended duplicate opsdir lc review') - - # After the above... - # In [57]: for d in Document.objects.filter(type_id='review',reviewassignment__isnull=True): - # ...: print (d) - # review-ietf-dots-architecture-15-tsvart-lc-tuexen-2020-01-27 - # There are no files on disk matching that and nothing references it. - Document.objects.filter(name='review-ietf-dots-architecture-15-tsvart-lc-tuexen-2020-01-27').delete() - -def reverse(apps, schema_editor): - # There is no point in trying to return to the broken objects - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0024_auto_20200520_0017'), - ('doc','0036_orgs_vs_repos'), - ('person','0016_auto_20200807_0750'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/review/migrations/0026_repair_more_assignments.py b/ietf/review/migrations/0026_repair_more_assignments.py deleted file mode 100644 index 50c24f03b..000000000 --- a/ietf/review/migrations/0026_repair_more_assignments.py +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright The IETF Trust 2020 All Rights Reserved - -import os - -from django.conf import settings -from django.db import migrations - -class Helper(object): - - def __init__(self, review_path, comments_by, document_class): - self.review_path = review_path - self.comments_by = comments_by - self.document_class = document_class - - def remove_file(self,name): - filename = os.path.join(self.review_path, '{}.txt'.format(name)) - os.remove(filename) - - def rename_file(self, old_name, new_name): - old_filename = os.path.join(self.review_path, '{}.txt'.format(old_name)) - new_filename = os.path.join(self.review_path, '{}.txt'.format(new_name)) - os.rename(old_filename, new_filename) - - def add_comment(self, name, comment): - doc = self.document_class.objects.get(name=name) - doc.docevent_set.create( - type = 'added_comment', - by = self.comments_by, - rev = doc.rev, - desc = comment, - ) - -def forward(apps,schema_editor): - Document = apps.get_model('doc','Document') - Person = apps.get_model('person','Person') - - # The calculation of review_path makes the assumption that DOCUMENT_PATH_PATTERN only uses - # things that are invariant for review documents. For production, as of this commit, that's - # DOCUMENT_PATH_PATTERN = '/a/www/ietf-ftp/{doc.type_id}/'. There are plans to change that pattern - # soon to '/a/ietfdata/doc/{doc.type_id}/' - - helper = Helper( - review_path = settings.DOCUMENT_PATH_PATTERN.format(doc=Document.objects.filter(type_id='review').last()), - comments_by = Person.objects.get(name='(System)'), - document_class = Document, - ) - - # In [2]: for d in Document.objects.filter(name__startswith='review-ietf-capport-api-07-opsdir'): - # ...: print(d.name,d.time) - # review-ietf-capport-api-07-opsdir-lc-dunbar-2020-05-09 2020-05-09 14:59:40 - # review-ietf-capport-api-07-opsdir-lc-dunbar-2020-05-09-2 2020-05-09 15:06:44 - # This is similar to draft-ietf-capport-architecture-08-genart-lc-halpern... - # Only -2 exists on disk. - # But the Document for ...-2020-05-09 has not type or state - it was very incompletely set up - deleting it results in: - # (3, - # {'community.CommunityList_added_docs': 0, - # 'community.SearchRule_name_contains_index': 0, - # 'doc.RelatedDocument': 0, - # 'doc.DocumentAuthor': 0, - # 'doc.Document_states': 0, - # 'doc.Document_tags': 0, - # 'doc.Document_formal_languages': 0, - # 'doc.DocumentURL': 0, - # 'doc.DocExtResource': 0, - # 'doc.DocAlias_docs': 1, - # 'doc.DocReminder': 0, - # 'group.GroupMilestone_docs': 0, - # 'group.GroupMilestoneHistory_docs': 0, - # 'liaisons.LiaisonStatementAttachment': 0, - # 'meeting.SessionPresentation': 0, - # 'message.Message_related_docs': 0, - # 'review.ReviewWish': 0, - # 'doc.DocEvent': 1, - # 'doc.Document': 1}) - # Repairing that back to remove the -2 will hide more information than simply removing the incompletely set up document object. - # But the -2 document currently has no type (see #3145) - Document.objects.get(name='review-ietf-capport-api-07-opsdir-lc-dunbar-2020-05-09').delete() - review = Document.objects.get(name='review-ietf-capport-api-07-opsdir-lc-dunbar-2020-05-09-2') - review.type_id='review' - review.save() - helper.add_comment('draft-ietf-capport-api','Removed an unintended duplicate version of the opsdir lc review') - -def reverse(apps,schema_editor): - # There is no point in returning to the broken version - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0025_repair_assignments'), - ('doc','0039_auto_20201109_0439'), - ('person','0018_auto_20201109_0439'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/review/migrations/0027_unique_constraint_for_reviewersettings.py b/ietf/review/migrations/0027_unique_constraint_for_reviewersettings.py deleted file mode 100644 index ecd192e1b..000000000 --- a/ietf/review/migrations/0027_unique_constraint_for_reviewersettings.py +++ /dev/null @@ -1,89 +0,0 @@ -# Generated by Django 2.2.17 on 2021-01-24 07:24 - -from django.db import migrations, models - - - -def forward(apps, schema_editor): - """Forward migration - - Attempts to reconcile and remove duplicate ReviewerSettings - """ - ReviewerSettings = apps.get_model('review', 'ReviewerSettings') - HistoricalReviewerSettings = apps.get_model('review', 'HistoricalReviewerSettings') - - def reconcile_duplicate_settings(duplicate_settings, histories): - """Helper to decide how to handle duplicate settings""" - team = duplicate_settings[0].team - person = duplicate_settings[0].person - assert(all((s.person == person and s.team == team for s in duplicate_settings))) - - print('\n>> Found duplicate settings for {}'.format(duplicate_settings[0])) - # In the DB as of Dec 2020, the only duplicate settings sets were pairs where the - # earlier PK had a change history and the latter PK did not. Based on this, assuming - # a change history indicates that the settings are important. If only one has history, - # use that one. If multiple have a history, throw an error. - settings_with_history = [s for s in duplicate_settings if histories[s.pk].count() > 0] - if len(settings_with_history) == 0: - duplicate_settings.sort(key=lambda s: s.pk) - keep = duplicate_settings[-1] - reason = 'chosen by pk' - elif len(settings_with_history) == 1: - keep = settings_with_history[0] - reason = 'chosen because has change history' - else: - # Don't try to guess what to do if multiple settings have change histories - raise RuntimeError( - 'Multiple ReviewerSettings with change history for {}. Please resolve manually.'.format( - settings_with_history[0] - ) - ) - - print('>> Keeping pk={} ({})'.format(keep.pk, reason)) - for settings in duplicate_settings: - if settings.pk != keep.pk: - print('>> Deleting pk={}'.format(settings.pk)) - settings.delete() - - # forward migration starts here - if ReviewerSettings.objects.count() == 0: - return # nothing to do - - records = dict() # list of records, keyed by (person_id, team_id) - for rs in ReviewerSettings.objects.all().order_by('pk'): - key = (rs.person_id, rs.team_id) - if key in records: - records[key].append(rs) - else: - records[key] = [rs] - - for duplicate_settings in records.values(): - if len(duplicate_settings) > 1: - histories = dict() - for ds in duplicate_settings: - histories[ds.pk] = HistoricalReviewerSettings.objects.filter( - id=ds.pk - ) - reconcile_duplicate_settings(duplicate_settings, histories) - -def reverse(apps, schema_editor): - """Reverse migration - - Does nothing, but no harm in reverse migration. - """ - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0026_repair_more_assignments'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - migrations.AddConstraint( - model_name='reviewersettings', - constraint=models.UniqueConstraint(fields=('team', 'person'), name='unique_reviewer_settings_per_team_person'), - ), - ] diff --git a/ietf/review/migrations/0028_auto_20220513_1456.py b/ietf/review/migrations/0028_auto_20220513_1456.py deleted file mode 100644 index 44cb9ae3b..000000000 --- a/ietf/review/migrations/0028_auto_20220513_1456.py +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by Django 2.2.28 on 2022-05-13 14:56 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0027_unique_constraint_for_reviewersettings'), - ] - - operations = [ - migrations.AlterModelOptions( - name='historicalreviewassignment', - options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical review assignment', 'verbose_name_plural': 'historical review assignments'}, - ), - migrations.AlterModelOptions( - name='historicalreviewersettings', - options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical reviewer settings', 'verbose_name_plural': 'historical reviewer settings'}, - ), - migrations.AlterModelOptions( - name='historicalreviewrequest', - options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical review request', 'verbose_name_plural': 'historical review requests'}, - ), - migrations.AlterModelOptions( - name='historicalunavailableperiod', - options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical unavailable period', 'verbose_name_plural': 'historical unavailable periods'}, - ), - migrations.AlterField( - model_name='historicalreviewassignment', - name='history_date', - field=models.DateTimeField(db_index=True), - ), - migrations.AlterField( - model_name='historicalreviewersettings', - name='history_date', - field=models.DateTimeField(db_index=True), - ), - migrations.AlterField( - model_name='historicalreviewrequest', - name='history_date', - field=models.DateTimeField(db_index=True), - ), - migrations.AlterField( - model_name='historicalunavailableperiod', - name='history_date', - field=models.DateTimeField(db_index=True), - ), - ] diff --git a/ietf/review/migrations/0029_use_timezone_now_for_review_models.py b/ietf/review/migrations/0029_use_timezone_now_for_review_models.py deleted file mode 100644 index a8a0558d4..000000000 --- a/ietf/review/migrations/0029_use_timezone_now_for_review_models.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-12 11:24 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0028_auto_20220513_1456'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalreviewrequest', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='reviewrequest', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='reviewwish', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - ] diff --git a/ietf/review/migrations/0030_use_date_today_helper.py b/ietf/review/migrations/0030_use_date_today_helper.py deleted file mode 100644 index b006d276f..000000000 --- a/ietf/review/migrations/0030_use_date_today_helper.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.2.28 on 2022-10-18 15:43 - -from django.db import migrations, models -import ietf.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0029_use_timezone_now_for_review_models'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalunavailableperiod', - name='start_date', - field=models.DateField(default=ietf.utils.timezone.date_today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away. The default is today.", null=True), - ), - migrations.AlterField( - model_name='unavailableperiod', - name='start_date', - field=models.DateField(default=ietf.utils.timezone.date_today, help_text="Choose the start date so that you can still do a review if it's assigned just before the start date - this usually means you should mark yourself unavailable for assignment some time before you are actually away. The default is today.", null=True), - ), - ] diff --git a/ietf/review/migrations/0031_id_term.py b/ietf/review/migrations/0031_id_term.py deleted file mode 100644 index 6abb0dadb..000000000 --- a/ietf/review/migrations/0031_id_term.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 2.2.28 on 2023-02-10 19:58 - -from django.db import migrations, models -import ietf.utils.validators - - -class Migration(migrations.Migration): - - dependencies = [ - ('review', '0030_use_date_today_helper'), - ] - - operations = [ - migrations.AlterField( - model_name='historicalreviewersettings', - name='filter_re', - field=models.CharField(blank=True, help_text='Internet-Draft names matching this regular expression should not be assigned', max_length=255, validators=[ietf.utils.validators.RegexStringValidator()], verbose_name='Filter regexp'), - ), - migrations.AlterField( - model_name='reviewersettings', - name='filter_re', - field=models.CharField(blank=True, help_text='Internet-Draft names matching this regular expression should not be assigned', max_length=255, validators=[ietf.utils.validators.RegexStringValidator()], verbose_name='Filter regexp'), - ), - ] diff --git a/ietf/secr/meetings/migrations/__init__.py b/ietf/secr/meetings/migrations/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/ietf/stats/migrations/0001_initial.py b/ietf/stats/migrations/0001_initial.py index bf702b9a4..715011405 100644 --- a/ietf/stats/migrations/0001_initial.py +++ b/ietf/stats/migrations/0001_initial.py @@ -1,7 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations, models import django.db.models.deletion @@ -13,9 +10,9 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('meeting', '0001_initial'), ('name', '0001_initial'), ('person', '0001_initial'), + ('meeting', '0001_initial'), ] operations = [ @@ -37,6 +34,23 @@ class Migration(migrations.Migration): ('ending', models.CharField(help_text="Regexp with ending, e.g. 'Inc\\.?' - remember to escape .!", max_length=255)), ], ), + migrations.CreateModel( + name='MeetingRegistration', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('first_name', models.CharField(max_length=255)), + ('last_name', models.CharField(max_length=255)), + ('affiliation', models.CharField(blank=True, max_length=255)), + ('country_code', models.CharField(max_length=2)), + ('email', models.EmailField(blank=True, max_length=254, null=True)), + ('reg_type', models.CharField(blank=True, max_length=255)), + ('ticket_type', models.CharField(blank=True, max_length=255)), + ('attended', models.BooleanField(default=False)), + ('checkedin', models.BooleanField(default=False)), + ('meeting', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Meeting')), + ('person', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + ), migrations.CreateModel( name='CountryAlias', fields=[ @@ -48,17 +62,4 @@ class Migration(migrations.Migration): 'verbose_name_plural': 'country aliases', }, ), - migrations.CreateModel( - name='MeetingRegistration', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('first_name', models.CharField(max_length=255)), - ('last_name', models.CharField(max_length=255)), - ('affiliation', models.CharField(blank=True, max_length=255)), - ('country_code', models.CharField(max_length=2)), - ('email', models.EmailField(blank=True, max_length=254, null=True)), - ('meeting', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='meeting.Meeting')), - ('person', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ], - ), ] diff --git a/ietf/stats/migrations/0002_add_meetingregistration_fields.py b/ietf/stats/migrations/0002_add_meetingregistration_fields.py deleted file mode 100644 index de0cfb11e..000000000 --- a/ietf/stats/migrations/0002_add_meetingregistration_fields.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.0.13 on 2020-06-07 15:19 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('stats', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='meetingregistration', - name='reg_type', - field=models.CharField(blank=True, max_length=255), - ), - migrations.AddField( - model_name='meetingregistration', - name='ticket_type', - field=models.CharField(blank=True, max_length=255), - ), - ] diff --git a/ietf/stats/migrations/0003_meetingregistration_attended.py b/ietf/stats/migrations/0003_meetingregistration_attended.py deleted file mode 100644 index 6500f7f5a..000000000 --- a/ietf/stats/migrations/0003_meetingregistration_attended.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 2.0.13 on 2020-06-09 04:39 - -from django.db import migrations, models - - -def forward(apps, schema_editor): - MeetingRegistration = apps.get_model('stats', 'MeetingRegistration') - # Set attended=True on all existing records, - # - # Going forward, this will be unset on registration - # (ietf.api.views.api_new_meeting_registration()), and set on attendee - # import (ietf.stats.utils.get_meeting_registration_data() ) - MeetingRegistration.objects.update(attended=True) - -def reverse(apps, schema_editor): - pass - -class Migration(migrations.Migration): - - dependencies = [ - ('stats', '0002_add_meetingregistration_fields'), - ('group', '0029_add_used_roles_and_default_used_roles'), - ] - - operations = [ - migrations.AddField( - model_name='meetingregistration', - name='attended', - field=models.BooleanField(default=False), - ), - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/stats/migrations/0004_split_records.py b/ietf/stats/migrations/0004_split_records.py deleted file mode 100644 index 83b2be24a..000000000 --- a/ietf/stats/migrations/0004_split_records.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 2.2.26 on 2022-01-19 16:36 - -from django.db import migrations - - -def forward(apps, schema_editor): - '''Split records that have 2 reg_types into two separate records''' - MeetingRegistration = apps.get_model('stats', 'MeetingRegistration') - meetings = [108, 109, 110, 111, 112, 113, 114] - for reg in MeetingRegistration.objects.filter(meeting__number__in=meetings): - reg_types = reg.reg_type.split() - if len(reg_types) == 2: - reg.reg_type = reg_types[0] - reg.save() - # create copy - reg.pk = None - reg.reg_type = reg_types[1] - reg.save() - - -def reverse(apps, schema_editor): - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('stats', '0003_meetingregistration_attended'), - ] - - operations = [ - migrations.RunPython(forward, reverse) - ] diff --git a/ietf/stats/migrations/0005_meetingregistration_checkedin.py b/ietf/stats/migrations/0005_meetingregistration_checkedin.py deleted file mode 100644 index 73b6f7643..000000000 --- a/ietf/stats/migrations/0005_meetingregistration_checkedin.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-26 08:37 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('stats', '0004_split_records'), - ] - - operations = [ - migrations.AddField( - model_name='meetingregistration', - name='checkedin', - field=models.BooleanField(default=False), - ), - ] diff --git a/ietf/submit/migrations/0001_initial.py b/ietf/submit/migrations/0001_initial.py index 619260600..8c657c642 100644 --- a/ietf/submit/migrations/0001_initial.py +++ b/ietf/submit/migrations/0001_initial.py @@ -1,13 +1,11 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 +# Generated by Django 2.2.28 on 2023-03-20 19:22 - -import datetime from django.db import migrations, models import django.db.models.deletion +import django.utils.timezone import ietf.utils.accesstoken import ietf.utils.models +import ietf.utils.timezone import jsonfield.fields @@ -17,22 +15,13 @@ class Migration(migrations.Migration): dependencies = [ ('message', '0001_initial'), - ('group', '0001_initial'), ('name', '0001_initial'), ('person', '0001_initial'), + ('group', '0001_initial'), ('doc', '0001_initial'), ] operations = [ - migrations.CreateModel( - name='Preapproval', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(db_index=True, max_length=255)), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), - ], - ), migrations.CreateModel( name='Submission', fields=[ @@ -53,7 +42,8 @@ class Migration(migrations.Migration): ('file_types', models.CharField(blank=True, max_length=50)), ('file_size', models.IntegerField(blank=True, null=True)), ('document_date', models.DateField(blank=True, null=True)), - ('submission_date', models.DateField(default=datetime.date.today)), + ('submission_date', models.DateField(default=ietf.utils.timezone.date_today)), + ('xml_version', models.CharField(default=None, max_length=4, null=True)), ('submitter', models.CharField(blank=True, help_text='Name and email of submitter, e.g. "John Doe <john@example.org>".', max_length=255)), ('draft', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document')), ('formal_languages', models.ManyToManyField(blank=True, help_text='Formal languages used in document', to='name.FormalLanguageName')), @@ -61,27 +51,14 @@ class Migration(migrations.Migration): ('state', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.DraftSubmissionStateName')), ], ), - migrations.CreateModel( - name='SubmissionCheck', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), - ('checker', models.CharField(blank=True, max_length=256)), - ('passed', models.NullBooleanField(default=False)), - ('message', models.TextField(blank=True, null=True)), - ('errors', models.IntegerField(blank=True, default=None, null=True)), - ('warnings', models.IntegerField(blank=True, default=None, null=True)), - ('items', jsonfield.fields.JSONField(blank=True, default='{}', null=True)), - ('symbol', models.CharField(default='', max_length=64)), - ('submission', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='checks', to='submit.Submission')), - ], - ), migrations.CreateModel( name='SubmissionEvent', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('time', models.DateTimeField(default=datetime.datetime.now)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), ('desc', models.TextField()), + ('by', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ('submission', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='submit.Submission')), ], options={ 'ordering': ('-time', '-id'), @@ -92,22 +69,65 @@ class Migration(migrations.Migration): fields=[ ('submissionevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='submit.SubmissionEvent')), ('msgtype', models.CharField(max_length=25)), - ('in_reply_to', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='irtomanual', to='message.Message')), - ('message', ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='manualevents', to='message.Message')), ], options={ 'ordering': ['-time', '-id'], }, bases=('submit.submissionevent',), ), - migrations.AddField( + migrations.CreateModel( + name='SubmissionExtResource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('display_name', models.CharField(blank=True, default='', max_length=255)), + ('value', models.CharField(max_length=2083)), + ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceName')), + ('submission', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='external_resources', to='submit.Submission')), + ], + options={ + 'abstract': False, + }, + ), + migrations.CreateModel( + name='SubmissionCheck', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('time', models.DateTimeField(default=django.utils.timezone.now)), + ('checker', models.CharField(blank=True, max_length=256)), + ('passed', models.BooleanField(default=False, null=True)), + ('message', models.TextField(blank=True, null=True)), + ('errors', models.IntegerField(blank=True, default=None, null=True)), + ('warnings', models.IntegerField(blank=True, default=None, null=True)), + ('items', jsonfield.fields.JSONField(blank=True, default='{}', null=True)), + ('symbol', models.CharField(default='', max_length=64)), + ('submission', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='checks', to='submit.Submission')), + ], + ), + migrations.CreateModel( + name='Preapproval', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(db_index=True, max_length=255)), + ('time', models.DateTimeField(default=django.utils.timezone.now)), + ('by', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='person.Person')), + ], + ), + migrations.AddIndex( model_name='submissionevent', - name='by', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='person.Person'), + index=models.Index(fields=['-time', '-id'], name='submit_subm_time_fcd790_idx'), ), migrations.AddField( - model_name='submissionevent', - name='submission', - field=ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='submit.Submission'), + model_name='submissionemailevent', + name='in_reply_to', + field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='irtomanual', to='message.Message'), + ), + migrations.AddField( + model_name='submissionemailevent', + name='message', + field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='manualevents', to='message.Message'), + ), + migrations.AddIndex( + model_name='submission', + index=models.Index(fields=['submission_date'], name='submit_subm_submiss_8e58a9_idx'), ), ] diff --git a/ietf/submit/migrations/0002_submission_document2_fk.py b/ietf/submit/migrations/0002_submission_document2_fk.py deleted file mode 100644 index 7885cff32..000000000 --- a/ietf/submit/migrations/0002_submission_document2_fk.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-08 11:58 - - -from django.db import migrations -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0015_1_add_fk_to_document_id'), - ('submit', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='submission', - name='draft2', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='doc.Document', to_field='id'), - ), - migrations.AlterField( - model_name='submission', - name='draft', - field=ietf.utils.models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='old_submission', to='doc.Document', to_field='name'), - ), - ] diff --git a/ietf/submit/migrations/0003_remove_old_document_field.py b/ietf/submit/migrations/0003_remove_old_document_field.py deleted file mode 100644 index f8deb2ff9..000000000 --- a/ietf/submit/migrations/0003_remove_old_document_field.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-25 06:44 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('submit', '0002_submission_document2_fk'), - ] - - operations = [ - migrations.RemoveField( - model_name='submission', - name='draft', - ), - ] diff --git a/ietf/submit/migrations/0004_rename_field_document2.py b/ietf/submit/migrations/0004_rename_field_document2.py deleted file mode 100644 index 422265923..000000000 --- a/ietf/submit/migrations/0004_rename_field_document2.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright The IETF Trust 2019-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.20 on 2019-05-25 06:46 - - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('doc', '0019_rename_field_document2'), - ('submit', '0003_remove_old_document_field'), - ] - - operations = [ - migrations.RenameField( - model_name='submission', - old_name='draft2', - new_name='draft', - ), - ] diff --git a/ietf/submit/migrations/0005_auto_20200624_1332.py b/ietf/submit/migrations/0005_auto_20200624_1332.py deleted file mode 100644 index 74a5fa9fb..000000000 --- a/ietf/submit/migrations/0005_auto_20200624_1332.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.15 on 2020-06-24 13:32 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('submit', '0004_rename_field_document2'), - ] - - operations = [ - migrations.AlterField( - model_name='submissioncheck', - name='passed', - field=models.BooleanField(default=False, null=True), - ), - ] diff --git a/ietf/submit/migrations/0006_submission_xml_version.py b/ietf/submit/migrations/0006_submission_xml_version.py deleted file mode 100644 index da5dd6cd5..000000000 --- a/ietf/submit/migrations/0006_submission_xml_version.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.2.15 on 2020-08-28 07:17 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('submit', '0005_auto_20200624_1332'), - ] - - operations = [ - migrations.AddField( - model_name='submission', - name='xml_version', - field=models.CharField(default=None, max_length=4, null=True), - ), - ] diff --git a/ietf/submit/migrations/0007_auto_20201109_0439.py b/ietf/submit/migrations/0007_auto_20201109_0439.py deleted file mode 100644 index c52f90539..000000000 --- a/ietf/submit/migrations/0007_auto_20201109_0439.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.17 on 2020-11-09 04:39 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('submit', '0006_submission_xml_version'), - ] - - operations = [ - migrations.AddIndex( - model_name='submissionevent', - index=models.Index(fields=['-time', '-id'], name='submit_subm_time_fcd790_idx'), - ), - ] diff --git a/ietf/submit/migrations/0008_submissionextresource.py b/ietf/submit/migrations/0008_submissionextresource.py deleted file mode 100644 index be51e2c6d..000000000 --- a/ietf/submit/migrations/0008_submissionextresource.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 2.2.17 on 2021-01-27 12:23 - -from django.db import migrations, models -import django.db.models.deletion -import ietf.utils.models - - -class Migration(migrations.Migration): - - dependencies = [ - ('name', '0020_add_rescheduled_session_name'), - ('submit', '0007_auto_20201109_0439'), - ] - - operations = [ - migrations.CreateModel( - name='SubmissionExtResource', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('display_name', models.CharField(blank=True, default='', max_length=255)), - ('value', models.CharField(max_length=2083)), - ('name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='name.ExtResourceName')), - ('submission', ietf.utils.models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='external_resources', to='submit.Submission')), - ], - options={ - 'abstract': False, - }, - ), - ] diff --git a/ietf/submit/migrations/0009_auto_20220427_1223.py b/ietf/submit/migrations/0009_auto_20220427_1223.py deleted file mode 100644 index 6f8e21425..000000000 --- a/ietf/submit/migrations/0009_auto_20220427_1223.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 2.2.28 on 2022-04-27 12:23 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('submit', '0008_submissionextresource'), - ] - - operations = [ - migrations.AddIndex( - model_name='submission', - index=models.Index(fields=['submission_date'], name='submit_subm_submiss_8e58a9_idx'), - ), - ] diff --git a/ietf/submit/migrations/0010_create_cancel_stale_submissions_task.py b/ietf/submit/migrations/0010_create_cancel_stale_submissions_task.py deleted file mode 100644 index 5d8511054..000000000 --- a/ietf/submit/migrations/0010_create_cancel_stale_submissions_task.py +++ /dev/null @@ -1,52 +0,0 @@ -# Generated by Django 2.2.28 on 2022-08-23 08:45 - -from django.db import migrations -from django.utils import timezone - - -def forward(apps, schema_editor): - IntervalSchedule = apps.get_model('django_celery_beat', 'IntervalSchedule') - PeriodicTask = apps.get_model('django_celery_beat', 'PeriodicTask') - PeriodicTasks = apps.get_model('django_celery_beat', 'PeriodicTasks') - every_five_minutes, _ = IntervalSchedule.objects.get_or_create( - every=5, - period='minutes', # in non-migration code, use IntervalSchedule.MINUTES instead - ) - task, _ = PeriodicTask.objects.get_or_create( - interval=every_five_minutes, - name='Cancel stale submissions', - task='ietf.submit.tasks.cancel_stale_submissions', - ) - # this replicates the PeriodicTasks.changed() call as of django-celery-beat==2.3.0 - PeriodicTasks.objects.update_or_create(ident=1, defaults={'last_update': timezone.now()}) - - -def reverse(apps, schema_editor): - IntervalSchedule = apps.get_model('django_celery_beat', 'IntervalSchedule') - PeriodicTask = apps.get_model('django_celery_beat', 'PeriodicTask') - PeriodicTasks = apps.get_model('django_celery_beat', 'PeriodicTasks') - every_five_minutes = IntervalSchedule.objects.get( - every=5, - period='minutes', # in non-migration code, use IntervalSchedule.MINUTES instead - ) - task = PeriodicTask.objects.get( - interval=every_five_minutes, - name='Cancel stale submissions', - task='ietf.submit.tasks.cancel_stale_submissions', - ) - task.delete() - every_five_minutes.delete() - # this replicates the PeriodicTasks.changed() call as of django-celery-beat==2.3.0 - PeriodicTasks.objects.update_or_create(ident=1, defaults={'last_update': timezone.now()}) - - -class Migration(migrations.Migration): - - dependencies = [ - ('submit', '0009_auto_20220427_1223'), - ('django_celery_beat', '0016_alter_crontabschedule_timezone'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/submit/migrations/0011_use_timezone_now_for_submit_models.py b/ietf/submit/migrations/0011_use_timezone_now_for_submit_models.py deleted file mode 100644 index 69d40bf8a..000000000 --- a/ietf/submit/migrations/0011_use_timezone_now_for_submit_models.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 2.2.28 on 2022-07-12 11:24 - -from django.db import migrations, models -import django.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('submit', '0010_create_cancel_stale_submissions_task'), - ] - - operations = [ - migrations.AlterField( - model_name='preapproval', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='submissioncheck', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - migrations.AlterField( - model_name='submissionevent', - name='time', - field=models.DateTimeField(default=django.utils.timezone.now), - ), - ] diff --git a/ietf/submit/migrations/0012_use_date_today_helper.py b/ietf/submit/migrations/0012_use_date_today_helper.py deleted file mode 100644 index 3a02552f6..000000000 --- a/ietf/submit/migrations/0012_use_date_today_helper.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.2.28 on 2022-10-18 15:43 - -from django.db import migrations, models -import ietf.utils.timezone - - -class Migration(migrations.Migration): - - dependencies = [ - ('submit', '0011_use_timezone_now_for_submit_models'), - ] - - operations = [ - migrations.AlterField( - model_name='submission', - name='submission_date', - field=models.DateField(default=ietf.utils.timezone.date_today), - ), - ] diff --git a/ietf/utils/migrations/0001_initial.py b/ietf/utils/migrations/0001_initial.py index 87cb75287..82c3daa99 100644 --- a/ietf/utils/migrations/0001_initial.py +++ b/ietf/utils/migrations/0001_initial.py @@ -1,9 +1,4 @@ -# Copyright The IETF Trust 2018-2020, All Rights Reserved -# -*- coding: utf-8 -*- -# Generated by Django 1.11.10 on 2018-02-20 10:52 - - -from typing import List, Tuple # pyflakes:ignore +# Generated by Django 2.2.28 on 2023-03-20 19:22 from django.db import migrations, models @@ -13,7 +8,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ] # type: List[Tuple[str]] + ] operations = [ migrations.CreateModel( diff --git a/ietf/utils/migrations/0002_convert_timestamps_to_utc.py b/ietf/utils/migrations/0002_convert_timestamps_to_utc.py deleted file mode 100644 index db4f34cd0..000000000 --- a/ietf/utils/migrations/0002_convert_timestamps_to_utc.py +++ /dev/null @@ -1,305 +0,0 @@ -# Generated by Django 2.2.28 on 2022-06-21 11:44 -# -# Important: To avoid corrupting timestamps in the database, do not use this migration as a dependency for -# future migrations. Use 0003_pause_to_change_use_tz instead. -# -import datetime - -from zoneinfo import ZoneInfo - -from django.conf import settings -from django.db import migrations, connection - -# to generate the expected columns list: -# -# from django.db import connection -# from pprint import pp -# cursor = connection.cursor() -# cursor.execute(""" -# SELECT table_name, column_name -# FROM information_schema.columns -# WHERE table_schema='ietf_utf8' -# AND column_type LIKE 'datetime%' -# AND NOT table_name LIKE 'django_celery_beat_%' -# ORDER BY table_name, column_name; -# """) -# pp(cursor.fetchall()) -# -expected_datetime_columns = ( - ('auth_user', 'date_joined'), - ('auth_user', 'last_login'), - ('community_documentchangedates', 'new_version_date'), - ('community_documentchangedates', 'normal_change_date'), - ('community_documentchangedates', 'significant_change_date'), - ('django_admin_log', 'action_time'), - ('django_migrations', 'applied'), - ('django_session', 'expire_date'), - ('doc_ballotpositiondocevent', 'comment_time'), - ('doc_ballotpositiondocevent', 'discuss_time'), - ('doc_deletedevent', 'time'), - ('doc_docevent', 'time'), - ('doc_dochistory', 'expires'), - ('doc_dochistory', 'time'), - ('doc_docreminder', 'due'), - ('doc_document', 'expires'), - ('doc_document', 'time'), - ('doc_documentactionholder', 'time_added'), - ('doc_initialreviewdocevent', 'expires'), - ('doc_irsgballotdocevent', 'duedate'), - ('doc_lastcalldocevent', 'expires'), - ('group_group', 'time'), - ('group_groupevent', 'time'), - ('group_grouphistory', 'time'), - ('group_groupmilestone', 'time'), - ('group_groupmilestonehistory', 'time'), - ('ipr_iprdisclosurebase', 'time'), - ('ipr_iprevent', 'response_due'), - ('ipr_iprevent', 'time'), - ('liaisons_liaisonstatementevent', 'time'), - ('mailinglists_subscribed', 'time'), - ('mailinglists_whitelisted', 'time'), - ('meeting_floorplan', 'modified'), - ('meeting_room', 'modified'), - ('meeting_schedtimesessassignment', 'modified'), - ('meeting_schedulingevent', 'time'), - ('meeting_session', 'modified'), - ('meeting_session', 'scheduled'), - ('meeting_slidesubmission', 'time'), - ('meeting_timeslot', 'modified'), - ('meeting_timeslot', 'time'), - ('message_message', 'sent'), - ('message_message', 'time'), - ('message_sendqueue', 'send_at'), - ('message_sendqueue', 'sent_at'), - ('message_sendqueue', 'time'), - ('nomcom_feedback', 'time'), - ('nomcom_feedbacklastseen', 'time'), - ('nomcom_nomination', 'time'), - ('nomcom_nomineeposition', 'time'), - ('nomcom_topicfeedbacklastseen', 'time'), - ('oidc_provider_code', 'expires_at'), - ('oidc_provider_token', 'expires_at'), - ('oidc_provider_userconsent', 'date_given'), - ('oidc_provider_userconsent', 'expires_at'), - ('person_email', 'time'), - ('person_historicalemail', 'history_date'), - ('person_historicalemail', 'time'), - ('person_historicalperson', 'history_date'), - ('person_historicalperson', 'time'), - ('person_person', 'time'), - ('person_personalapikey', 'created'), - ('person_personalapikey', 'latest'), - ('person_personevent', 'time'), - ('request_profiler_profilingrecord', 'end_ts'), - ('request_profiler_profilingrecord', 'start_ts'), - ('review_historicalreviewassignment', 'assigned_on'), - ('review_historicalreviewassignment', 'completed_on'), - ('review_historicalreviewassignment', 'history_date'), - ('review_historicalreviewersettings', 'history_date'), - ('review_historicalreviewrequest', 'history_date'), - ('review_historicalreviewrequest', 'time'), - ('review_historicalunavailableperiod', 'history_date'), - ('review_reviewassignment', 'assigned_on'), - ('review_reviewassignment', 'completed_on'), - ('review_reviewrequest', 'time'), - ('review_reviewwish', 'time'), - ('south_migrationhistory', 'applied'), - ('submit_preapproval', 'time'), - ('submit_submissioncheck', 'time'), - ('submit_submissionevent', 'time'), - ('tastypie_apikey', 'created'), - ('utils_versioninfo', 'time'), -) - -def convert_pre1970_timestamps(apps, schema_editor): - """Convert timestamps that CONVERT_TZ cannot handle - - This could be made to do the entire conversion but some tables that require conversion - do not use 'id' as their PK. Rather than reinvent the ORM, we'll let SQL do what it can - with CONVERT_TZ and clean up after. The tables that have pre-1970 timestamps both have - 'id' columns. - """ - min_timestamp = "1969-12-31 16:00:01" # minimum PST8PDT timestamp CONVERT_TZ can convert to UTC - with connection.cursor() as cursor: - # To get these values, use: - # convert_manually = [ - # (tbl, col) for (tbl, col) in expected_datetime_columns - # if cursor.execute( - # f'SELECT COUNT(*) FROM {tbl} WHERE {col} IS NOT NULL AND {col} <= %s', - # (min_timestamp,) - # ) and cursor.fetchone()[0] > 0 - # ] - convert_manually = [('doc_docevent', 'time'), ('group_groupevent', 'time')] - pst8pdt = ZoneInfo('PST8PDT') - for (tbl, col) in convert_manually: - cursor.execute(f'SELECT id, {col} FROM {tbl} WHERE {col} < %s', (min_timestamp,)) - for (id, naive_in_pst8pdt) in cursor.fetchall(): - aware_in_pst8pdt = naive_in_pst8pdt.replace(tzinfo=pst8pdt) - aware_in_utc = aware_in_pst8pdt.astimezone(datetime.timezone.utc) - naive_in_utc = aware_in_utc.replace(tzinfo=None) - cursor.execute( - f'UPDATE {tbl} SET {col}=%s WHERE id=%s', - (naive_in_utc, id) - ) - - -def forward(apps, schema_editor): - # Check that the USE_TZ has been False so far, otherwise we might be corrupting timestamps. If this test - # fails, be sure that no timestamps have been set since changing USE_TZ to True before re-running! - assert not getattr(settings, 'USE_TZ', False), 'must keep USE_TZ = False until after this migration' - - # Check that we can safely ignore celery beat columns - it defaults to UTC if CELERY_TIMEZONE is not set. - celery_timezone = getattr(settings, 'CELERY_TIMEZONE', None) - assert celery_timezone in ('UTC', None), 'update migration, celery is not using UTC' - # If the CELERY_ENABLE_UTC flag is set, abort because someone is using a strange configuration. - assert not hasattr(settings, 'CELERY_ENABLE_UTC'), 'update migration, settings.CELERY_ENABLE_UTC was not expected' - - with connection.cursor() as cursor: - # Check that we have timezones. - # If these assertions fail, the DB does not know all the necessary time zones. - # To load timezones, - # $ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql - # (on a dev system, first connect to the db image with `docker compose exec db bash`) - cursor.execute("SELECT CONVERT_TZ('2022-06-22T17:43:00', 'PST8PDT', 'UTC');") - assert not any(None in row for row in cursor.fetchall()), 'database does not recognize PST8PDT' - cursor.execute( - "SELECT CONVERT_TZ('2022-06-22T17:43:00', time_zone, 'UTC') FROM meeting_meeting WHERE time_zone != '';" - ) - assert not any(None in row for row in cursor.fetchall()), 'database does not recognize a meeting time zone' - - # Check that we have all and only the expected datetime columns to work with. - # If this fails, figure out what changed and decide how to proceed safely. - cursor.execute(""" - SELECT table_name, column_name - FROM information_schema.columns - WHERE table_schema='ietf_utf8' - AND column_type LIKE 'datetime%' - AND NOT table_name LIKE 'django_celery_beat_%' - AND NOT table_name='utils_dumpinfo' - ORDER BY table_name, column_name; - """) - assert cursor.fetchall() == expected_datetime_columns, 'unexpected or missing datetime columns in db' - - -class Migration(migrations.Migration): - dependencies = [ - ('doc', '0046_use_timezone_now_for_doc_models'), - ('group', '0059_use_timezone_now_for_group_models'), - ('meeting', '0058_meeting_time_zone_not_blank'), - ('message', '0012_use_timezone_now_for_message_models'), - ('person', '0029_use_timezone_now_for_person_models'), - ('review', '0029_use_timezone_now_for_review_models'), - ('submit', '0011_use_timezone_now_for_submit_models'), - ('utils', '0001_initial'), - ] - - # To generate the queries: - # - # min_timestamp = "1969-12-31 16:00:01" # minimum PST8PDT timestamp CONVERT_TZ can convert to UTC - # pst8pdt_columns = [e for e in expected_datetime_columns if e != ('meeting_timeslot', 'time')] - # queries = [] - # for table, column in pst8pdt_columns: - # queries.append(f"UPDATE {table} SET {column} = CONVERT_TZ({column}, 'PST8PDT', 'UTC') WHERE {column} >= '{min_timestamp}'";) - # - # queries.append(""" - # UPDATE meeting_timeslot - # JOIN meeting_meeting - # ON meeting_meeting.id = meeting_id - # SET time = CONVERT_TZ(time, time_zone, 'UTC'); - # """) - # - # print("\n".join(queries)) - # - operations = [ - migrations.RunPython(forward), - migrations.RunSQL(""" -UPDATE auth_user SET date_joined = CONVERT_TZ(date_joined, 'PST8PDT', 'UTC') WHERE date_joined >= '1969-12-31 16:00:01'; -UPDATE auth_user SET last_login = CONVERT_TZ(last_login, 'PST8PDT', 'UTC') WHERE last_login >= '1969-12-31 16:00:01'; -UPDATE community_documentchangedates SET new_version_date = CONVERT_TZ(new_version_date, 'PST8PDT', 'UTC') WHERE new_version_date >= '1969-12-31 16:00:01'; -UPDATE community_documentchangedates SET normal_change_date = CONVERT_TZ(normal_change_date, 'PST8PDT', 'UTC') WHERE normal_change_date >= '1969-12-31 16:00:01'; -UPDATE community_documentchangedates SET significant_change_date = CONVERT_TZ(significant_change_date, 'PST8PDT', 'UTC') WHERE significant_change_date >= '1969-12-31 16:00:01'; -UPDATE django_admin_log SET action_time = CONVERT_TZ(action_time, 'PST8PDT', 'UTC') WHERE action_time >= '1969-12-31 16:00:01'; -UPDATE django_migrations SET applied = CONVERT_TZ(applied, 'PST8PDT', 'UTC') WHERE applied >= '1969-12-31 16:00:01'; -UPDATE django_session SET expire_date = CONVERT_TZ(expire_date, 'PST8PDT', 'UTC') WHERE expire_date >= '1969-12-31 16:00:01'; -UPDATE doc_ballotpositiondocevent SET comment_time = CONVERT_TZ(comment_time, 'PST8PDT', 'UTC') WHERE comment_time >= '1969-12-31 16:00:01'; -UPDATE doc_ballotpositiondocevent SET discuss_time = CONVERT_TZ(discuss_time, 'PST8PDT', 'UTC') WHERE discuss_time >= '1969-12-31 16:00:01'; -UPDATE doc_deletedevent SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE doc_docevent SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE doc_dochistory SET expires = CONVERT_TZ(expires, 'PST8PDT', 'UTC') WHERE expires >= '1969-12-31 16:00:01'; -UPDATE doc_dochistory SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE doc_docreminder SET due = CONVERT_TZ(due, 'PST8PDT', 'UTC') WHERE due >= '1969-12-31 16:00:01'; -UPDATE doc_document SET expires = CONVERT_TZ(expires, 'PST8PDT', 'UTC') WHERE expires >= '1969-12-31 16:00:01'; -UPDATE doc_document SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE doc_documentactionholder SET time_added = CONVERT_TZ(time_added, 'PST8PDT', 'UTC') WHERE time_added >= '1969-12-31 16:00:01'; -UPDATE doc_initialreviewdocevent SET expires = CONVERT_TZ(expires, 'PST8PDT', 'UTC') WHERE expires >= '1969-12-31 16:00:01'; -UPDATE doc_irsgballotdocevent SET duedate = CONVERT_TZ(duedate, 'PST8PDT', 'UTC') WHERE duedate >= '1969-12-31 16:00:01'; -UPDATE doc_lastcalldocevent SET expires = CONVERT_TZ(expires, 'PST8PDT', 'UTC') WHERE expires >= '1969-12-31 16:00:01'; -UPDATE group_group SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE group_groupevent SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE group_grouphistory SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE group_groupmilestone SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE group_groupmilestonehistory SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE ipr_iprdisclosurebase SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE ipr_iprevent SET response_due = CONVERT_TZ(response_due, 'PST8PDT', 'UTC') WHERE response_due >= '1969-12-31 16:00:01'; -UPDATE ipr_iprevent SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE liaisons_liaisonstatementevent SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE mailinglists_subscribed SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE mailinglists_whitelisted SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE meeting_floorplan SET modified = CONVERT_TZ(modified, 'PST8PDT', 'UTC') WHERE modified >= '1969-12-31 16:00:01'; -UPDATE meeting_room SET modified = CONVERT_TZ(modified, 'PST8PDT', 'UTC') WHERE modified >= '1969-12-31 16:00:01'; -UPDATE meeting_schedtimesessassignment SET modified = CONVERT_TZ(modified, 'PST8PDT', 'UTC') WHERE modified >= '1969-12-31 16:00:01'; -UPDATE meeting_schedulingevent SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE meeting_session SET modified = CONVERT_TZ(modified, 'PST8PDT', 'UTC') WHERE modified >= '1969-12-31 16:00:01'; -UPDATE meeting_session SET scheduled = CONVERT_TZ(scheduled, 'PST8PDT', 'UTC') WHERE scheduled >= '1969-12-31 16:00:01'; -UPDATE meeting_slidesubmission SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE meeting_timeslot SET modified = CONVERT_TZ(modified, 'PST8PDT', 'UTC') WHERE modified >= '1969-12-31 16:00:01'; -UPDATE message_message SET sent = CONVERT_TZ(sent, 'PST8PDT', 'UTC') WHERE sent >= '1969-12-31 16:00:01'; -UPDATE message_message SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE message_sendqueue SET send_at = CONVERT_TZ(send_at, 'PST8PDT', 'UTC') WHERE send_at >= '1969-12-31 16:00:01'; -UPDATE message_sendqueue SET sent_at = CONVERT_TZ(sent_at, 'PST8PDT', 'UTC') WHERE sent_at >= '1969-12-31 16:00:01'; -UPDATE message_sendqueue SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE nomcom_feedback SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE nomcom_feedbacklastseen SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE nomcom_nomination SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE nomcom_nomineeposition SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE nomcom_topicfeedbacklastseen SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE oidc_provider_code SET expires_at = CONVERT_TZ(expires_at, 'PST8PDT', 'UTC') WHERE expires_at >= '1969-12-31 16:00:01'; -UPDATE oidc_provider_token SET expires_at = CONVERT_TZ(expires_at, 'PST8PDT', 'UTC') WHERE expires_at >= '1969-12-31 16:00:01'; -UPDATE oidc_provider_userconsent SET date_given = CONVERT_TZ(date_given, 'PST8PDT', 'UTC') WHERE date_given >= '1969-12-31 16:00:01'; -UPDATE oidc_provider_userconsent SET expires_at = CONVERT_TZ(expires_at, 'PST8PDT', 'UTC') WHERE expires_at >= '1969-12-31 16:00:01'; -UPDATE person_email SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE person_historicalemail SET history_date = CONVERT_TZ(history_date, 'PST8PDT', 'UTC') WHERE history_date >= '1969-12-31 16:00:01'; -UPDATE person_historicalemail SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE person_historicalperson SET history_date = CONVERT_TZ(history_date, 'PST8PDT', 'UTC') WHERE history_date >= '1969-12-31 16:00:01'; -UPDATE person_historicalperson SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE person_person SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE person_personalapikey SET created = CONVERT_TZ(created, 'PST8PDT', 'UTC') WHERE created >= '1969-12-31 16:00:01'; -UPDATE person_personalapikey SET latest = CONVERT_TZ(latest, 'PST8PDT', 'UTC') WHERE latest >= '1969-12-31 16:00:01'; -UPDATE person_personevent SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE request_profiler_profilingrecord SET end_ts = CONVERT_TZ(end_ts, 'PST8PDT', 'UTC') WHERE end_ts >= '1969-12-31 16:00:01'; -UPDATE request_profiler_profilingrecord SET start_ts = CONVERT_TZ(start_ts, 'PST8PDT', 'UTC') WHERE start_ts >= '1969-12-31 16:00:01'; -UPDATE review_historicalreviewassignment SET assigned_on = CONVERT_TZ(assigned_on, 'PST8PDT', 'UTC') WHERE assigned_on >= '1969-12-31 16:00:01'; -UPDATE review_historicalreviewassignment SET completed_on = CONVERT_TZ(completed_on, 'PST8PDT', 'UTC') WHERE completed_on >= '1969-12-31 16:00:01'; -UPDATE review_historicalreviewassignment SET history_date = CONVERT_TZ(history_date, 'PST8PDT', 'UTC') WHERE history_date >= '1969-12-31 16:00:01'; -UPDATE review_historicalreviewersettings SET history_date = CONVERT_TZ(history_date, 'PST8PDT', 'UTC') WHERE history_date >= '1969-12-31 16:00:01'; -UPDATE review_historicalreviewrequest SET history_date = CONVERT_TZ(history_date, 'PST8PDT', 'UTC') WHERE history_date >= '1969-12-31 16:00:01'; -UPDATE review_historicalreviewrequest SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE review_historicalunavailableperiod SET history_date = CONVERT_TZ(history_date, 'PST8PDT', 'UTC') WHERE history_date >= '1969-12-31 16:00:01'; -UPDATE review_reviewassignment SET assigned_on = CONVERT_TZ(assigned_on, 'PST8PDT', 'UTC') WHERE assigned_on >= '1969-12-31 16:00:01'; -UPDATE review_reviewassignment SET completed_on = CONVERT_TZ(completed_on, 'PST8PDT', 'UTC') WHERE completed_on >= '1969-12-31 16:00:01'; -UPDATE review_reviewrequest SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE review_reviewwish SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE south_migrationhistory SET applied = CONVERT_TZ(applied, 'PST8PDT', 'UTC') WHERE applied >= '1969-12-31 16:00:01'; -UPDATE submit_preapproval SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE submit_submissioncheck SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE submit_submissionevent SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; -UPDATE tastypie_apikey SET created = CONVERT_TZ(created, 'PST8PDT', 'UTC') WHERE created >= '1969-12-31 16:00:01'; -UPDATE utils_versioninfo SET time = CONVERT_TZ(time, 'PST8PDT', 'UTC') WHERE time >= '1969-12-31 16:00:01'; - -UPDATE meeting_timeslot - JOIN meeting_meeting - ON meeting_meeting.id = meeting_id - SET time = CONVERT_TZ(time, time_zone, 'UTC'); -"""), - migrations.RunPython(convert_pre1970_timestamps), - ] diff --git a/ietf/utils/migrations/0003_pause_to_change_use_tz.py b/ietf/utils/migrations/0003_pause_to_change_use_tz.py deleted file mode 100644 index e2719e241..000000000 --- a/ietf/utils/migrations/0003_pause_to_change_use_tz.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.2.28 on 2022-08-29 10:16 - -from django.conf import settings -from django.db import migrations - - -def forward(apps, schema_editor): - assert getattr(settings, 'USE_TZ', False), 'Please change USE_TZ to True before continuing.' - - -def reverse(apps, schema_editor): - assert not getattr(settings, 'USE_TZ', False), 'Please change USE_TZ to False before continuing.' - - -class Migration(migrations.Migration): - - dependencies = [ - ('utils', '0002_convert_timestamps_to_utc'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/ietf/utils/migrations/0004_pause_to_change_database_engines.py b/ietf/utils/migrations/0004_pause_to_change_database_engines.py deleted file mode 100644 index ce69667c8..000000000 --- a/ietf/utils/migrations/0004_pause_to_change_database_engines.py +++ /dev/null @@ -1,27 +0,0 @@ -# Generated by Django 2.2.28 on 2022-11-10 09:27 - -from django.conf import settings -from django.db import migrations - -def forward(apps, schema_editor): - assert settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql_psycopg2', 'Please change to use postgres before continuing' - -def reverse(apps, schema_editor): - assert settings.DATABASES['default']['ENGINE'] == 'django.db.backends.mysql', 'Please change to use mariadb before continuing' - -class Migration(migrations.Migration): - - dependencies = [ - ('community', '0010_doc_ids_are_ints'), - ('doc', '0050_editorial_stream_states'), - ('group', '0060_editoral_refactor'), - ('utils', '0003_pause_to_change_use_tz'), - ('mailtrigger', '0024_rsab_ballots'), - ('meeting', '0060_normalize_canceled_sessions'), - ('person', '0030_id_term'), - ('review', '0031_id_term'), - ] - - operations = [ - migrations.RunPython(forward, reverse), - ] diff --git a/patch/change-oidc-provider-field-sizes-228.patch b/patch/change-oidc-provider-field-sizes-228.patch index 11dce45bb..8203f163b 100644 --- a/patch/change-oidc-provider-field-sizes-228.patch +++ b/patch/change-oidc-provider-field-sizes-228.patch @@ -143,15 +143,6 @@ diff -ur oidc_provider.orig/migrations/0015_change_client_code.py oidc_provider/ diff -ur oidc_provider.orig/migrations/0016_userconsent_and_verbosenames.py oidc_provider/migrations/0016_userconsent_and_verbosenames.py --- oidc_provider.orig/migrations/0016_userconsent_and_verbosenames.py 2018-04-13 21:43:28.000000000 +0200 +++ oidc_provider/migrations/0016_userconsent_and_verbosenames.py 2020-06-07 13:34:26.826716519 +0200 -@@ -20,7 +20,7 @@ - model_name='userconsent', - name='date_given', - field=models.DateTimeField( -- default=datetime.datetime(2016, 6, 10, 17, 53, 48, 889808, tzinfo=utc), verbose_name='Date Given'), -+ default=datetime.datetime(2016, 6, 10, 17, 53, 48, 889808), verbose_name='Date Given'), - preserve_default=False, - ), - migrations.AlterField( @@ -32,12 +32,12 @@ migrations.AlterField( model_name='client',