get_charset_collate(); dbDelta( "CREATE TABLE {$table} ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, created datetime NOT NULL, url varchar(2048) NOT NULL, url_hash char(32) NOT NULL, post_id bigint(20) unsigned NOT NULL DEFAULT 0, data longtext NOT NULL, PRIMARY KEY (id), KEY url_hash (url_hash), KEY created (created) ) {$charset};" ); } /** * Remove data stored by versions 3.x and earlier. */ public static function remove_legacy() { global $wpdb; delete_option( '_all-in-one_minifier' ); delete_option( 'all-in-one-minifier' ); $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'alone_minifier_analysis' ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery,WordPress.DB.PreparedSQL.NotPrepared -- Fixed table name; schema change. $legacy = WP_CONTENT_DIR . '/cache/alone_minifier'; if ( is_dir( $legacy ) ) { AIOM_Cache_Dir::delete_tree( $legacy ); } } }