<filename>taiwanpeaks/routes/migrations/0001_initial.py
# Generated by Django 3.1.1 on 2020-10-07 14:41

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Cabin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('name_zh', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('capacity', models.IntegerField()),
                ('altitude', models.IntegerField()),
                ('latitude', models.DecimalField(decimal_places=8, max_digits=12)),
                ('longitude', models.DecimalField(decimal_places=8, max_digits=12)),
                ('photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='cabins', to='photos.photo')),
            ],
        ),
        migrations.CreateModel(
            name='Route',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('name_zh', models.CharField(max_length=255)),
                ('active', models.BooleanField(default=False)),
                ('intro', models.TextField()),
                ('difficulty', models.CharField(choices=[('beginner', 'Beginner'), ('intermediate', 'Intermediate'), ('advanced', 'Advanced'), ('expert', 'Expert')], max_length=50)),
                ('total_distance', models.IntegerField()),
                ('days_required', models.IntegerField()),
                ('peak_count', models.IntegerField()),
                ('location', models.CharField(choices=[('taroko', 'Taroko National Park'), ('sheipa', 'Shei-pa National Park'), ('jade', 'Yushan National Park')], max_length=50)),
                ('public_transport_accessible', models.BooleanField()),
                ('cabin_status', models.CharField(choices=[('none', 'No cabins'), ('mixed', 'Mixed cabins/camping'), ('full', 'All cabins')], max_length=50)),
                ('gpx', models.FileField(blank=True, null=True, upload_to=routes.models.route_gpx_path)),
                ('np_permit_required', models.CharField(blank=True, choices=[('taroko', 'Taroko National Park'), ('sheipa', 'Shei-pa National Park'), ('jade', 'Yushan National Park')], max_length=50, null=True)),
                ('police_permit_required', models.BooleanField()),
                ('transportation_desc', models.TextField()),
                ('transportation_link', models.URLField()),
                ('header_background_photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='header_background_routes', to='photos.photo')),
                ('summary_background_photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='summary_background_routes', to='photos.photo')),
            ],
        ),
        migrations.CreateModel(
            name='RouteItinerary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day_no', models.IntegerField()),
                ('total_distance', models.DecimalField(decimal_places=1, max_digits=3)),
                ('total_hours', models.DecimalField(decimal_places=1, max_digits=3)),
                ('rest_name', models.CharField(max_length=255)),
                ('rest_type', models.CharField(choices=[('cabin', 'Cabin'), ('campground', 'Campground')], max_length=50)),
                ('water_desc', models.CharField(blank=True, max_length=255, null=True)),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='itineraries', to='routes.route')),
            ],
            options={
                'ordering': ['day_no'],
            },
        ),
        migrations.CreateModel(
            name='RouteItineraryPoint',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('type', models.CharField(blank=True, choices=[('trailhead', 'Trailhead'), ('peak', 'Top 100 peak'), ('cabin', 'Cabin')], max_length=50, null=True)),
                ('order', models.IntegerField()),
                ('route_itinerary', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='points', to='routes.routeitinerary')),
            ],
        ),
        migrations.CreateModel(
            name='RouteItineraryPhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='route_itineraries', to='photos.photo')),
                ('route_itinerary', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='photos', to='routes.routeitinerary')),
            ],
        ),
        migrations.CreateModel(
            name='RouteCabin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('cabin', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='routes', to='routes.cabin')),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='cabins', to='routes.route')),
            ],
        ),
        migrations.CreateModel(
            name='RouteCarouselPhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='routes', to='photos.photo')),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='carousel_photos', to='routes.route')),
            ],
            options={
                'unique_together': {('route', 'photo')},
            },
        ),
    ]

<filename>taiwanpeaks/routes/migrations/0001_initial.py
# Generated by Django 3.1.1 on 2020-10-07 14:41

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Cabin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('name_zh', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('capacity', models.IntegerField()),
                ('altitude', models.IntegerField()),
                ('latitude', models.DecimalField(decimal_places=8, max_digits=12)),
                ('longitude', models.DecimalField(decimal_places=8, max_digits=12)),
                ('photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='cabins', to='photos.photo')),
            ],
        ),
        migrations.CreateModel(
            name='Route',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('slug', models.SlugField(unique=True)),
                ('name_zh', models.CharField(max_length=255)),
                ('active', models.BooleanField(default=False)),
                ('intro', models.TextField()),
                ('difficulty', models.CharField(choices=[('beginner', 'Beginner'), ('intermediate', 'Intermediate'), ('advanced', 'Advanced'), ('expert', 'Expert')], max_length=50)),
                ('total_distance', models.IntegerField()),
                ('days_required', models.IntegerField()),
                ('peak_count', models.IntegerField()),
                ('location', models.CharField(choices=[('taroko', 'Taroko National Park'), ('sheipa', 'Shei-pa National Park'), ('jade', 'Yushan National Park')], max_length=50)),
                ('public_transport_accessible', models.BooleanField()),
                ('cabin_status', models.CharField(choices=[('none', 'No cabins'), ('mixed', 'Mixed cabins/camping'), ('full', 'All cabins')], max_length=50)),
                ('gpx', models.FileField(blank=True, null=True, upload_to=routes.models.route_gpx_path)),
                ('np_permit_required', models.CharField(blank=True, choices=[('taroko', 'Taroko National Park'), ('sheipa', 'Shei-pa National Park'), ('jade', 'Yushan National Park')], max_length=50, null=True)),
                ('police_permit_required', models.BooleanField()),
                ('transportation_desc', models.TextField()),
                ('transportation_link', models.URLField()),
                ('header_background_photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='header_background_routes', to='photos.photo')),
                ('summary_background_photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='summary_background_routes', to='photos.photo')),
            ],
        ),
        migrations.CreateModel(
            name='RouteItinerary',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('day_no', models.IntegerField()),
                ('total_distance', models.DecimalField(decimal_places=1, max_digits=3)),
                ('total_hours', models.DecimalField(decimal_places=1, max_digits=3)),
                ('rest_name', models.CharField(max_length=255)),
                ('rest_type', models.CharField(choices=[('cabin', 'Cabin'), ('campground', 'Campground')], max_length=50)),
                ('water_desc', models.CharField(blank=True, max_length=255, null=True)),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField()),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='itineraries', to='routes.route')),
            ],
            options={
                'ordering': ['day_no'],
            },
        ),
        migrations.CreateModel(
            name='RouteItineraryPoint',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('type', models.CharField(blank=True, choices=[('trailhead', 'Trailhead'), ('peak', 'Top 100 peak'), ('cabin', 'Cabin')], max_length=50, null=True)),
                ('order', models.IntegerField()),
                ('route_itinerary', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='points', to='routes.routeitinerary')),
            ],
        ),
        migrations.CreateModel(
            name='RouteItineraryPhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='route_itineraries', to='photos.photo')),
                ('route_itinerary', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='photos', to='routes.routeitinerary')),
            ],
        ),
        migrations.CreateModel(
            name='RouteCabin',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('cabin', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='routes', to='routes.cabin')),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='cabins', to='routes.route')),
            ],
        ),
        migrations.CreateModel(
            name='RouteCarouselPhoto',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order', models.IntegerField()),
                ('photo', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='routes', to='photos.photo')),
                ('route', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='carousel_photos', to='routes.route')),
            ],
            options={
                'unique_together': {('route', 'photo')},
            },
        ),
    ]

# Generated by Django 3.1.1 on 2020-10-07 14:41