[Migration] Adds 072 to 073 to cover my muck up!

pull/1354/head
Peter Goodhall 2022-01-05 22:05:50 +00:00
rodzic e58d91ad94
commit 0afdf302ea
1 zmienionych plików z 36 dodań i 0 usunięć

Wyświetl plik

@ -11,6 +11,42 @@ class Migration_create_station_logbook_relationship_table extends CI_Migration {
public function up()
{
if (!$this->db->table_exists('station_logbooks')) {
$this->dbforge->add_field(array(
'logbook_id' => array(
'type' => 'BIGINT',
'constraint' => 20,
'unsigned' => TRUE,
'auto_increment' => TRUE,
'unique' => TRUE
),
'user_id' => array(
'type' => 'BIGINT',
'constraint' => 20,
'unsigned' => TRUE,
'auto_increment' => FALSE
),
'logbook_name' => array(
'type' => 'VARCHAR',
'constraint' => '191',
'null' => TRUE
),
'modified' => array(
'type' => 'timestamp',
'null' => TRUE,
)
));
$this->dbforge->add_key('logbook_id', TRUE);
$this->dbforge->add_key('user_id', TRUE);
$this->dbforge->create_table('station_logbooks');
}
if (!$this->db->table_exists('station_logbooks_relationship')) {
$this->dbforge->add_field(array(
'logbook_relation_id' => array(