# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-03-14 02:35
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('sqlmng', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='sqlconf',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, verbose_name='\u540d\u5b57')),
                ('createtime', models.DateTimeField(auto_now_add=True, verbose_name='\u521b\u5efa\u65f6\u95f4')),
                ('updatetime', models.DateTimeField(auto_now=True, verbose_name='\u4fee\u6539\u65f6\u95f4')),
                ('note', models.TextField(blank=True, default='', null=True, verbose_name='\u5907\u6ce8')),
                ('sqlcontent', models.CharField(max_length=20000)),
                ('treater', models.CharField(max_length=128)),
                ('condtion', models.CharField(choices=[('1', '\u5f85\u6267\u884c'), ('2', '\u5df2\u6267\u884c'), ('3', '\u5df2\u62d2\u7edd'), ('4', '\u5df2\u56de\u6eda')], default=1, max_length=1)),
                ('env', models.CharField(blank=True, choices=[('1', '\u751f\u4ea7'), ('2', '\u6d4b\u8bd5')], max_length=1, null=True)),
                ('operate', models.CharField(blank=True, choices=[('1', '\u6267\u884c'), ('2', '\u62d2\u7edd'), ('3', '\u56de\u6eda')], default=1, max_length=1, null=True)),
                ('backid', models.CharField(blank=True, max_length=128, null=True)),
                ('backdb', models.CharField(blank=True, max_length=128, null=True)),
            ],
            options={
                'ordering': ['-id'],
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('phone', models.CharField(blank=True, default='', max_length=11)),
                ('role', models.CharField(blank=True, choices=[('0', '\u65e0'), ('1', '\u603b\u76d1'), ('2', '\u7ecf\u7406'), ('3', '\u7814\u53d1')], default='0', max_length=1)),
                ('note', models.CharField(blank=True, default='', max_length=128)),
            ],
        ),
        migrations.RenameField(
            model_name='dbconf',
            old_name='user',
            new_name='userobj',
        ),
        migrations.AddField(
            model_name='sqlconf',
            name='user_obj',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
