diff --git a/application/config/migration.php b/application/config/migration.php index 4a7774a3..98fd0f82 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 153; +$config['migration_version'] = 154; /* |-------------------------------------------------------------------------- diff --git a/application/migrations/154_create_dxpedition_table.php b/application/migrations/154_create_dxpedition_table.php new file mode 100644 index 00000000..55974079 --- /dev/null +++ b/application/migrations/154_create_dxpedition_table.php @@ -0,0 +1,59 @@ +db->table_exists('dxpedition')) { + + $this->dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => 6, + 'unsigned' => TRUE, + 'auto_increment' => TRUE + ), + 'start_date' => array( + 'type' => 'DATE', + 'null' => TRUE, + ), + 'end_date' => array( + 'type' => 'DATE', + 'null' => TRUE, + ), + 'callsign' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE, + ), + 'country' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE, + ), + 'notes' => array( + 'type' => 'VARCHAR', + 'constraint' => '255', + 'null' => TRUE, + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->add_key('callsign', TRUE); + + $this->dbforge->create_table('dxpedition'); + } + } + + public function down() + { + $this->dbforge->drop_table('dxpedition'); + } +}