From 80e52ca36df737dac6df5e28f43abc94e208ce1a Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 30 Nov 2022 11:22:20 +0100 Subject: [PATCH] Fix condition on new field migration files --- .../migrations/026_add_color_column_to_services_table.php | 2 +- .../migrations/027_add_color_column_to_appointments_table.php | 2 +- .../migrations/044_add_status_column_to_appointments_table.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/migrations/026_add_color_column_to_services_table.php b/application/migrations/026_add_color_column_to_services_table.php index ff577740..a3fc3518 100644 --- a/application/migrations/026_add_color_column_to_services_table.php +++ b/application/migrations/026_add_color_column_to_services_table.php @@ -37,7 +37,7 @@ class Migration_Add_color_column_to_services_table extends EA_Migration { */ public function down() { - if ( ! $this->db->field_exists('color', 'services')) + if ($this->db->field_exists('color', 'services')) { $this->dbforge->drop_column('services', 'color'); } diff --git a/application/migrations/027_add_color_column_to_appointments_table.php b/application/migrations/027_add_color_column_to_appointments_table.php index 0618c375..1610a28f 100644 --- a/application/migrations/027_add_color_column_to_appointments_table.php +++ b/application/migrations/027_add_color_column_to_appointments_table.php @@ -37,7 +37,7 @@ class Migration_Add_color_column_to_appointments_table extends EA_Migration { */ public function down() { - if ( ! $this->db->field_exists('color', 'appointments')) + if ($this->db->field_exists('color', 'appointments')) { $this->dbforge->drop_column('appointments', 'color'); } diff --git a/application/migrations/044_add_status_column_to_appointments_table.php b/application/migrations/044_add_status_column_to_appointments_table.php index 5d8c5986..12bae422 100644 --- a/application/migrations/044_add_status_column_to_appointments_table.php +++ b/application/migrations/044_add_status_column_to_appointments_table.php @@ -37,7 +37,7 @@ class Migration_Add_status_column_to_appointments_table extends EA_Migration { */ public function down() { - if ( ! $this->db->field_exists('status', 'appointments')) + if ($this->db->field_exists('status', 'appointments')) { $this->dbforge->drop_column('appointments', 'status'); }