Tutorial 4 Database Setup
This commit is contained in:
parent
c8811e5d68
commit
191b9d605f
2 changed files with 30 additions and 0 deletions
24
touragency/agency/migrations/0001_initial.py
Normal file
24
touragency/agency/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
# Generated by Django 6.0.3 on 2026-03-14 19:41
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Tour',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('origin_country', models.CharField(max_length=64)),
|
||||||
|
('destination_country', models.CharField(max_length=64)),
|
||||||
|
('nights', models.IntegerField()),
|
||||||
|
('price', models.IntegerField()),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
||||||
|
|
||||||
# Create your models here.
|
# Create your models here.
|
||||||
|
class Tour(models.Model):
|
||||||
|
origin_country = models.CharField(max_length=64)
|
||||||
|
destination_country = models.CharField(max_length=64)
|
||||||
|
nights = models.IntegerField()
|
||||||
|
price = models.IntegerField()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue