Merge pull request #2927 from phl0/fixMigration

Fix migration
pull/2933/head
Peter Goodhall 2024-01-20 13:04:45 +00:00 zatwierdzone przez GitHub
commit c98b2804ab
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -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');
}
}
}
}