Only create the fields in db if they arent there
这个提交包含在:
父节点
99b7290412
当前提交
e8be6f8620
共有 2 个文件被更改,包括 6 次插入 和 2 次删除
|
|
@ -10,7 +10,9 @@ class Migration_add_userid_to_station_profiles extends CI_Migration {
|
|||
'user_id BIGINT(20) DEFAULT NULL',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('station_profile', $fields);
|
||||
if (!$this->db->field_exists('user_id', 'station_profile')) {
|
||||
$this->dbforge->add_column('station_profile', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ class Migration_add_active_station_logbook_to_user_table extends CI_Migration {
|
|||
'active_station_logbook int(11)',
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
if (!$this->db->field_exists('active_station_logbook', 'users')) {
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
|
|
|
|||
正在加载…
在新工单中引用