Make it more failsafe

这个提交包含在:
phl0 2024-01-20 13:57:26 +01:00
父节点 c2deb80b0d
当前提交 e20e3dc597
找不到此签名对应的密钥
GPG 密钥 ID: 48EA1E640798CA9A

查看文件

@ -7,15 +7,18 @@ class Migration_add_key_to_lotw_certs extends CI_Migration {
public function up() public function up()
{ {
$fields = array( $fields = array(
'cert_key TEXT', 'cert_key TEXT',
); );
if (!$this->db->field_exists('cert_key', 'lotw_certs')) {
$this->dbforge->add_column('lotw_certs', $fields); $this->dbforge->add_column('lotw_certs', $fields);
}
} }
public function down() 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');
}
} }
} }