# Generated by Django 2.0.5 on 2018-08-26 09:49

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import phonenumber_field.modelfields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='hostel_db',
            fields=[
                ('hostel_name', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('no_of_rooms', models.PositiveSmallIntegerField()),
                ('caretaker_contact', phonenumber_field.modelfields.PhoneNumberField(max_length=128)),
            ],
        ),
        migrations.CreateModel(
            name='password_db',
            fields=[
                ('user_id', models.IntegerField(primary_key=True, serialize=False, validators=[django.core.validators.MinValueValidator(10000), django.core.validators.MaxValueValidator(2100107999)])),
                ('password', models.CharField(max_length=160)),
                ('last_ip', models.GenericIPAddressField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='student_db',
            fields=[
                ('regn_no', models.IntegerField(primary_key=True, serialize=False, validators=[django.core.validators.MinValueValidator(2010101000), django.core.validators.MaxValueValidator(2100107999)])),
                ('student_name', models.CharField(max_length=80)),
                ('branch', models.CharField(max_length=3)),
                ('semester', models.PositiveSmallIntegerField()),
                ('contact_no', phonenumber_field.modelfields.PhoneNumberField(max_length=128)),
                ('email_id', models.EmailField(max_length=254, unique=True)),
                ('guardian_contact', phonenumber_field.modelfields.PhoneNumberField(max_length=128)),
                ('age', models.PositiveSmallIntegerField()),
                ('photo', models.BinaryField()),
                ('premanent_addr', models.TextField()),
                ('hostel_name', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='home.hostel_db')),
            ],
        ),
        migrations.CreateModel(
            name='warden_db',
            fields=[
                ('warden_id', models.PositiveSmallIntegerField(primary_key=True, serialize=False, validators=[django.core.validators.MinValueValidator(10000), django.core.validators.MaxValueValidator(99999)])),
                ('warden_name', models.CharField(max_length=50)),
                ('contact_no', phonenumber_field.modelfields.PhoneNumberField(max_length=128)),
                ('office_addr', models.TextField(max_length='200')),
                ('email_id', models.EmailField(max_length=254, unique=True)),
                ('chief_status', models.BooleanField(default=False)),
            ],
        ),
        migrations.AddField(
            model_name='hostel_db',
            name='warden_id',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='home.warden_db'),
        ),
    ]
