add output column to bg process table

This commit is contained in:
leogermani 2018-12-12 15:47:48 -02:00
parent cbef042b9f
commit c1fe137365
1 changed files with 13 additions and 0 deletions

View File

@ -73,6 +73,19 @@ class Migrations {
}
static function add_output_column_to_bg_process() {
global $wpdb;
$table_name = $wpdb->prefix . 'tnc_bg_process';
$column_exists = $wpdb->get_results( "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = '{$wpdb->prefix}tnc_bg_process' AND column_name = 'output'" );
if(empty($column_exists)) {
$wpdb->query("
ALTER TABLE $table_name
ADD output longtext
");
}
}
static function init_capabilites() {
$Tainacan_Capabilities = \Tainacan\Capabilities::get_instance();