{"table_name":"aipgp_skills","full_table_name":"wp_aipgp_skills","description":"Stores aipgp skills data created by this plugin.","detection_method":"static","confidence":"medium","create_sql":"CREATE TABLE wp_aipgp_skills ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, slug VARCHAR(191) NOT NULL, name VARCHAR(191) NOT NULL, version VARCHAR(32) NULL, task_types VARCHAR(255) NULL, source ENUM('bundled','uploaded','remote') NOT NULL, file_path VARCHAR(512) NULL, checksum VARCHAR(64) NULL, body LONGTEXT NULL, enabled TINYINT(1) DEFAULT 1, updated_at DATETIME NULL, KEY slug (slug) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_sources ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, type ENUM('published_posts','uploaded_file','product_research','random') NOT NULL, config LONGTEXT NULL, enabled TINYINT(1) DEFAULT 1 ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_link_relations ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, product_slug VARCHAR(191) NULL, label VARCHAR(191) NULL, type VARCHAR(64) NULL, url VARCHAR(512) NULL, notes TEXT NULL, KEY product_slug (product_slug) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_generation_jobs ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, source_id BIGINT UNSIGNED NULL, source_type VARCHAR(64) NULL, topic LONGTEXT NULL, status VARCHAR(64) NOT NULL DEFAULT 'pending', post_id BIGINT UNSIGNED NULL, tokens_in INT UNSIGNED DEFAULT 0, tokens_out INT UNSIGNED DEFAULT 0, step_data LONGTEXT NULL, error_log TEXT NULL, scheduled_at DATETIME NULL, created_at DATETIME NULL, updated_at DATETIME NULL, KEY status (status), KEY status_scheduled (status, scheduled_at), KEY updated_at (updated_at), KEY post_id (post_id) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_generation_logs ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, job_id BIGINT UNSIGNED NULL, step VARCHAR(64) NULL, provider VARCHAR(64) NULL, model VARCHAR(64) NULL, tokens_in INT NULL, tokens_out INT NULL, raw_response LONGTEXT NULL, created_at DATETIME NULL, KEY job_id (job_id) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_social_drafts ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, post_id BIGINT UNSIGNED NULL, platform VARCHAR(32) NULL, content LONGTEXT NULL, source VARCHAR(32) DEFAULT 'ai', status ENUM('draft','approved','published','n/a') DEFAULT 'draft', scheduled_publish_at DATETIME NULL, auto_publish TINYINT(1) DEFAULT 0, profile_keys TEXT NULL, template_id BIGINT UNSIGNED NULL, share_count INT DEFAULT 0, last_shared_at DATETIME NULL, created_at DATETIME NULL, updated_at DATETIME NULL, KEY post_id (post_id) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_social_profiles ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, platform VARCHAR(32) NOT NULL, profile_key VARCHAR(191) NOT NULL, profile_id VARCHAR(191) NULL, name VARCHAR(255) NULL, username VARCHAR(255) NULL, thumbnail_url VARCHAR(512) NULL, account_type VARCHAR(32) NULL, status TINYINT(1) DEFAULT 1, app_id VARCHAR(255) NULL, app_secret TEXT NULL, access_token LONGTEXT NULL, refresh_token LONGTEXT NULL, token_expires_at DATETIME NULL, platform_settings LONGTEXT NULL, created_by BIGINT UNSIGNED NULL, created_at DATETIME NULL, updated_at DATETIME NULL, UNIQUE KEY uq_profile_key (profile_key), KEY idx_platform (platform), KEY idx_status (status) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_social_queue ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, post_id BIGINT UNSIGNED NOT NULL, draft_id BIGINT UNSIGNED NULL, platform VARCHAR(32) NOT NULL, profile_key VARCHAR(191) NOT NULL, content LONGTEXT NULL, media_urls TEXT NULL, status VARCHAR(32) NOT NULL DEFAULT 'pending', scheduled_at DATETIME NULL, published_at DATETIME NULL, platform_post_id VARCHAR(255) NULL, platform_post_url VARCHAR(512) NULL, error_message TEXT NULL, retry_count INT DEFAULT 0, created_at DATETIME NULL, updated_at DATETIME NULL, KEY idx_post_id (post_id), KEY idx_status_scheduled (status, scheduled_at), KEY idx_platform (platform), KEY idx_profile_key (profile_key) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_social_templates ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, platform VARCHAR(32) NOT NULL, name VARCHAR(191) NOT NULL, template_structure LONGTEXT NOT NULL, content_type VARCHAR(32) DEFAULT 'statuswithlink', content_source VARCHAR(32) DEFAULT 'content', character_limit INT DEFAULT 280, include_featured_image TINYINT(1) DEFAULT 1, include_categories_as_tags TINYINT(1) DEFAULT 1, clean_html_and_shortcodes TINYINT(1) DEFAULT 1, is_default TINYINT(1) DEFAULT 0, created_at DATETIME NULL, updated_at DATETIME NULL, KEY idx_platform (platform), UNIQUE KEY uq_platform_name (platform, name) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_schedule_slots ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, day_of_week TINYINT UNSIGNED NOT NULL, time_slot TIME NOT NULL, post_types VARCHAR(255) DEFAULT 'post', category_ids TEXT NULL, is_active TINYINT(1) DEFAULT 1, created_at DATETIME NULL, KEY idx_day_time (day_of_week, time_slot), KEY idx_active (is_active) ) $charset_collate;\"; $sql[] = \"CREATE TABLE wp_aipgp_email_logs ( id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY, post_id BIGINT UNSIGNED NOT NULL, event_type VARCHAR(32) NOT NULL, recipient_email VARCHAR(255) NOT NULL, recipient_name VARCHAR(255) NULL, recipient_role VARCHAR(64) NULL, subject VARCHAR(255) NULL, status VARCHAR(32) DEFAULT 'sent', error_message TEXT NULL, sent_at DATETIME NULL, KEY idx_post_event (post_id, event_type), KEY idx_sent_at (sent_at) ) $charset_collate;\"; foreach ( $sql as $statement ) { dbDelta( $statement );","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":true},{"name":"slug","type":"VARCHAR(191)","nullable":false,"primary_key":false},{"name":"name","type":"VARCHAR(191)","nullable":false,"primary_key":false},{"name":"version","type":"VARCHAR(32)","nullable":true,"primary_key":false},{"name":"task_types","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"source","type":"ENUM('bundled','uploaded','remote')","nullable":false,"primary_key":false},{"name":"file_path","type":"VARCHAR(512)","nullable":true,"primary_key":false},{"name":"body","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"enabled","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"type","type":"ENUM('published_posts','uploaded_file','product_research','random')","nullable":false,"primary_key":false},{"name":"config","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"enabled","type":"TINYINT(1)","nullable":true,"primary_key":true},{"name":"product_slug","type":"VARCHAR(191)","nullable":true,"primary_key":false},{"name":"label","type":"VARCHAR(191)","nullable":true,"primary_key":false},{"name":"type","type":"VARCHAR(64)","nullable":true,"primary_key":false},{"name":"url","type":"VARCHAR(512)","nullable":true,"primary_key":false},{"name":"notes","type":"TEXT","nullable":true,"primary_key":false},{"name":"source_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"source_type","type":"VARCHAR(64)","nullable":true,"primary_key":false},{"name":"topic","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"status","type":"VARCHAR(64)","nullable":false,"primary_key":false},{"name":"post_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"tokens_in","type":"INT UNSIGNED","nullable":true,"primary_key":false},{"name":"tokens_out","type":"INT UNSIGNED","nullable":true,"primary_key":false},{"name":"step_data","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"error_log","type":"TEXT","nullable":true,"primary_key":false},{"name":"scheduled_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"job_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"step","type":"VARCHAR(64)","nullable":true,"primary_key":false},{"name":"provider","type":"VARCHAR(64)","nullable":true,"primary_key":false},{"name":"model","type":"VARCHAR(64)","nullable":true,"primary_key":false},{"name":"tokens_in","type":"INT","nullable":true,"primary_key":false},{"name":"tokens_out","type":"INT","nullable":true,"primary_key":false},{"name":"raw_response","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"post_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"platform","type":"VARCHAR(32)","nullable":true,"primary_key":false},{"name":"content","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"source","type":"VARCHAR(32)","nullable":true,"primary_key":false},{"name":"status","type":"ENUM('draft','approved','published','n/a')","nullable":true,"primary_key":false},{"name":"scheduled_publish_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"auto_publish","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"profile_keys","type":"TEXT","nullable":true,"primary_key":false},{"name":"template_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"share_count","type":"INT","nullable":true,"primary_key":false},{"name":"last_shared_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"platform","type":"VARCHAR(32)","nullable":false,"primary_key":false},{"name":"profile_key","type":"VARCHAR(191)","nullable":false,"primary_key":false},{"name":"profile_id","type":"VARCHAR(191)","nullable":true,"primary_key":false},{"name":"name","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"username","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"thumbnail_url","type":"VARCHAR(512)","nullable":true,"primary_key":false},{"name":"account_type","type":"VARCHAR(32)","nullable":true,"primary_key":false},{"name":"status","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"app_id","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"app_secret","type":"TEXT","nullable":true,"primary_key":false},{"name":"access_token","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"refresh_token","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"token_expires_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"platform_settings","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"created_by","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"post_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"draft_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"platform","type":"VARCHAR(32)","nullable":false,"primary_key":false},{"name":"profile_key","type":"VARCHAR(191)","nullable":false,"primary_key":false},{"name":"content","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"media_urls","type":"TEXT","nullable":true,"primary_key":false},{"name":"status","type":"VARCHAR(32)","nullable":false,"primary_key":false},{"name":"scheduled_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"published_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"platform_post_id","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"platform_post_url","type":"VARCHAR(512)","nullable":true,"primary_key":false},{"name":"error_message","type":"TEXT","nullable":true,"primary_key":false},{"name":"retry_count","type":"INT","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"platform","type":"VARCHAR(32)","nullable":false,"primary_key":false},{"name":"name","type":"VARCHAR(191)","nullable":false,"primary_key":false},{"name":"template_structure","type":"LONGTEXT","nullable":false,"primary_key":false},{"name":"content_type","type":"VARCHAR(32)","nullable":true,"primary_key":false},{"name":"content_source","type":"VARCHAR(32)","nullable":true,"primary_key":false},{"name":"character_limit","type":"INT","nullable":true,"primary_key":false},{"name":"include_featured_image","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"include_categories_as_tags","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"clean_html_and_shortcodes","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"is_default","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"day_of_week","type":"TINYINT UNSIGNED","nullable":false,"primary_key":false},{"name":"time_slot","type":"TIME","nullable":false,"primary_key":false},{"name":"post_types","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"category_ids","type":"TEXT","nullable":true,"primary_key":false},{"name":"is_active","type":"TINYINT(1)","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"post_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"event_type","type":"VARCHAR(32)","nullable":false,"primary_key":false},{"name":"recipient_email","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"recipient_name","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"recipient_role","type":"VARCHAR(64)","nullable":true,"primary_key":false},{"name":"subject","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"status","type":"VARCHAR(32)","nullable":true,"primary_key":false},{"name":"error_message","type":"TEXT","nullable":true,"primary_key":false},{"name":"sent_at","type":"DATETIME","nullable":true,"primary_key":false}],"plugin":{"slug":"postloom-ai-post-generator-and-publisher","name":"Postloom – AI Post Generator and Publisher | Autonomous Post Publishing Engine","active_installs":0,"version":"1.0.1","wp_org_url":"https://wordpress.org/plugins/postloom-ai-post-generator-and-publisher/"}}