mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Fix migration script
This commit is contained in:
@@ -7,15 +7,18 @@ class Migration_add_key_to_lotw_certs extends CI_Migration {
|
||||
public function up()
|
||||
{
|
||||
$fields = array(
|
||||
'cert_key TEXT',
|
||||
'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', 'key');
|
||||
if ($this->db->field_exists('cert_key', 'lotw_certs')) {
|
||||
$this->dbforge->drop_column('lotw_certs', 'cert_key');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user