# Generated by Django 3.1.2 on 2020-10-17 21:53

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUnit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(db_index=True, default=None, max_length=255, null=True)),
                ('unit_system', models.CharField(choices=[('Planck', 'Planck'), ('SI', 'SI'), ('US', 'US'), ('atomic', 'atomic'), ('cgs', 'CGS'), ('imperial', 'imperial'), ('mks', 'mks')], max_length=20)),
                ('code', models.SlugField()),
                ('name', models.CharField(max_length=255, verbose_name='Human readable name')),
                ('relation', models.CharField(max_length=255, verbose_name='Relation to an existing unit')),
                ('symbol', models.CharField(max_length=20, verbose_name='Symbol')),
                ('alias', models.CharField(blank=True, max_length=20, null=True, verbose_name='Alias')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='units', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'unique_together': {('user', 'key', 'code')},
            },
        ),
    ]
