76 lines
3.0 KiB
Python
76 lines
3.0 KiB
Python
# Generated by Django 3.0.2 on 2020-01-07 19:30
|
|
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Adres',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('kod', models.TextField()),
|
|
('miasto', models.TextField()),
|
|
('ulica', models.TextField()),
|
|
('numer', models.TextField()),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Modele',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('nazwa', models.TextField(unique=True)),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Producent',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('nazwa', models.TextField(unique=True)),
|
|
('kraj', models.TextField()),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Samochod',
|
|
fields=[
|
|
('vin', models.TextField(primary_key=True, serialize=False, unique=True)),
|
|
('rocznik', models.IntegerField()),
|
|
('przebieg', models.IntegerField()),
|
|
('dane_dodatkowe', models.TextField()),
|
|
('id_model', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='przyrost.Modele')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Sprzedawca',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('imie', models.TextField()),
|
|
('nazwisko', models.TextField()),
|
|
('auto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.Samochod')),
|
|
('id_adres', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.Adres')),
|
|
],
|
|
),
|
|
migrations.CreateModel(
|
|
name='Oferta',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('czas_wystawienia', models.DateField()),
|
|
('cena', models.FloatField()),
|
|
('auto', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.Samochod')),
|
|
('id_sprzedawca', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='przyrost.Sprzedawca')),
|
|
],
|
|
),
|
|
migrations.AddField(
|
|
model_name='modele',
|
|
name='id_producent',
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='przyrost.Producent'),
|
|
),
|
|
]
|