8accee07 by Marty Penner

Ensure the wp_sequencer is created as InnoDB

1 parent 09fa4bed
...@@ -76,15 +76,15 @@ class Actions { ...@@ -76,15 +76,15 @@ class Actions {
76 public static function init() { 76 public static function init() {
77 global $wpdb; 77 global $wpdb;
78 $create_table_statement = " 78 $create_table_statement = "
79 CREATE TABLE IF NOT EXISTS `".$wpdb->prefix."sequencer` ( 79 CREATE TABLE IF NOT EXISTS `wp_sequencer` (
80 `prefix` varchar(3) NOT NULL, 80 `prefix` varchar(3) CHARACTER SET latin1 NOT NULL,
81 `start` int(7) unsigned zerofill NOT NULL DEFAULT '0000000', 81 `start` int(7) unsigned zerofill NOT NULL DEFAULT '0000000',
82 `end` int(7) unsigned zerofill NOT NULL DEFAULT '9999999', 82 `end` int(7) unsigned zerofill NOT NULL DEFAULT '9999999',
83 `current` int(7) unsigned zerofill DEFAULT '0000000', 83 `current` int(7) unsigned zerofill DEFAULT '0000000',
84 `last_used` int(16) NOT NULL DEFAULT '0', 84 `last_used` int(16) NOT NULL DEFAULT '0',
85 PRIMARY KEY (`prefix`), 85 PRIMARY KEY (`prefix`),
86 UNIQUE KEY `prefix` (`prefix`) 86 UNIQUE KEY `prefix` (`prefix`)
87 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; 87 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
88 "; 88 ";
89 $wpdb->query($create_table_statement); 89 $wpdb->query($create_table_statement);
90 //$wpdb->query("INSERT INTO `wp_sequencer` (`prefix`, `start`, `end`, `current`, `last_used`) VALUES ('EVT', 0000000, 9999999, 0000000, 0),('NTC', 0000000, 9999999, 0000000, 0),('CEH', 0000000, 9999999, 0000000, 0);"); 90 //$wpdb->query("INSERT INTO `wp_sequencer` (`prefix`, `start`, `end`, `current`, `last_used`) VALUES ('EVT', 0000000, 9999999, 0000000, 0),('NTC', 0000000, 9999999, 0000000, 0),('CEH', 0000000, 9999999, 0000000, 0);");
......