Plugin Directory

Changeset 3096067


Ignore:
Timestamp:
06/01/2024 01:37:30 PM (21 months ago)
Author:
dipakraval
Message:

issue solve

Location:
bulk-mail-sender
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bulk-mail-sender/tags/1.1.5/App/BMSIActivate.php

    r3096054 r3096067  
    5959        )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci";
    6060
    61 
    62 
    6361        $create_tbl_history = "CREATE TABLE $tbl_history (
    6462            `id` int(25) not null auto_increment,
     
    8179
    8280
    83         $alter_tbl_history = "ALTER TABLE $tbl_history
    84             ADD COLUMN `open_count` varchar(50) NOT NULL DEFAULT '0'";
    85 
    8681        require_once (ABSPATH . '/wp-admin/includes/upgrade.php');
    8782        maybe_create_table($tbl_mail_details, $create_tbl_mail_details);
     
    9287        maybe_create_table($tbl_email_queue, $create_tbl_email_queue);
    9388
    94 
    95         $wpdb->query($alter_tbl_history);
     89        if ($wpdb->get_var("SHOW COLUMNS FROM $tbl_history LIKE 'open_count'") !== 'open_count') {
     90           
     91            $alter_tbl_history = "ALTER TABLE $tbl_history ADD COLUMN `open_count` varchar(50) NOT NULL DEFAULT '0'";
     92            $wpdb->query($alter_tbl_history);
     93        }
    9694    }
    9795
    9896}
    99 ?>
  • bulk-mail-sender/trunk/App/BMSIActivate.php

    r3091711 r3096067  
    5959        )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci";
    6060
    61 
    62 
    6361        $create_tbl_history = "CREATE TABLE $tbl_history (
    6462            `id` int(25) not null auto_increment,
     
    8179
    8280
    83         $alter_tbl_history = "ALTER TABLE $tbl_history
    84             ADD COLUMN `open_count` varchar(50) NOT NULL DEFAULT '0'";
    85 
    8681        require_once (ABSPATH . '/wp-admin/includes/upgrade.php');
    8782        maybe_create_table($tbl_mail_details, $create_tbl_mail_details);
     
    9287        maybe_create_table($tbl_email_queue, $create_tbl_email_queue);
    9388
    94 
    95         $wpdb->query($alter_tbl_history);
     89        if ($wpdb->get_var("SHOW COLUMNS FROM $tbl_history LIKE 'open_count'") !== 'open_count') {
     90           
     91            $alter_tbl_history = "ALTER TABLE $tbl_history ADD COLUMN `open_count` varchar(50) NOT NULL DEFAULT '0'";
     92            $wpdb->query($alter_tbl_history);
     93        }
    9694    }
    9795
    9896}
    99 ?>
Note: See TracChangeset for help on using the changeset viewer.