# Generated by Django 2.1.4 on 2019-07-24 08:35

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('User_id', models.AutoField(primary_key=True, serialize=False)),
                ('User_name', models.CharField(max_length=20, unique=True)),
                ('User_pwd', models.CharField(max_length=32)),
                ('User_phone', models.BigIntegerField(unique=True)),
                ('User_date', models.DateTimeField()),
            ],
            options={
                'db_table': 'users',
            },
        ),
        migrations.CreateModel(
            name='Vehicle',
            fields=[
                ('Veh_id', models.AutoField(primary_key=True, serialize=False)),
                ('Veh_name', models.CharField(max_length=45)),
                ('Veh_status', models.IntegerField(default=0)),
                ('Veh_mile', models.FloatField(default=0)),
                ('Veh_User', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Veh_User', to='index.UserInfo')),
            ],
            options={
                'db_table': 'vehicles',
            },
        ),
        migrations.AlterUniqueTogether(
            name='vehicle',
            unique_together={('Veh_User', 'Veh_name')},
        ),
    ]
