2019-09-15 05:38:18 +00:00
|
|
|
# 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
|
|
|
|
|
2019-09-16 00:32:42 +00:00
|
|
|
dependencies = []
|
2019-09-15 05:38:18 +00:00
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2019-09-16 00:32:42 +00:00
|
|
|
name="Airport",
|
2019-09-15 05:38:18 +00:00
|
|
|
fields=[
|
2019-09-16 00:32:42 +00:00
|
|
|
(
|
|
|
|
"icao",
|
|
|
|
models.CharField(max_length=4, primary_key=True, serialize=False),
|
|
|
|
)
|
2019-09-15 05:38:18 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2019-09-16 00:32:42 +00:00
|
|
|
name="Plane",
|
2019-09-15 05:38:18 +00:00
|
|
|
fields=[
|
2019-09-16 00:32:42 +00:00
|
|
|
(
|
|
|
|
"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)),
|
2019-09-15 05:38:18 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2019-09-16 00:32:42 +00:00
|
|
|
name="Flight",
|
2019-09-15 05:38:18 +00:00
|
|
|
fields=[
|
2019-09-16 00:32:42 +00:00
|
|
|
(
|
|
|
|
"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"
|
|
|
|
),
|
|
|
|
),
|
2019-09-15 05:38:18 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
]
|