0
This commit is contained in:
1 parent
12c0ffda10
commit
545961bb02
2 files changed
+39
-125
No files matched your search
@@ -43,7 +43,7 @@ class TeacherToAdmin extends Migrator
|
||||
->addColumn('quanpin','string',['limit'=>30,'default'=>'a','null'=>false,'comment'=>'全拼'])
|
||||
->addColumn('shoupin','string',['limit'=>5,'default'=>'a','null'=>false,'comment'=>'简拼'])
|
||||
->addColumn('tuixiu','boolean',['limit'=>1,'default'=>0,'null'=>false,'comment'=>'是否已经退休'])
|
||||
// ->addIndex(array('phone'), array('unique' => true))
|
||||
->addIndex(array('phone'), array('unique' => true))
|
||||
->update();
|
||||
}
|
||||
|
||||
@@ -60,31 +60,51 @@ class TeacherToAdmin extends Migrator
|
||||
$table
|
||||
->addColumn('user_id','integer',['after' => 'category_id','limit'=>11,'default'=>0,'null'=>false,'comment'=>'用户ID']);
|
||||
}
|
||||
|
||||
$table = $this->table('system_base');
|
||||
$column = $table->hasColumn('sys_title');
|
||||
if (!$column) {
|
||||
$table
|
||||
->addColumn('sys_title','string',['limit'=>60,'null'=>false,'default'=>'码蚁成绩管理系统','comment'=>'系统名称']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//版本退回
|
||||
public function down()
|
||||
{
|
||||
$table = $this->table('admin');
|
||||
$table
|
||||
->removeColumn('worktime')
|
||||
->removeColumn('zhiwu_id')
|
||||
->removeColumn('zhicheng_id')
|
||||
->removeColumn('biye')
|
||||
->removeColumn('zhuanye')
|
||||
->removeColumn('xueli_id')
|
||||
->removeColumn('subject_id')
|
||||
->removeColumn('quanpin')
|
||||
->removeColumn('shoupin')
|
||||
->removeColumn('worktime')
|
||||
->removeColumn('tuixiu')
|
||||
->update();
|
||||
$table = $this->table('fields');
|
||||
$column = $table->hasColumn('user_group');
|
||||
if ($column) {
|
||||
$table
|
||||
->removeColumn('user_group');
|
||||
}
|
||||
|
||||
$table = $this->table('system_base');
|
||||
$table
|
||||
->removeColumn('kaoshifanwei')
|
||||
->update();
|
||||
$table = $this->table('chengji');
|
||||
$column = $table->hasColumn('user_group');
|
||||
if ($column) {
|
||||
$table
|
||||
->removeColumn('user_group');
|
||||
}
|
||||
|
||||
$table = $this->table('kaoshi');
|
||||
$column = $table->hasColumn('user_group');
|
||||
if ($column) {
|
||||
$table
|
||||
->removeColumn('user_group');
|
||||
}
|
||||
|
||||
$table = $this->table('admin');
|
||||
$column = $table->hasColumn('teacher_id');
|
||||
if ($column) {
|
||||
$table
|
||||
->removeColumn('teacher_id');
|
||||
}
|
||||
|
||||
$exists = $this->hasTable('teacher');
|
||||
if ($exists) {
|
||||
$this->dropTable('teacher');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1723,112 +1723,6 @@ class Rule extends Seeder
|
||||
// ,'pid' => 9
|
||||
// ,'url' => '/keti/ketiinfo/tongji'
|
||||
// ],
|
||||
|
||||
// // 教师管理
|
||||
// ['id' => 10
|
||||
// ,'title' => '教师管理'
|
||||
// ,'name' => 'teacher'
|
||||
// ,'paixu' => 4
|
||||
// ,'ismenu' => 1
|
||||
// ,'font' => ''
|
||||
// ],
|
||||
// ['id' => 1001
|
||||
// ,'title' => '教师列表'
|
||||
// ,'name' => 'teacher/index/index'
|
||||
// ,'paixu' => 1
|
||||
// ,'ismenu' => 1
|
||||
// ,'pid' => 10
|
||||
// ,'url' => '/teacher/index/index'
|
||||
// ],
|
||||
// // 教师管理权限
|
||||
// ['id' => 100101
|
||||
// ,'title' => '添加'
|
||||
// ,'name' => 'teacher/index/create'
|
||||
// ,'paixu' => 1
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100102
|
||||
// ,'title' => '保存'
|
||||
// ,'name' => 'teacher/index/save'
|
||||
// ,'paixu' => 2
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100103
|
||||
// ,'title' => '删除'
|
||||
// ,'name' => 'teacher/index/delete'
|
||||
// ,'paixu' => 3
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100104
|
||||
// ,'title' => '编辑'
|
||||
// ,'name' => 'teacher/index/edit'
|
||||
// ,'paixu' => 4
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100105
|
||||
// ,'title' => '更新'
|
||||
// ,'name' => 'teacher/index/update'
|
||||
// ,'paixu' => 5
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100106
|
||||
// ,'title' => '查看'
|
||||
// ,'name' => 'teacher/index/read'
|
||||
// ,'paixu' => 6
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100107
|
||||
// ,'title' => '状态'
|
||||
// ,'name' => 'teacher/index/setstatus'
|
||||
// ,'paixu' => 7
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100108
|
||||
// ,'title' => '查询教师'
|
||||
// ,'name' => 'teacher/index/srcteacher'
|
||||
// ,'paixu' => 8
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100109
|
||||
// ,'title' => '批量上传'
|
||||
// ,'name' => 'teacher/index/createall'
|
||||
// ,'paixu' => 9
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100110
|
||||
// ,'title' => '批量保存'
|
||||
// ,'name' => 'teacher/index/saveall'
|
||||
// ,'paixu' => 10
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100111
|
||||
// ,'title' => '表格模板下载'
|
||||
// ,'name' => 'teacher/index/downloadxls'
|
||||
// ,'paixu' => 11
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 100112
|
||||
// ,'title' => '重置密码'
|
||||
// ,'name' => 'teacher/index/resetpassword'
|
||||
// ,'paixu' => 7
|
||||
// ,'pid' => 1001
|
||||
// ],
|
||||
// ['id' => 1002
|
||||
// ,'title' => '删除教师'
|
||||
// ,'name' => 'teacher/index/dellist'
|
||||
// ,'paixu' => 2
|
||||
// ,'ismenu' => 1
|
||||
// ,'pid' => 10
|
||||
// ,'url' => '/teacher/index/dellist'
|
||||
// ],
|
||||
// // 删除教师
|
||||
// ['id' => 100201
|
||||
// ,'title' => '恢复删除'
|
||||
// ,'name' => 'teacher/index/redel'
|
||||
// ,'paixu' => 1
|
||||
// ,'pid' => 1002
|
||||
// ],
|
||||
|
||||
];
|
||||
|
||||
$this->execute('DELETE FROM cj_auth_rule where id>0');
|
||||
|
||||
Reference in new issue
Block a user