<filename>data/migrations/0001_initial.py<gh_stars>1-10
# Generated by Django 2.1.3 on 2018-11-17 04:48

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Destination',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Ferry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Route',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('route_code', models.IntegerField()),
                ('car_waits', models.IntegerField(blank=True, default=None, null=True)),
                ('oversize_waits', models.IntegerField(blank=True, default=None, null=True)),
                ('destination', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Destination')),
            ],
        ),
        migrations.CreateModel(
            name='RouteEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
        ),
        migrations.CreateModel(
            name='Sailing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('scheduled_departure', models.DateTimeField()),
                ('actual_departure', models.DateTimeField(blank=True, null=True)),
                ('eta_or_arrival_time', models.DateTimeField(blank=True, null=True)),
                ('arrived', models.BooleanField(default=False)),
                ('percent_full', models.IntegerField(blank=True, default=None, null=True)),
                ('ferry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='data.Ferry')),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Route')),
            ],
        ),
        migrations.CreateModel(
            name='SailingEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Terminal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
                ('short_name', models.CharField(max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='ArrivalTimeEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('old_arrival', models.DateTimeField(blank=True, null=True)),
                ('new_arrival', models.DateTimeField(blank=True, null=True)),
                ('is_eta', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='ArrivedEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='CarWaitEvent',
            fields=[
                ('routeevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.RouteEvent')),
                ('old_value', models.IntegerField(blank=True, null=True)),
                ('new_value', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.routeevent',),
        ),
        migrations.CreateModel(
            name='DepartedEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='DepartureTimeEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('old_departure', models.DateTimeField(blank=True, null=True)),
                ('new_departure', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='FerryEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('new_ferry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='new_ferry', to='data.Ferry')),
                ('old_ferry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='old_ferry', to='data.Ferry')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='OversizeWaitEvent',
            fields=[
                ('routeevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.RouteEvent')),
                ('old_value', models.IntegerField(blank=True, null=True)),
                ('new_value', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.routeevent',),
        ),
        migrations.CreateModel(
            name='PercentFullEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('old_value', models.IntegerField(blank=True, null=True)),
                ('new_value', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='StatusEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('new_status', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='new_status', to='data.Status')),
                ('old_status', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='old_status', to='data.Status')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.AddField(
            model_name='sailingevent',
            name='polymorphic_ctype',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_data.sailingevent_set+', to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='sailingevent',
            name='sailing',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Sailing'),
        ),
        migrations.AddField(
            model_name='sailing',
            name='status',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='data.Status'),
        ),
        migrations.AddField(
            model_name='routeevent',
            name='polymorphic_ctype',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_data.routeevent_set+', to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='routeevent',
            name='route',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Route'),
        ),
        migrations.AddField(
            model_name='route',
            name='source',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Terminal'),
        ),
        migrations.AddField(
            model_name='destination',
            name='terminal',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='data.Terminal'),
        ),
    ]

<filename>data/migrations/0001_initial.py<gh_stars>1-10
# Generated by Django 2.1.3 on 2018-11-17 04:48

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Destination',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Ferry',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='Route',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('route_code', models.IntegerField()),
                ('car_waits', models.IntegerField(blank=True, default=None, null=True)),
                ('oversize_waits', models.IntegerField(blank=True, default=None, null=True)),
                ('destination', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Destination')),
            ],
        ),
        migrations.CreateModel(
            name='RouteEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
        ),
        migrations.CreateModel(
            name='Sailing',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('scheduled_departure', models.DateTimeField()),
                ('actual_departure', models.DateTimeField(blank=True, null=True)),
                ('eta_or_arrival_time', models.DateTimeField(blank=True, null=True)),
                ('arrived', models.BooleanField(default=False)),
                ('percent_full', models.IntegerField(blank=True, default=None, null=True)),
                ('ferry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='data.Ferry')),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Route')),
            ],
        ),
        migrations.CreateModel(
            name='SailingEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timestamp', models.DateTimeField(auto_now=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(max_length=256)),
            ],
        ),
        migrations.CreateModel(
            name='Terminal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64)),
                ('short_name', models.CharField(max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='ArrivalTimeEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('old_arrival', models.DateTimeField(blank=True, null=True)),
                ('new_arrival', models.DateTimeField(blank=True, null=True)),
                ('is_eta', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='ArrivedEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='CarWaitEvent',
            fields=[
                ('routeevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.RouteEvent')),
                ('old_value', models.IntegerField(blank=True, null=True)),
                ('new_value', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.routeevent',),
        ),
        migrations.CreateModel(
            name='DepartedEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='DepartureTimeEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('old_departure', models.DateTimeField(blank=True, null=True)),
                ('new_departure', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='FerryEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('new_ferry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='new_ferry', to='data.Ferry')),
                ('old_ferry', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='old_ferry', to='data.Ferry')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='OversizeWaitEvent',
            fields=[
                ('routeevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.RouteEvent')),
                ('old_value', models.IntegerField(blank=True, null=True)),
                ('new_value', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.routeevent',),
        ),
        migrations.CreateModel(
            name='PercentFullEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('old_value', models.IntegerField(blank=True, null=True)),
                ('new_value', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.CreateModel(
            name='StatusEvent',
            fields=[
                ('sailingevent_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='data.SailingEvent')),
                ('new_status', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='new_status', to='data.Status')),
                ('old_status', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='old_status', to='data.Status')),
            ],
            options={
                'abstract': False,
                'base_manager_name': 'objects',
            },
            bases=('data.sailingevent',),
        ),
        migrations.AddField(
            model_name='sailingevent',
            name='polymorphic_ctype',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_data.sailingevent_set+', to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='sailingevent',
            name='sailing',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Sailing'),
        ),
        migrations.AddField(
            model_name='sailing',
            name='status',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='data.Status'),
        ),
        migrations.AddField(
            model_name='routeevent',
            name='polymorphic_ctype',
            field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_data.routeevent_set+', to='contenttypes.ContentType'),
        ),
        migrations.AddField(
            model_name='routeevent',
            name='route',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Route'),
        ),
        migrations.AddField(
            model_name='route',
            name='source',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data.Terminal'),
        ),
        migrations.AddField(
            model_name='destination',
            name='terminal',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='data.Terminal'),
        ),
    ]

# Generated by Django 2.1.3 on 2018-11-17 04:48