<filename>taxi/migrations/0001_initial.py<gh_stars>1-10
# Generated by Django 2.2 on 2019-05-09 06:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BusTrip',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('first_departure_date', models.DateTimeField()),
                ('first_arrival_date', models.DateTimeField()),
                ('second_departure_date', models.DateTimeField(blank=True, null=True)),
                ('second_arrival_date', models.DateTimeField(blank=True, null=True)),
                ('round_trip', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('city', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('address', models.CharField(max_length=50)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locations', to='taxi.City')),
            ],
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('state', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Taxi',
            fields=[
                ('driver_name', models.CharField(max_length=50)),
                ('email', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('password', models.CharField(max_length=50)),
                ('plate', models.CharField(max_length=15)),
                ('model', models.CharField(max_length=50)),
                ('brand', models.CharField(max_length=50)),
                ('taxi_number', models.IntegerField()),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='taxis', to='taxi.City')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('name', models.CharField(max_length=50)),
                ('email', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('password', models.CharField(max_length=50)),
                ('card', models.CharField(max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='TaxiTrip',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('departure_date', models.DateTimeField()),
                ('arrival_date', models.DateTimeField()),
                ('price', models.FloatField(blank=True, null=True)),
                ('taxi_rating', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('user_rating', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('distance_meters', models.FloatField()),
                ('distance_string', models.CharField(max_length=100)),
                ('time_seconds', models.BigIntegerField()),
                ('time_string', models.CharField(max_length=100)),
                ('status', models.CharField(max_length=9)),
                ('bus_trip', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='taxiTrips', to='taxi.BusTrip')),
                ('destination', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='taxiTripsD', to='taxi.Location')),
                ('origin', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='taxiTripsO', to='taxi.Location')),
                ('taxi', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='trips', to='taxi.Taxi')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='taxiTrips', to='taxi.User')),
            ],
        ),
        migrations.AddField(
            model_name='city',
            name='state',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cities', to='taxi.State'),
        ),
        migrations.AddField(
            model_name='bustrip',
            name='destination',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='busTripsD', to='taxi.Location'),
        ),
        migrations.AddField(
            model_name='bustrip',
            name='origin',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='busTripsO', to='taxi.Location'),
        ),
    ]

<filename>taxi/migrations/0001_initial.py<gh_stars>1-10
# Generated by Django 2.2 on 2019-05-09 06:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BusTrip',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('first_departure_date', models.DateTimeField()),
                ('first_arrival_date', models.DateTimeField()),
                ('second_departure_date', models.DateTimeField(blank=True, null=True)),
                ('second_arrival_date', models.DateTimeField(blank=True, null=True)),
                ('round_trip', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('city', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('address', models.CharField(max_length=50)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locations', to='taxi.City')),
            ],
        ),
        migrations.CreateModel(
            name='State',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('state', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Taxi',
            fields=[
                ('driver_name', models.CharField(max_length=50)),
                ('email', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('password', models.CharField(max_length=50)),
                ('plate', models.CharField(max_length=15)),
                ('model', models.CharField(max_length=50)),
                ('brand', models.CharField(max_length=50)),
                ('taxi_number', models.IntegerField()),
                ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='taxis', to='taxi.City')),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('name', models.CharField(max_length=50)),
                ('email', models.CharField(max_length=50, primary_key=True, serialize=False)),
                ('password', models.CharField(max_length=50)),
                ('card', models.CharField(max_length=16)),
            ],
        ),
        migrations.CreateModel(
            name='TaxiTrip',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('departure_date', models.DateTimeField()),
                ('arrival_date', models.DateTimeField()),
                ('price', models.FloatField(blank=True, null=True)),
                ('taxi_rating', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('user_rating', models.PositiveSmallIntegerField(blank=True, null=True)),
                ('distance_meters', models.FloatField()),
                ('distance_string', models.CharField(max_length=100)),
                ('time_seconds', models.BigIntegerField()),
                ('time_string', models.CharField(max_length=100)),
                ('status', models.CharField(max_length=9)),
                ('bus_trip', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='taxiTrips', to='taxi.BusTrip')),
                ('destination', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='taxiTripsD', to='taxi.Location')),
                ('origin', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='taxiTripsO', to='taxi.Location')),
                ('taxi', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='trips', to='taxi.Taxi')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='taxiTrips', to='taxi.User')),
            ],
        ),
        migrations.AddField(
            model_name='city',
            name='state',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cities', to='taxi.State'),
        ),
        migrations.AddField(
            model_name='bustrip',
            name='destination',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='busTripsD', to='taxi.Location'),
        ),
        migrations.AddField(
            model_name='bustrip',
            name='origin',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='busTripsO', to='taxi.Location'),
        ),
    ]

# Generated by Django 2.2 on 2019-05-09 06:09