@@ -101,7 +101,6 @@ function create_code_snippets_table( $table_name ) {
101
101
require_once ABSPATH . 'wp-admin/includes/upgrade.php ' ;
102
102
103
103
/* Set the database charset */
104
-
105
104
$ charset_collate = '' ;
106
105
107
106
if ( ! empty ( $ wpdb ->charset ) ) {
@@ -113,19 +112,17 @@ function create_code_snippets_table( $table_name ) {
113
112
}
114
113
115
114
/* Create the database table */
116
-
117
115
$ sql = "CREATE TABLE $ table_name (
118
- id bigint(20) unsigned not null auto_increment ,
119
- name tinytext not null ,
120
- description text,
121
- code longtext not null ,
122
- tags longtext,
123
- scope tinyint(1) default 0,
124
- active tinyint(1) not null default 0,
125
- primary key (id)
126
- ) { $ charset_collate} ; " ;
116
+ id bigint(20) NOT NULL AUTO_INCREMENT ,
117
+ name tinytext NOT NULL default '' ,
118
+ description text NOT NULL default '' ,
119
+ code longtext NOT NULL default '' ,
120
+ tags longtext NOT NULL default '' ,
121
+ scope tinyint(1) NOT NULL default 0,
122
+ active tinyint(1) NOT NULL default 0,
123
+ PRIMARY KEY (id)
124
+ ) $ charset_collate; " ;
127
125
128
126
dbDelta ( $ sql );
129
-
130
127
do_action ( 'code_snippets/create_table ' , $ table_name );
131
128
}
0 commit comments