| @@ -55,8 +55,26 @@ | ||
| 55 | 55 | PRIMARY KEY `id` (`id`) |
| 56 | 56 | ) |
| 57 | 57 | " . $wpdb->get_charset_collate() . "; |
| 58 | 58 | "); |
| 59 | - | |
| 59 | + | |
| 60 | + //Create sco table if it doesn't already exist | |
| 61 | + $wpdb->query | |
| 62 | + (" | |
| 63 | + CREATE TABLE IF NOT EXISTS | |
| 64 | + `" . $wpdb->prefix . MAKECOMMERCE_SCO_TABLENAME . "` | |
| 65 | + ( | |
| 66 | + `id` int(11) unsigned not null auto_increment, | |
| 67 | + `cart_id` varchar(64) not null default '', | |
| 68 | + `order_id` int(10) unsigned not null, | |
| 69 | + `created` int(10) unsigned not null, | |
| 70 | + `modified` int(10) unsigned not null, | |
| 71 | + `status` tinyint unsigned not null, | |
| 72 | + `content` mediumtext, | |
| 73 | + primary key id (`id`), | |
| 74 | + key `cart_id` (`cart_id`) | |
| 75 | + ) | |
| 76 | + " . $wpdb->get_charset_collate() . "; | |
| 77 | + "); | |
| 60 | 78 | } |
| 61 | 79 | |
| 62 | 80 | } |