# Generated by Django 2.0.3 on 2018-03-24 09:01

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import manager.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Battery',
            fields=[
                ('primary_id', models.AutoField(primary_key=True, serialize=False)),
                ('number', models.PositiveIntegerField(db_index=True, default=1, validators=[django.core.validators.MinValueValidator(1)])),
                ('ID', models.PositiveIntegerField(db_index=True, default=5, validators=[django.core.validators.MinValueValidator(5), manager.validators.validate_odd])),
                ('is_on', models.BooleanField(default=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Car',
            fields=[
                ('primary_id', models.AutoField(primary_key=True, serialize=False)),
                ('ID', models.CharField(db_index=True, max_length=255, unique=True)),
                ('name', models.CharField(db_index=True, max_length=50)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='battery',
            name='car',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='batteries', to='manager.Car'),
        ),
    ]
