{"table_name":"statements","full_table_name":"wp_statements","description":"Stores statements data created by this plugin.","detection_method":"static","confidence":"high","create_sql":"CREATE TABLE statements (see * https://core.trac.wordpress.org/ticket/19207), producing \"Duplicate * key name\" warnings that pollute the error log on every migration tick. * We manage these specific composite indexes outside dbDelta so they * can be added once and stay quiet on subsequent runs. * * Safe to call on every migration: * - SHOW INDEX confirms the key is absent before issuing ALTER. * - $wpdb->suppress_errors() prevents wpdb from printing the harmless * duplicate-key warning if a concurrent request races us between the * SHOW INDEX check and the ALTER statement. * * @since 2.6.0 * @return void */ private function ensure_composite_indexes(): void { global $wpdb; $indexes = [ $this->automation_jobs_table => [ 'idx_status_next_run_created' => '(status, next_run, created_at)', ], $this->job_products_table => [ 'idx_status_processing_started' => '(status, processing_started_at)', ], $this->draft_content_table => [ 'idx_status_type_created' => '(status, content_type, created_at)', 'idx_job_status_created' => '(job_id, status, created_at)', ], $this->chatbot_messages_table => [ 'idx_record_type_created' => '(record_type, created_at)', ], ]; foreach ($indexes as $table => $table_indexes) { foreach ($table_indexes as $index_name => $columns) { $existing = $wpdb->get_var($wpdb->prepare( \"SHOW INDEX FROM `{$table}` WHERE Key_name = %s\", $index_name ));","columns":[],"plugin":{"slug":"ai-product-tools","name":"AI Product Tools – Bulk Product Content Generator & AI Toolkit for WooCommerce","active_installs":400,"version":"2.6.4","wp_org_url":"https://wordpress.org/plugins/ai-product-tools/"}}