class Migration(migrations.Migration):

    dependencies = [
        ('deployments', '0011_deploymentsensor_notifications_on'),
    ]

    operations = [
        migrations.CreateModel(
            name='AlertScheduleDay',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('day_of_week', models.IntegerField(null=False)),
                ('deployment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='alert_schedule_days',
                                   to='deployments.Deployment')),
                ('client_notifications_from_1',
                 models.TimeField(
                     blank=True,
                     help_text=
                     'If left blank, no recording will happen during this period',
                     null=True)),
                ('client_notifications_to_1',
                 models.TimeField(
                     blank=True,
                     help_text=
                     'If left blank, no recording will happen during this period',
                     null=True)),
                ('client_notifications_from_2',
                 models.TimeField(
                     blank=True,
                     help_text=
                     'If left blank, no recording will happen during this period',
                     null=True)),
                ('client_notifications_to_2',
                 models.TimeField(
                     blank=True,
                     help_text=
                     'If left blank, no recording will happen during this period',
                     null=True)),
                ('client_notifications_from_3',
                 models.TimeField(
                     blank=True,
                     help_text=
                     'If left blank, no recording will happen during this period',
                     null=True)),
                ('client_notifications_to_3',
                 models.TimeField(
                     blank=True,
                     help_text=
                     'If left blank, no recording will happen during this period',
                     null=True))
            ])
    ]
Beispiel #2
0
class Migration(migrations.Migration):

    dependencies = [
        ('api', '0020_auto_20190703_0614'),
        ('per', '0007_nsphase'),
    ]

    operations = [
        migrations.CreateModel(
            name='ERUReadiness',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('ERU_type',
                 enumfields.fields.EnumIntegerField(
                     default=0, enum=deployments.models.ERUType)),
                ('is_personnel', models.BooleanField(default=False)),
                ('is_equipment', models.BooleanField(default=False)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('national_society',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.Country')),
            ],
            options={
                'verbose_name': 'ERU Readiness',
                'verbose_name_plural': 'NS-es ERU Readiness',
                'ordering': ('updated_at', 'national_society'),
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('deployments', '0013_auto_20190722_1410'),
    ]

    operations = [
        migrations.RenameField(
            model_name='project',
            old_name='sector',
            new_name='primary_sector',
        ),
        migrations.AddField(
            model_name='project',
            name='operation_type',
            field=enumfields.fields.EnumIntegerField(
                default=0, enum=deployments.models.OperationTypes),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='project',
            name='secondary_sectors',
            field=django.contrib.postgres.fields.ArrayField(
                base_field=enumfields.fields.EnumIntegerField(
                    enum=deployments.models.Sectors),
                blank=True,
                default=list,
                size=None,
            ),
        ),
        migrations.AddField(
            model_name='project',
            name='modified_at',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.CreateModel(
            name='RegionalProject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddField(
            model_name='project',
            name='regional_project',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='deployments.RegionalProject',
            ),
        ),
        migrations.AddField(
            model_name='project',
            name='dtype',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='api.DisasterType',
            ),
        ),
        migrations.AddField(
            model_name='project',
            name='event',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='api.Event',
            ),
        ),
        migrations.AddField(
            model_name='project',
            name='reached_children',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='project',
            name='reached_female',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='project',
            name='reached_male',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='project',
            name='reached_total',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='project',
            name='target_children',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='project',
            name='target_female',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='project',
            name='target_male',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name='project',
            name='target_total',
            field=models.IntegerField(blank=True, null=True),
        ),
    ]
Beispiel #4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('api', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='DeployedPerson',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_date', models.DateTimeField(null=True)),
                ('end_date', models.DateTimeField(null=True)),
                ('name', models.CharField(blank=True,
                                          max_length=100,
                                          null=True)),
                ('role', models.CharField(blank=True, max_length=32,
                                          null=True)),
                ('society_deployed_from',
                 models.CharField(blank=True, max_length=100, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ERU',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('type',
                 enumfields.fields.EnumIntegerField(
                     default=0, enum=deployments.models.ERUType)),
                ('units', models.IntegerField(default=0)),
                ('equipment_units', models.IntegerField(default=0)),
                ('available', models.BooleanField(default=False)),
                ('deployed_to',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.Country')),
            ],
        ),
        migrations.CreateModel(
            name='ERUOwner',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('national_society_country',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.Country')),
            ],
            options={
                'verbose_name': 'ERUs from a National Society',
                'verbose_name_plural': 'ERUs',
            },
        ),
        migrations.CreateModel(
            name='Fact',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_date', models.DateTimeField(null=True)),
                ('comments', models.TextField(blank=True, null=True)),
                ('country',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Country')),
                ('dtype',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.DisasterType')),
                ('event',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.Event')),
                ('region',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Region')),
            ],
            options={
                'verbose_name': 'FACT',
                'verbose_name_plural': 'FACTs',
            },
        ),
        migrations.CreateModel(
            name='Heop',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_date', models.DateTimeField(null=True)),
                ('end_date', models.DateTimeField(null=True)),
                ('person',
                 models.CharField(blank=True, max_length=100, null=True)),
                ('role',
                 models.CharField(blank=True,
                                  default='HeOps',
                                  max_length=32,
                                  null=True)),
                ('comments', models.TextField(blank=True, null=True)),
                ('country',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Country')),
                ('dtype',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.DisasterType')),
                ('event',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.Event')),
                ('region',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Region')),
            ],
            options={
                'verbose_name': 'HeOp',
                'verbose_name_plural': 'HeOps',
            },
        ),
        migrations.CreateModel(
            name='Rdrt',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('start_date', models.DateTimeField(null=True)),
                ('comments', models.TextField(blank=True, null=True)),
                ('country',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Country')),
                ('dtype',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.DisasterType')),
                ('event',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='api.Event')),
                ('region',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='api.Region')),
            ],
            options={
                'verbose_name': 'RDRT/RIT',
                'verbose_name_plural': 'RDRTs/RITs',
            },
        ),
        migrations.CreateModel(
            name='FactPerson',
            fields=[
                ('deployedperson_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='deployments.DeployedPerson')),
                ('fact',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='deployments.Fact')),
            ],
            options={
                'verbose_name': 'FACT Person',
                'verbose_name_plural': 'FACT People',
            },
            bases=('deployments.deployedperson', ),
        ),
        migrations.CreateModel(
            name='RdrtPerson',
            fields=[
                ('deployedperson_ptr',
                 models.OneToOneField(
                     auto_created=True,
                     on_delete=django.db.models.deletion.CASCADE,
                     parent_link=True,
                     primary_key=True,
                     serialize=False,
                     to='deployments.DeployedPerson')),
                ('rdrt',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='deployments.Rdrt')),
            ],
            options={
                'verbose_name': 'RDRT/RIT Person',
                'verbose_name_plural': 'RDRT/RIT People',
            },
            bases=('deployments.deployedperson', ),
        ),
        migrations.AddField(
            model_name='eru',
            name='eru_owner',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='deployments.ERUOwner'),
        ),
        migrations.AddField(
            model_name='eru',
            name='event',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='api.Event'),
        ),
    ]