<reponame>Rizalgente/upkoding
# Generated by Django 3.1.6 on 2021-03-26 13:06

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterModelOptions(
            name='user',
            options={'ordering': ['-point']},
        ),
        migrations.CreateModel(
            name='UserSetting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(db_index=True, max_length=64)),
                ('value', models.CharField(blank=True, default='true', max_length=200)),
                ('type', models.SmallIntegerField(choices=[(0, 'bool'), (1, 'int'), (2, 'float'), (3, 'string')], default=0)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_settings', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddIndex(
            model_name='usersetting',
            index=models.Index(fields=['user', 'key', 'type'], name='user_setting_key_type_idx'),
        ),
        migrations.AddConstraint(
            model_name='usersetting',
            constraint=models.UniqueConstraint(fields=('user', 'key', 'type'), name='unique_user_setting_key_type'),
        ),
    ]

# Generated by Django 3.1.6 on 2021-03-26 13:06

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


class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterModelOptions(
            name='user',
            options={'ordering': ['-point']},
        ),
        migrations.CreateModel(
            name='UserSetting',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('key', models.CharField(db_index=True, max_length=64)),
                ('value', models.CharField(blank=True, default='true', max_length=200)),
                ('type', models.SmallIntegerField(choices=[(0, 'bool'), (1, 'int'), (2, 'float'), (3, 'string')], default=0)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_settings', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddIndex(
            model_name='usersetting',
            index=models.Index(fields=['user', 'key', 'type'], name='user_setting_key_type_idx'),
        ),
        migrations.AddConstraint(
            model_name='usersetting',
            constraint=models.UniqueConstraint(fields=('user', 'key', 'type'), name='unique_user_setting_key_type'),
        ),
    ]
# Generated by Django 3.1.6 on 2021-03-26 13:06