Add more data to model and login
This commit is contained in:
parent
783e5e92cb
commit
522322b1e1
8 changed files with 147 additions and 6 deletions
|
@ -0,0 +1,31 @@
|
|||
# Generated by Django 5.2.5 on 2025-08-09 18:42
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveConstraint(
|
||||
model_name='fuelpurchase',
|
||||
name='unique_fuel_purchase',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='fuelpurchase',
|
||||
name='gas_station',
|
||||
field=models.IntegerField(choices=[(0, '-'), (1, 'Neste'), (2, 'Teboil'), (3, 'ABC'), (4, 'Shell'), (5, 'St1'), (6, 'SEO'), (7, 'ysi5')], default=1, verbose_name='Gas Station'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='fuelpurchase',
|
||||
name='octane',
|
||||
field=models.IntegerField(choices=[(95, '95'), (98, '98')], default=95, verbose_name='Octane'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fuelpurchase',
|
||||
constraint=models.UniqueConstraint(fields=('purchase_date', 'total_cost', 'price_per_litre', 'amount_litres', 'octane', 'gas_station'), name='unique_fuel_purchase'),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,26 @@
|
|||
# Generated by Django 5.2.5 on 2025-08-09 19:20
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0002_remove_fuelpurchase_unique_fuel_purchase_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveConstraint(
|
||||
model_name='fuelpurchase',
|
||||
name='unique_fuel_purchase',
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='fuelpurchase',
|
||||
name='car',
|
||||
field=models.IntegerField(choices=[(0, '_'), (1, 'Renault'), (2, 'Nissan'), (3, 'Smart')], default=3, verbose_name='Car'),
|
||||
),
|
||||
migrations.AddConstraint(
|
||||
model_name='fuelpurchase',
|
||||
constraint=models.UniqueConstraint(fields=('purchase_date', 'total_cost', 'price_per_litre', 'amount_litres', 'octane', 'gas_station', 'car'), name='unique_fuel_purchase'),
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue