Plugin Directory

Changeset 3254308


Ignore:
Timestamp:
03/11/2025 06:45:20 PM (10 months ago)
Author:
dan009
Message:

2025-03-11

  • Added query when creating main table to handle timestamp column for older versions of mysql
Location:
raffle-play-woo/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • raffle-play-woo/trunk/includes/RafflePlayWoo_Plugin.php

    r3195022 r3254308  
    7272    }
    7373
     74    private function createMainTableTs( $table_name, $charset_collate ){
     75
     76        $backup_field = "backup_name varchar(30) default '',";
     77        if( $table_name !== $this->prefixTableName('main_bk') )
     78            $backup_field = "";
     79
     80        $sql_query =  "CREATE TABLE IF NOT EXISTS {$table_name} (
     81                    id mediumint(5) NOT NULL auto_increment,
     82                    order_id int(10) NOT NULL default '0',                           
     83                    customer_id int(5) NOT NULL default '0',
     84                    product_id  int(5) NOT NULL default '0',
     85                    ticket int(10) NOT NULL default '0',
     86                    quantity int(5) NOT NULL default '0',                                   
     87                    tickets_purchased int(5) NOT NULL default '0',
     88                    catid_one int(5) NOT NULL default '0',
     89                    catid_two int(5) NOT NULL default '0',
     90                    catid_three int(5) NOT NUll default '0',
     91                    ticket_no int(10) NOT NULL default '0',
     92                    ticket_from int(10) NOT NULL default '0',
     93                    ticket_to int(10) NOT NULL default '0',                           
     94                    ticket_txt text NOT NULL default '',
     95                    total_price float NOT NULL default '0.0',
     96                    live_order int(1) NOT NULL default '0',
     97                    deleted int(1) NOT NULL default '0',
     98                    order_status varchar(30) default '',
     99                    woo_session_id varchar(200) default '',
     100                    extra_one text default '',
     101                    reserved int(1) NOT NULL default '0',
     102                    {$backup_field}                   
     103                    created_at timestamp NOT NULL default CURRENT_TIMESTAMP,                                 
     104                    PRIMARY KEY  (id),
     105                    KEY order_id (order_id),                           
     106                    KEY customer_id (customer_id),
     107                    KEY product_id (product_id),
     108                    KEY ticket (ticket),
     109                    KEY ticket_no (ticket_no),
     110                    KEY catid_one (catid_one),
     111                    KEY catid_two (catid_two),
     112                    KEY order_status (order_status),
     113                    KEY created_at (created_at),
     114                    KEY live_order (live_order),
     115                    KEY woo_session_id (woo_session_id),
     116                    KEY reserved (reserved)
     117                ) $charset_collate;"; 
     118
     119        return $sql_query;
     120    }
     121
    74122    private function createAuditTable( $table_name, $charset_collate ){
    75123        $sql_query =  "CREATE TABLE IF NOT EXISTS {$table_name} (
     
    169217        $sql_main           = $this->createMainTables( $table_main, $charset_collate );
    170218
     219        //create main with timestamp if datetime is not created
     220        $sql_main_ts        = $this->createMainTableTs( $table_main, $charset_collate );
     221
    171222        $sql_main_b         = $this->createMainTables( $table_main_b, $charset_collate );
    172223
     
    181232        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    182233
    183         dbDelta( $sql_main ); 
     234        dbDelta( $sql_main );
     235        dbDelta( $sql_main_ts );
    184236        dbDelta( $sql_main_b ) ;   
    185237        dbDelta( $sql_audit  );
  • raffle-play-woo/trunk/raffle-play-woo.php

    r3195022 r3254308  
    33* Plugin Name: Raffle Play Woo
    44* Plugin URI: https://tuskcode.com
    5 * Version: 2.4.3
     5* Version: 2.4.4
    66* Author: dan009
    77* Description: Raffle Play Woo is the next raffle plugin for your website. It offers a complete workflow of managing raffle tickets from the admin view to the user experience.
     
    1414
    1515$RafflePlayWoo_MinimalRequiredPhpVersion = '5.2';
    16 if( ! defined('RAFFLE_PLAY_WOO_VERSION')) define('RAFFLE_PLAY_WOO_VERSION', '2.4.3');
     16if( ! defined('RAFFLE_PLAY_WOO_VERSION')) define('RAFFLE_PLAY_WOO_VERSION', '2.4.4');
    1717if( ! defined('RAFFLE_PLAY_WOO_WP_TESTED')) define('RAFFLE_PLAY_WOO_WP_TESTED', '6.7');
    1818if( ! defined('RAFFLE_PLAY_WOO_URL')) define( 'RAFFLE_PLAY_WOO_URL', esc_url( plugins_url( '', __FILE__ ) ) );
  • raffle-play-woo/trunk/readme.txt

    r3195022 r3254308  
    55Requires at least: 5.0.1
    66Tested up to: 6.7
    7 Stable tag: 2.4.3
     7Stable tag: 2.4.4
    88Requires PHP: 5.2.4
    99License: GPLv2 or later
     
    3535
    3636== Changelog ==
     37
     38= 2025-03-11
     39* Added query when creating main table to handle timestamp column for older versions of mysql
    3740
    3841= 2024-11-22
Note: See TracChangeset for help on using the changeset viewer.