Python-100-Days/Day41-55/code/hellodjango/demo/migrations/0004_auto_20180705_1017.py

34 lines
1.2 KiB
Python
Raw Normal View History

2018-07-05 16:54:15 +08:00
# Generated by Django 2.0.6 on 2018-07-05 02:17
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('demo', '0003_auto_20180704_1118'),
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('no', models.AutoField(db_column='uno', primary_key=True, serialize=False, verbose_name='编号')),
('username', models.CharField(max_length=20, unique=True, verbose_name='用户名')),
('password', models.CharField(max_length=40, verbose_name='口令')),
('email', models.CharField(max_length=255, verbose_name='邮箱')),
],
options={
'verbose_name': '用户',
'verbose_name_plural': '用户',
'db_table': 'tb_user',
},
),
migrations.AlterField(
model_name='teacher',
name='subject',
field=models.ForeignKey(db_column='sno', on_delete=django.db.models.deletion.PROTECT, related_name='+', to='demo.Subject', verbose_name='所属学科'),
),
]