From c3c1f1e325122f6a6a1e74741566f4a5952a9859 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 30 Jul 2025 10:26:16 +0100 Subject: [PATCH] Add migration to set TEVEL2-3 QSL sent status to N Added migration 202 to update COL_LOTW_QSL_SENT to 'N' for TEVEL2-3 satellite records. Updated migration version in config and added TEVEL2-3 to the satellite name mapping in Lotw controller. --- application/config/migration.php | 2 +- application/controllers/Lotw.php | 1 + .../migrations/202_set_tevel23_to_notsent.php | 24 +++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 application/migrations/202_set_tevel23_to_notsent.php diff --git a/application/config/migration.php b/application/config/migration.php index f73a6e6c..7b31a5cb 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 201; +$config['migration_version'] = 202; /* |-------------------------------------------------------------------------- diff --git a/application/controllers/Lotw.php b/application/controllers/Lotw.php index 224dbbc4..4d269e32 100644 --- a/application/controllers/Lotw.php +++ b/application/controllers/Lotw.php @@ -995,6 +995,7 @@ class Lotw extends CI_Controller { "INSPR7" => "INSPIRE-SAT 7", "SONATE" => "SONATE-2", 'AO-123' => "ASRTU-1", + 'TEV2-3' => "TEVEL2-3", ); return array_search(strtoupper($satname),$arr,true); diff --git a/application/migrations/202_set_tevel23_to_notsent.php b/application/migrations/202_set_tevel23_to_notsent.php new file mode 100644 index 00000000..8731d7ce --- /dev/null +++ b/application/migrations/202_set_tevel23_to_notsent.php @@ -0,0 +1,24 @@ +db->set('COL_LOTW_QSL_SENT', 'N'); + $this->db->where('COL_SAT_NAME', 'TEVEL2-3'); + $this->db->update($this->config->item('table_name')); + log_message('info', 'Migration: Set COL_LOTW_QSL_SENT to N for TEVEL2-3'); + + } + + public function down() + { + // Set COL_LOTW_QSL_SENT back to N for TEVEL2-3 + $this->db->set('COL_LOTW_QSL_SENT', 'N'); + $this->db->where('COL_SAT_NAME', 'TEVEL2-3'); + $this->db->update($this->config->item('table_name')); + log_message('info', 'Migration: Reverted COL_LOTW_QSL_SENT back to N for TEVEL2-3'); + } +}