Hotel/hotel/rooms/migrations/0001_initial.py

36 lines
1.1 KiB
Python

# Generated by Django 2.1.5 on 2019-01-12 22:31
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Room',
fields=[
('room_number', models.IntegerField(primary_key=True, serialize=False, validators=[django.core.validators.MinValueValidator(1)])),
('price', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)])),
],
),
migrations.CreateModel(
name='RoomType',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('room_type', models.CharField(max_length=40)),
],
),
migrations.AddField(
model_name='room',
name='room_type',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='rooms.RoomType'),
),
]