get_charset_collate(); // Audit log table. Though our data mainly store on API side, we will need a table for caching. $sql = "CREATE TABLE IF NOT EXISTS {$wpdb->base_prefix}defender_audit_log ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `timestamp` int NOT NULL, `event_type` varchar(255) NOT NULL, `action_type` varchar(255) NOT NULL, `site_url` varchar(255) NOT NULL, `user_id` int NOT NULL, `context` varchar(255) NOT NULL, `ip` varchar(45) NOT NULL, `msg` varchar(255) NOT NULL, `blog_id` int NOT NULL, `synced` int NOT NULL, `ttl` int NOT NULL, PRIMARY KEY (`id`), KEY `event_type` (`event_type`), KEY `action_type` (`action_type`), KEY `user_id` (`user_id`), KEY `context` (`context`), KEY `ip` (`ip`) ) $charset_collate;"; $wpdb->query( $sql ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared, WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching } }