# Generated by Django 4.0.3 on 2022-04-07 09:25

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=64, unique=True)),
                ('extended_name', models.CharField(blank=True, max_length=128)),
                ('country', django_countries.fields.CountryField(max_length=2)),
                ('freelance', models.BooleanField(default=False)),
                ('logo', models.ImageField(blank=True, null=True, upload_to='images/')),
            ],
            options={
                'verbose_name_plural': 'Companies',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Manufacturer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
                ('category', models.CharField(choices=[('model', 'Model'), ('real', 'Real')], max_length=64)),
                ('website', models.URLField(blank=True)),
                ('logo', models.ImageField(blank=True, null=True, upload_to='images/')),
            ],
            options={
                'ordering': ['category', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Property',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
            ],
            options={
                'verbose_name_plural': 'Properties',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Scale',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('scale', models.CharField(max_length=32, unique=True)),
                ('ratio', models.CharField(blank=True, max_length=16)),
                ('gauge', models.CharField(blank=True, max_length=16)),
            ],
            options={
                'ordering': ['scale'],
            },
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
                ('slug', models.CharField(max_length=128, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='RollingStockType',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(max_length=64)),
                ('category', models.CharField(choices=[('engine', 'Engine'), ('car', 'Car'), ('railcar', 'Railcar'), ('equipment', 'Equipment'), ('other', 'Other')], max_length=64)),
            ],
            options={
                'unique_together': {('category', 'type')},
            },
        ),
        migrations.CreateModel(
            name='Decoder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
                ('version', models.CharField(blank=True, max_length=64)),
                ('interface', models.PositiveSmallIntegerField(blank=True, choices=[(1, 'NEM651'), (2, 'NEM652'), (3, 'PluX'), (4, '21MTC'), (5, 'Next18/Next18S')], null=True)),
                ('sound', models.BooleanField(default=False)),
                ('image', models.ImageField(blank=True, null=True, upload_to='images/')),
                ('manufacturer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='metadata.manufacturer')),
            ],
        ),
    ]
