From f630dde7cec2bf6d62ae2213a05c75ffb55f4dd9 Mon Sep 17 00:00:00 2001 From: Corby Krick Date: Tue, 26 Feb 2013 22:04:35 -0600 Subject: [PATCH] Moving LoTW config elements to a config table in the database. The config table is created and populated via migration. Removing the config elements from the sample config file. --- .../migrations/002_add_config_table.php | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 application/migrations/002_add_config_table.php 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