{"table_name":"aime_modules","full_table_name":"wp_aime_modules","description":"Stores aime modules data created by this plugin.","detection_method":"static","confidence":"medium","create_sql":"CREATE TABLE wp_aime_modules ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, module_id varchar(50) NOT NULL, is_active tinyint(1) NOT NULL DEFAULT 1, settings longtext, activated_at datetime DEFAULT NULL, updated_at datetime DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY idx_module_id (module_id) ) {$charset_collate};\"; // Activity log. $tables[] = \"CREATE TABLE wp_aime_log ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, module_id varchar(50) DEFAULT 'core', level varchar(20) NOT NULL DEFAULT 'info', message text NOT NULL, context longtext, created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_module (module_id), KEY idx_level (level), KEY idx_created (created_at) ) {$charset_collate};\"; // AI usage log (token accounting per generation call). $tables[] = \"CREATE TABLE wp_aime_ai_usage ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, connection_id varchar(64) NOT NULL DEFAULT '', connection_name varchar(191) NOT NULL DEFAULT '', provider varchar(50) NOT NULL DEFAULT '', model varchar(191) NOT NULL DEFAULT '', task varchar(50) NOT NULL DEFAULT 'text', prompt_tokens bigint(20) unsigned NOT NULL DEFAULT 0, completion_tokens bigint(20) unsigned NOT NULL DEFAULT 0, success tinyint(1) NOT NULL DEFAULT 1, created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_created (created_at), KEY idx_connection (connection_id) ) {$charset_collate};\"; // Background AI job queue. $tables[] = \"CREATE TABLE wp_aime_ai_jobs ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, type varchar(50) NOT NULL, payload longtext, status varchar(20) NOT NULL DEFAULT 'pending', attempts tinyint(3) unsigned NOT NULL DEFAULT 0, result longtext, error text, created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, started_at datetime DEFAULT NULL, completed_at datetime DEFAULT NULL, PRIMARY KEY (id), KEY idx_status (status), KEY idx_created (created_at) ) {$charset_collate};\"; foreach ( $tables as $sql ) { dbDelta( $sql );","columns":[{"name":"id","type":"bigint(20) unsigned","nullable":false,"primary_key":true},{"name":"module_id","type":"varchar(50)","nullable":false,"primary_key":false},{"name":"is_active","type":"tinyint(1)","nullable":false,"primary_key":false},{"name":"settings","type":"longtext","nullable":true,"primary_key":false},{"name":"activated_at","type":"datetime","nullable":true,"primary_key":false},{"name":"updated_at","type":"datetime","nullable":true,"primary_key":false},{"name":"module_id","type":"varchar(50)","nullable":true,"primary_key":false},{"name":"level","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"message","type":"text","nullable":false,"primary_key":false},{"name":"context","type":"longtext","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"connection_id","type":"varchar(64)","nullable":false,"primary_key":false},{"name":"connection_name","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"provider","type":"varchar(50)","nullable":false,"primary_key":false},{"name":"model","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"task","type":"varchar(50)","nullable":false,"primary_key":false},{"name":"prompt_tokens","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"completion_tokens","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"success","type":"tinyint(1)","nullable":false,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"type","type":"varchar(50)","nullable":false,"primary_key":false},{"name":"payload","type":"longtext","nullable":true,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"attempts","type":"tinyint(3) unsigned","nullable":false,"primary_key":false},{"name":"result","type":"longtext","nullable":true,"primary_key":false},{"name":"error","type":"text","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"started_at","type":"datetime","nullable":true,"primary_key":false},{"name":"completed_at","type":"datetime","nullable":true,"primary_key":false}],"plugin":{"slug":"ai-marketing-expert","name":"AI Marketing Expert — AI Email Marketing, AI Content Generator, SEO Analyzer, AI Workflow Automation, Social Media & Ai Chatbot","active_installs":2000,"version":"1.2.8","wp_org_url":"https://wordpress.org/plugins/ai-marketing-expert/"}}