diff --git a/application/migrations/002_add_config_table.php b/application/migrations/002_add_config_table.php new file mode 100644 index 00000000..13346907 --- /dev/null +++ b/application/migrations/002_add_config_table.php @@ -0,0 +1,39 @@ +dbforge->add_field(array( + 'lotw_download_url' => array( + 'type' => 'VARCHAR', + 'constraint' => 255, + ), + 'lotw_upload_url' => array( + 'type' => 'VARCHAR', + 'constraint' => 255, + ), + 'lotw_rcvd_mark' => array( + 'type' => 'VARCHAR', + 'constraint' => 1, + ), + )); + + $this->dbforge->create_table('config'); + + $data = array( + 'lotw_download_url' => 'https://p1k.arrl.org/lotwuser/lotwreport.adi', + 'lotw_upload_url' => 'https://p1k.arrl.org/lotwuser/upload', + 'lotw_rcvd_mark' => 'Y' + ); + + $this->db->insert('config', $data); + } + + public function down() + { + $this->dbforge->drop_table('config'); + } +} +?> \ No newline at end of file