datatracker/ietf/mailinglists/migrations/0002_nonwgmailinglist.py
Robert Sparks efdaee3bb3
feat: decouple from mailman2 - explicitly model nonwg mailing lists (#7013)
* fix: remove synchronization with mailman2

* feat: manage non wg mailing lists explicitly

* chore: black

* fix: update tests for new nonwg view

* feat: drop unused models
2024-02-05 09:28:23 -06:00

629 lines
11 KiB
Python

# Copyright The IETF Trust 2024, All Rights Reserved
from django.db import migrations, models
def forward(apps, schema_editor):
NonWgMailingList = apps.get_model("mailinglists", "NonWgMailingList")
List = apps.get_model("mailinglists", "List")
for l in List.objects.filter(
pk__in=[
10754,
10769,
10770,
10768,
10787,
10785,
10791,
10786,
10816,
10817,
10819,
10818,
10922,
10923,
10921,
10940,
10941,
10942,
572,
10297,
182,
43,
10704,
10314,
201,
419,
282,
149,
223,
10874,
10598,
10639,
10875,
10737,
105,
65,
10781,
10771,
10946,
518,
421,
214,
285,
393,
445,
553,
183,
10725,
33,
10766,
114,
417,
10789,
10876,
4244,
10705,
10706,
10878,
10324,
10879,
10642,
10821,
547,
532,
10636,
10592,
327,
248,
10697,
288,
346,
10731,
10955,
10857,
446,
55,
10799,
10800,
10801,
10612,
73,
3,
358,
9640,
10868,
378,
462,
6595,
10914,
10915,
197,
63,
558,
10824,
124,
10881,
177,
312,
252,
185,
523,
4572,
10618,
206,
68,
10859,
560,
513,
246,
7817,
148,
10864,
10589,
10773,
10748,
364,
311,
10302,
10272,
10929,
171,
10865,
10919,
377,
469,
467,
411,
505,
6318,
10811,
10304,
10882,
10845,
568,
10883,
4774,
264,
10779,
10884,
10303,
409,
10590,
451,
10749,
10765,
486,
519,
10593,
10313,
550,
10707,
307,
10861,
10654,
10708,
10275,
134,
460,
10911,
10574,
10885,
10814,
10676,
10747,
10305,
10688,
36,
10844,
10620,
458,
10282,
10594,
10752,
389,
296,
10684,
48,
533,
443,
10739,
491,
139,
461,
10690,
424,
290,
336,
31,
10709,
382,
10866,
10724,
539,
10710,
559,
10609,
74,
10582,
133,
10621,
34,
10596,
442,
13,
56,
128,
323,
10285,
80,
315,
3520,
10949,
10950,
189,
2599,
10822,
164,
10267,
10286,
464,
440,
254,
262,
10943,
465,
75,
179,
162,
457,
10572,
372,
452,
10273,
88,
366,
331,
140,
407,
416,
91,
10632,
542,
151,
117,
431,
10628,
10271,
14,
540,
278,
352,
159,
10851,
9981,
10694,
10619,
10732,
320,
348,
338,
349,
10678,
468,
293,
350,
402,
57,
524,
141,
71,
67,
508,
7828,
10268,
10631,
10713,
10889,
345,
78,
342,
190,
10869,
46,
334,
255,
5823,
400,
10867,
23,
10666,
10685,
405,
2801,
92,
137,
10640,
10656,
104,
123,
10643,
10891,
466,
10567,
10318,
526,
30,
222,
194,
10735,
10714,
247,
493,
1162,
414,
10648,
10677,
126,
16,
422,
271,
295,
81,
10634,
544,
10850,
426,
573,
353,
10829,
538,
10913,
10566,
167,
10675,
272,
10673,
10767,
528,
284,
564,
268,
10825,
231,
520,
10645,
10872,
515,
10956,
10947,
569,
233,
10952,
195,
10938,
2809,
10591,
10665,
9639,
10775,
10760,
10715,
10716,
10667,
361,
184,
10935,
10957,
10944,
94,
449,
525,
1962,
10300,
10894,
9156,
10774,
256,
289,
218,
187,
40,
10777,
10761,
10670,
249,
10764,
420,
548,
232,
410,
196,
72,
335,
70,
146,
10287,
10299,
10311,
10895,
10617,
531,
343,
10934,
10933,
10597,
158,
10600,
10692,
8630,
556,
324,
11,
10784,
498,
10772,
478,
10833,
10691,
391,
10565,
10669,
113,
110,
7831,
10855,
10312,
10315,
10896,
10672,
10306,
438,
395,
82,
10599,
10953,
10858,
10807,
10717,
310,
10808,
119,
10595,
10718,
10317,
10898,
454,
427,
10583,
10916,
403,
10843,
10899,
291,
10812,
10900,
10794,
341,
121,
230,
136,
166,
394,
234,
10901,
2466,
10573,
10939,
221,
490,
10820,
10873,
10792,
10870,
10793,
10904,
181,
10693,
482,
10611,
125,
10568,
10788,
211,
10756,
10719,
100,
228,
5833,
251,
122,
39,
534,
437,
504,
10613,
439,
306,
10863,
10823,
10926,
76,
227,
59,
42,
455,
10927,
10928,
204,
430,
10720,
267,
396,
10849,
10308,
281,
10905,
10736,
168,
153,
385,
89,
529,
412,
215,
484,
10951,
66,
173,
10633,
10681,
3613,
10274,
10750,
367,
387,
10832,
35,
147,
10325,
10671,
565,
313,
10871,
10751,
37,
10936,
10937,
287,
496,
244,
10841,
10683,
10906,
10584,
479,
10856,
163,
10910,
257,
276,
10840,
10689,
365,
10847,
99,
77,
435,
213,
15,
10932,
58,
10722,
131,
363,
10674,
322,
180,
10917,
10918,
10738,
10954,
10581,
208,
337,
4,
571,
10668,
10291,
]
):
NonWgMailingList.objects.create(name=l.name, description=l.description)
class Migration(migrations.Migration):
dependencies = [
("mailinglists", "0001_initial"),
]
operations = [
migrations.CreateModel(
name="NonWgMailingList",
fields=[
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=32)),
("description", models.CharField(max_length=256)),
],
),
migrations.RunPython(forward),
]