修改phinx
This commit is contained in:
1 parent
2f3a653aa4
commit
15fadce52e
14 files changed
+100
-15
No files matched your search
@@ -28,5 +28,4 @@ Route::group('student', function () {
|
||||
// 学生查询成绩登录
|
||||
Route::group('teacher', function () {
|
||||
Route::rule('', 'Teacher/login', 'post');
|
||||
});
|
||||
|
||||
});
|
||||
@@ -45,7 +45,9 @@ class KaoshiUp extends Migrator
|
||||
$table = $this->table('kaoshi');
|
||||
|
||||
$table
|
||||
->removeColumn('user_id', 'user_group', 'jibie_id')
|
||||
->removeColumn('user_id')
|
||||
->removeColumn('user_group')
|
||||
->removeColumn('jibie_id')
|
||||
->update();
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ class Admin extends Seeder
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// 初始化超级管理员
|
||||
// 定义表的名称
|
||||
$rows = [
|
||||
[
|
||||
'id' => 1,
|
||||
@@ -30,10 +30,17 @@ class Admin extends Seeder
|
||||
'school_id' => 1,
|
||||
'password' => '$apr1$RSUodBwI$zOhVq9RQWfQDOW2sbeCDS1',
|
||||
],
|
||||
];
|
||||
|
||||
];
|
||||
$serRows = $this->fetchAll('select * from cj_admin');
|
||||
if(is_array($serRows) && count($serRows) > 0)
|
||||
{
|
||||
$rows = array();
|
||||
return true;
|
||||
}
|
||||
|
||||
// 保存数据
|
||||
$this->table('admin')->insert($rows)->save();
|
||||
$this->table('admin')->insert($rows)->update();
|
||||
}
|
||||
|
||||
}
|
||||
Loaded 3 of 14 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user