|
@@ -1,6 +1,7 @@
|
|
|
-# Generated by Django 2.0.6 on 2018-07-03 02:20
|
|
|
|
|
|
|
+# Generated by Django 2.0.6 on 2018-07-04 02:30
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
|
from django.db import migrations, models
|
|
|
|
|
+import django.db.models.deletion
|
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
class Migration(migrations.Migration):
|
|
@@ -11,17 +12,31 @@ class Migration(migrations.Migration):
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
operations = [
|
|
|
|
|
+ migrations.CreateModel(
|
|
|
|
|
+ name='Subject',
|
|
|
|
|
+ fields=[
|
|
|
|
|
+ ('no', models.AutoField(db_column='sno', primary_key=True, serialize=False, verbose_name='编号')),
|
|
|
|
|
+ ('name', models.CharField(db_column='sname', max_length=50, verbose_name='学科名称')),
|
|
|
|
|
+ ('intro', models.CharField(db_column='sintro', max_length=511, verbose_name='学科介绍')),
|
|
|
|
|
+ ],
|
|
|
|
|
+ options={
|
|
|
|
|
+ 'db_table': 'tb_subject',
|
|
|
|
|
+ },
|
|
|
|
|
+ ),
|
|
|
migrations.CreateModel(
|
|
migrations.CreateModel(
|
|
|
name='Teacher',
|
|
name='Teacher',
|
|
|
fields=[
|
|
fields=[
|
|
|
- ('no', models.AutoField(db_column='tno', primary_key=True, serialize=False)),
|
|
|
|
|
- ('name', models.CharField(db_column='tname', max_length=20)),
|
|
|
|
|
- ('job', models.CharField(db_column='tjob', max_length=10)),
|
|
|
|
|
- ('intro', models.CharField(db_column='tintro', max_length=1023)),
|
|
|
|
|
- ('motto', models.CharField(db_column='tmotto', max_length=255)),
|
|
|
|
|
|
|
+ ('no', models.AutoField(db_column='tno', primary_key=True, serialize=False, verbose_name='编号')),
|
|
|
|
|
+ ('name', models.CharField(db_column='tname', max_length=20, verbose_name='姓名')),
|
|
|
|
|
+ ('intro', models.CharField(db_column='tintro', max_length=1023, verbose_name='简介')),
|
|
|
|
|
+ ('motto', models.CharField(db_column='tmotto', max_length=255, verbose_name='教学理念')),
|
|
|
|
|
+ ('photo', models.CharField(blank=True, db_column='tphoto', max_length=511, null=True)),
|
|
|
|
|
+ ('manager', models.BooleanField(db_column='tmanager', default=False, verbose_name='是否主管')),
|
|
|
|
|
+ ('subject', models.ForeignKey(db_column='sno', on_delete=django.db.models.deletion.PROTECT, to='demo.Subject', verbose_name='所属学科')),
|
|
|
],
|
|
],
|
|
|
options={
|
|
options={
|
|
|
'db_table': 'tb_teacher',
|
|
'db_table': 'tb_teacher',
|
|
|
|
|
+ 'ordering': ('name',),
|
|
|
},
|
|
},
|
|
|
),
|
|
),
|
|
|
]
|
|
]
|