From 96721ea71d43b1665ed486199fe8c72b6250dd8b Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sun, 10 Jul 2022 11:14:47 +0100 Subject: [PATCH] Only run migration when both IFs are met --- application/migrations/093_rename_profile_images.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/migrations/093_rename_profile_images.php b/application/migrations/093_rename_profile_images.php index 9961adf3..8263efaa 100644 --- a/application/migrations/093_rename_profile_images.php +++ b/application/migrations/093_rename_profile_images.php @@ -14,7 +14,7 @@ class Migration_rename_profile_images extends CI_Migration { public function up() { - if ($this->db->field_exists('user_show_qrz_image', 'users')) { + if ($this->db->field_exists('user_show_qrz_image', 'users') && !$this->db->field_exists('user_show_profile_image', 'users')) { $fields = array( 'user_show_qrz_image' => [ 'name' => 'user_show_profile_image', 'type' => ' BOOLEAN DEFAULT FALSE', ] );