Missing migrations from 18298. Commit ready for merge.
- Legacy-Id: 18299
This commit is contained in:
parent
2b10465aa7
commit
e7e1cc2a8e
56
ietf/group/migrations/0035_add_research_area_groups.py
Normal file
56
ietf/group/migrations/0035_add_research_area_groups.py
Normal file
|
@ -0,0 +1,56 @@
|
|||
# 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)
|
||||
]
|
28
ietf/name/migrations/0016_add_research_area_groups.py
Normal file
28
ietf/name/migrations/0016_add_research_area_groups.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
# 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),
|
||||
]
|
Loading…
Reference in a new issue