From d388e6dc4b4481b6a2b56e5647314762416c46bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Nov=C3=BD?= Date: Fri, 15 Dec 2023 12:12:23 +0100 Subject: [PATCH] Fix typo in COL_AWARD_SUMMITED column --- application/config/migration.php | 2 +- application/libraries/AdifHelper.php | 2 +- .../migrations/161_award_submitted_typo.php | 30 +++++++++++++++++++ application/models/Logbook_model.php | 2 +- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 application/migrations/161_award_submitted_typo.php diff --git a/application/config/migration.php b/application/config/migration.php index d87a985f..f18b8cfe 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE; | */ -$config['migration_version'] = 160; +$config['migration_version'] = 161; /* |-------------------------------------------------------------------------- diff --git a/application/libraries/AdifHelper.php b/application/libraries/AdifHelper.php index d167077a..e4d630a5 100644 --- a/application/libraries/AdifHelper.php +++ b/application/libraries/AdifHelper.php @@ -12,7 +12,7 @@ class AdifHelper { 'ANT_PATH', 'ARRL_SECT', 'AWARD_GRANTED', - 'AWARD_SUMMITED', // Typo in DB! + 'AWARD_SUBMITTED', 'BAND', 'BAND_RX', 'BIOGRAPHY', diff --git a/application/migrations/161_award_submitted_typo.php b/application/migrations/161_award_submitted_typo.php new file mode 100644 index 00000000..143fdc6d --- /dev/null +++ b/application/migrations/161_award_submitted_typo.php @@ -0,0 +1,30 @@ +db->query( + 'ALTER TABLE ' . + $this->db->escape_identifiers($this->config->item('table_name')) . + ' RENAME COLUMN COL_AWARD_SUMMITED TO COL_AWARD_SUBMITTED' + ); + } + + public function down() + { + $this->db->query( + 'ALTER TABLE ' . + $this->db->escape_identifiers($this->config->item('table_name')) . + ' RENAME COLUMN COL_AWARD_SUBMITTED TO COL_AWARD_SUMMITED' + ); + } +} diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 54be5d60..5ea0f871 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -3472,7 +3472,7 @@ function lotw_last_qsl_date($user_id) { 'COL_ANT_PATH' => $input_ant_path, 'COL_ARRL_SECT' => (!empty($record['arrl_sect'])) ? $record['arrl_sect'] : '', 'COL_AWARD_GRANTED' => (!empty($record['award_granted'])) ? $record['award_granted'] : '', - 'COL_AWARD_SUMMITED' => (!empty($record['award_submitted'])) ? $record['award_submitted'] : '', + 'COL_AWARD_SUBMITTED' => (!empty($record['award_submitted'])) ? $record['award_submitted'] : '', 'COL_BAND' => $band, 'COL_BAND_RX' => $band_rx, 'COL_BIOGRAPHY' => (!empty($record['biography'])) ? $record['biography'] : '',