# Phase 2: Rename OrgSubSection to Section, add champion, remove point_of_contact

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('organizations', '0007_remove_department_area_alter_department_location_type_and_more'),
    ]

    operations = [
        migrations.RenameModel(
            old_name='OrgSubSection',
            new_name='Section',
        ),
        migrations.AlterModelOptions(
            name='section',
            options={'ordering': ['department', 'name_en'], 'verbose_name': 'Section', 'verbose_name_plural': 'Sections'},
        ),
        migrations.AlterField(
            model_name='section',
            name='location_type',
            field=models.CharField(
                blank=True,
                choices=[
                    ('OP', 'Outpatient'),
                    ('IP', 'Inpatient'),
                    ('ER', 'Emergency'),
                    ('GENERAL', 'General'),
                ],
                max_length=20,
            ),
        ),
        migrations.RemoveField(
            model_name='section',
            name='point_of_contact',
        ),
        migrations.AddField(
            model_name='section',
            name='champion',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=models.SET_NULL,
                related_name='champion_sections',
                to='organizations.staff',
            ),
        ),
        migrations.AlterField(
            model_name='section',
            name='department',
            field=models.ForeignKey(
                on_delete=models.CASCADE,
                related_name='sections',
                to='organizations.department',
            ),
        ),
    ]
