File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,28 +11,6 @@ public static function createTable(): void {
1111
1212 $ charset_collate = $ wpdb ->get_charset_collate ();
1313
14- $ check_table_query =
15- $ wpdb ->prepare (
16- 'SHOW TABLES LIKE %s ' ,
17- $ wpdb ->esc_like ( $ table_name )
18- );
19-
20- // if table exists, check structure
21- if ( $ wpdb ->get_var ( $ check_table_query ) === $ table_name ) {
22- // @todo We can remove this eventually
23- // If the ID column is missing, just remove the table and start
24- // again because dbDelta isn't adding it correctly
25- $ id_row = $ wpdb ->get_row (
26- "SHOW COLUMNS FROM $ table_name WHERE Field = 'id' "
27- );
28-
29- if ( ! $ id_row ) {
30- $ wpdb ->query (
31- "DROP TABLE IF EXISTS $ table_name; "
32- );
33- }
34- }
35-
3614 $ sql = "CREATE TABLE $ table_name (
3715 id mediumint(9) NOT NULL AUTO_INCREMENT,
3816 path VARCHAR(2083) NOT NULL,
Original file line number Diff line number Diff line change @@ -18,28 +18,6 @@ public static function createTable(): void {
1818
1919 $ charset_collate = $ wpdb ->get_charset_collate ();
2020
21- $ check_table_query =
22- $ wpdb ->prepare (
23- 'SHOW TABLES LIKE %s ' ,
24- $ wpdb ->esc_like ( $ table_name )
25- );
26-
27- // if table exists, check structure
28- if ( $ wpdb ->get_var ( $ check_table_query ) === $ table_name ) {
29- // @todo We can remove this eventually
30- // If the ID column is missing, just remove the table and start
31- // again because dbDelta isn't adding it correctly
32- $ id_row = $ wpdb ->get_row (
33- "SHOW COLUMNS FROM $ table_name WHERE Field = 'id' "
34- );
35-
36- if ( ! $ id_row ) {
37- $ wpdb ->query (
38- "DROP TABLE IF EXISTS $ table_name; "
39- );
40- }
41- }
42-
4321 $ sql = "CREATE TABLE $ table_name (
4422 id mediumint(9) NOT NULL AUTO_INCREMENT,
4523 path_hash CHAR(32) NOT NULL,
You can’t perform that action at this time.
0 commit comments