Merge pull request #1397 from AndreasK79/migration_fix

[Migration fix] Renames script 83 to avoid dupliate naming. Fixes scr…
pull/1403/head
Andreas Kristiansen 2022-02-09 19:45:43 +01:00 zatwierdzone przez GitHub
commit 7debe5f33f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 8 dodań i 5 usunięć

Wyświetl plik

@ -7,7 +7,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* removing the need for lots of configuration files.
*/
class Migration_create_station_logbook_relationship_table extends CI_Migration {
class Migration_create_station_logbook_relationship_table2 extends CI_Migration {
public function up()
{

Wyświetl plik

@ -15,15 +15,18 @@ class Migration_add_public_slug_to_stationlogbooks extends CI_Migration {
$fields = array(
'public_slug' => array(
'type' => 'VARCHAR',
'constraint' => '200',
'constraint' => '191',
'null' => TRUE,
'unique' => TRUE
)
);
);
$this->dbforge->add_column('station_logbooks', $fields);
if (!$this->db->field_exists('public_slug', 'station_logbooks')) {
$this->dbforge->add_column('station_logbooks', $fields);
$this->dbforge->add_key('public_slug');
$this->dbforge->add_key('public_slug');
}
}
}