logbook-django/logbook/flight/migrations/0001_initial.py
2019-09-15 01:38:18 -04:00

57 lines
3.0 KiB
Python

# Generated by Django 2.2.5 on 2019-09-15 05:25
from decimal import Decimal
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Airport',
fields=[
('icao', models.CharField(max_length=4, primary_key=True, serialize=False)),
],
),
migrations.CreateModel(
name='Plane',
fields=[
('tail_number', models.CharField(max_length=64, primary_key=True, serialize=False)),
('name', models.CharField(max_length=64)),
('manufacturer', models.CharField(max_length=64)),
('model', models.CharField(max_length=64)),
],
),
migrations.CreateModel(
name='Flight',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('flight_date', models.DateField()),
('instructor', models.CharField(blank=True, max_length=64)),
('remarks', models.TextField(blank=True)),
('landings', models.IntegerField()),
('airplane_sel_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('airplane_mel_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('cross_country_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('day_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('night_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('actual_instrument_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('simulated_instrument_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('ground_trainer_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('dual_received_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('pilot_in_command_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('total_time', models.DecimalField(decimal_places=1, default=Decimal('0'), max_digits=2)),
('link', models.CharField(blank=True, max_length=200)),
('airport_arrive', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='flight_to', to='flight.Airport')),
('airport_depart', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='flight_from', to='flight.Airport')),
('plane', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='flight.Plane')),
],
),
]