text: # -*- coding: utf-8 -*-
  # Generated by Django 1.11.13 on 2018-08-04 11:34
  from __future__ import unicode_literals
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='Place',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=20)),
              ],
          ),
          migrations.CreateModel(
              name='Route',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=5)),
                  ('dst1', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dst_1', to='home.Place')),
                  ('dst2', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dst_2', to='home.Place')),
              ],
          ),
          migrations.CreateModel(
              name='Seat',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('number', models.CharField(max_length=8)),
                  ('occupied', models.BooleanField(default=False)),
              ],
          ),
          migrations.CreateModel(
              name='Ticket',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('client_name', models.CharField(max_length=120)),
                  ('telephone', models.IntegerField()),
                  ('seat', models.IntegerField()),
              ],
          ),
          migrations.CreateModel(
              name='TravelTime',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('time', models.TimeField()),
              ],
          ),
          migrations.CreateModel(
              name='Trip',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('date', models.DateField(auto_now=True)),
                  ('available', models.BooleanField(default=True)),
                  ('departure', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='trip_dept', to='home.TravelTime')),
                  ('end', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trip_end', to='home.Place')),
                  ('start', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trip_start', to='home.Place')),
              ],
          ),
          migrations.CreateModel(
              name='Vehicle',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('plate', models.CharField(max_length=8)),
                  ('route', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='home.Route')),
              ],
          ),
          migrations.AddField(
              model_name='trip',
              name='vehicle',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.Vehicle'),
          ),
          migrations.AddField(
              model_name='ticket',
              name='trip',
              field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='home.Trip'),
          ),
          migrations.AddField(
              model_name='seat',
              name='trip',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='home.Trip'),
          ),
      ]
  