Only run migration when both IFs are met

pull/1544/head
Peter Goodhall 2022-07-10 11:14:47 +01:00
rodzic 414774e3a6
commit 96721ea71d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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', ]
);