PluginProbe
MakeCommerce for WooCommerce / 3.0.9
MakeCommerce for WooCommerce v3.0.9
4.1.0 4.0.8 trunk 1.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 2.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.0 2.2.1 2.2.2 All 96 releases
← All changes | includes/activator.php +20 -12 trunk3.0.9 View file →
@@ -23,18 +23,8 @@
23 23 * @since 3.0.0
24 24 */
25 25 public static function activate() {
26 26
27 - self::create_tables();
28 -
29 - }
30 -
31 - /**
32 - * Creates db tables.
33 - *
34 - * @since 3.0.12
35 - */
36 - public static function create_tables() {
37 27 global $wpdb;
38 28
39 29 //Create table if it doesn't already exist
40 30 $wpdb->query
@@ -48,15 +38,33 @@
48 38 `name` varchar(25) NOT NULL,
49 39 `url` varchar(250) NOT NULL,
50 40 `logo_url` varchar(250),
51 41 `channel` varchar(250),
52 - `display_name` varchar(250),
42 + 'display_name' varchar(250),
53 43 `min_amount` mediumint(9),
54 44 `max_amount` mediumint(9),
55 - PRIMARY KEY `id` (`id`)
45 + UNIQUE KEY `id` (`id`)
56 46 )
57 47 " . $wpdb->get_charset_collate() . ";
58 48 ");
59 49
50 + //Create sco table if it doesn't already exist
51 + $wpdb->query
52 + ("
53 + CREATE TABLE IF NOT EXISTS
54 + `" . $wpdb->prefix . MAKECOMMERCE_SCO_TABLENAME . "`
55 + (
56 + `id` int(11) unsigned not null auto_increment,
57 + `cart_id` varchar(64) not null default '',
58 + `order_id` int(10) unsigned not null,
59 + `created` int(10) unsigned not null,
60 + `modified` int(10) unsigned not null,
61 + `status` tinyint unsigned not null,
62 + `content` mediumtext,
63 + unique key id (`id`),
64 + key `cart_id` (`cart_id`)
65 + )
66 + " . $wpdb->get_charset_collate() . ";
67 + ");
60 68 }
61 69
62 70 }