修改学生自定义考号为学号
This commit is contained in:
1 parent
073b194e0b
commit
04fa47f9e3
9 files changed
+29
-24
No files matched your search
@@ -32,7 +32,7 @@ class AddStudentKaohao extends Migrator
|
||||
$column = $table->hasColumn('kaohao');
|
||||
if (!$column) {
|
||||
$table
|
||||
->addColumn('kaohao','string',['limit'=>25,'null'=>true,'comment'=>'自定义考号'])
|
||||
->addColumn('xuehao','string',['limit'=>25,'null'=>true,'comment'=>'自定义学号'])
|
||||
->update();
|
||||
}
|
||||
}
|
||||
@@ -42,10 +42,10 @@ class AddStudentKaohao extends Migrator
|
||||
public function down()
|
||||
{
|
||||
$table = $this->table('student');
|
||||
$column = $table->hasColumn('kaohao');
|
||||
$column = $table->hasColumn('xuehao');
|
||||
if ($column) {
|
||||
$table
|
||||
->removeColumn('kaohao');
|
||||
->removeColumn('xuehao');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user