Make it more failsafe
这个提交包含在:
父节点
c2deb80b0d
当前提交
e20e3dc597
共有 1 个文件被更改,包括 7 次插入 和 4 次删除
|
|
@ -10,12 +10,15 @@ class Migration_add_key_to_lotw_certs extends CI_Migration {
|
|||
'cert_key TEXT',
|
||||
);
|
||||
|
||||
|
||||
$this->dbforge->add_column('lotw_certs', $fields);
|
||||
if (!$this->db->field_exists('cert_key', 'lotw_certs')) {
|
||||
$this->dbforge->add_column('lotw_certs', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('lotw_certs', 'cert_key');
|
||||
if ($this->db->field_exists('cert_key', 'lotw_certs')) {
|
||||
$this->dbforge->drop_column('lotw_certs', 'cert_key');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
正在加载…
在新工单中引用