# Generated by Django 2.2.5 on 2019-09-16 20:26

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


class Migration(migrations.Migration):

    dependencies = [
        ('one_app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
            ],
        ),
        migrations.AlterModelOptions(
            name='products',
            options={'verbose_name': 'Mehsul', 'verbose_name_plural': 'Mehsullar'},
        ),
        migrations.AlterField(
            model_name='products',
            name='name',
            field=models.CharField(max_length=255),
        ),
        migrations.AlterField(
            model_name='products',
            name='price',
            field=models.FloatField(default=0),
        ),
        migrations.AlterUniqueTogether(
            name='products',
            unique_together={('name', 'price')},
        ),
        migrations.AddField(
            model_name='products',
            name='category',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='one_app.Category'),
        ),
    ]
