{"table_name":"codela_logs","full_table_name":"wp_codela_logs","description":"A logging table that records activity, events, or audit history.","detection_method":"static","confidence":"medium","create_sql":"CREATE TABLE IF NOT EXISTS wp_codela_logs ( id bigint(20) NOT NULL AUTO_INCREMENT, module varchar(50) NOT NULL, event varchar(100) NOT NULL, object_id bigint(20) DEFAULT NULL, data longtext DEFAULT NULL, created_at datetime DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY module (module), KEY object_id (object_id) ) $charset_collate;\"; $payment_reminder_sql = \"CREATE TABLE IF NOT EXISTS wp_codela_pr_deliveries ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, order_id bigint(20) unsigned NOT NULL, step_index tinyint unsigned NOT NULL, channel varchar(20) NOT NULL, idempotency_key char(32) NOT NULL, status varchar(20) NOT NULL DEFAULT 'scheduled', scheduled_at datetime NOT NULL, attempted_at datetime DEFAULT NULL, sent_at datetime DEFAULT NULL, converted_at datetime DEFAULT NULL, attempts smallint unsigned NOT NULL DEFAULT 0, last_error text DEFAULT NULL, action_id bigint(20) unsigned DEFAULT NULL, created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY uniq_idem (idempotency_key), KEY order_step (order_id, step_index), KEY status_sched (status, scheduled_at), KEY converted_at (converted_at), KEY action_id (action_id) ) $charset_collate;\"; $cart_recovery_sql = \"CREATE TABLE IF NOT EXISTS wp_codela_cart_recovery ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, legacy_post_id bigint(20) unsigned DEFAULT NULL, user_id bigint(20) unsigned DEFAULT NULL, email varchar(191) NOT NULL, fname varchar(100) DEFAULT '', lname varchar(100) DEFAULT '', phone varchar(50) DEFAULT '', items longtext DEFAULT NULL, total decimal(18,4) NOT NULL DEFAULT 0, status varchar(20) NOT NULL DEFAULT 'open', hash varchar(64) DEFAULT '', hash_created_at datetime DEFAULT NULL, modified datetime DEFAULT NULL, last_activity datetime DEFAULT NULL, send_count smallint unsigned NOT NULL DEFAULT 0, last_sent datetime DEFAULT NULL, last_sent_channels text DEFAULT NULL, clicked_at datetime DEFAULT NULL, recovery_consumed_at datetime DEFAULT NULL, recovered_at datetime DEFAULT NULL, recovered_order_id bigint(20) unsigned DEFAULT NULL, expired_at datetime DEFAULT NULL, created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY legacy_post_id (legacy_post_id), KEY email_status (email, status), KEY user_status (user_id, status), KEY status_activity (status, last_activity), KEY status_created (status, created_at), KEY status_send (status, send_count), KEY recovered_order_id (recovered_order_id), KEY hash (hash) ) $charset_collate;\"; $eft_notifications_sql = \"CREATE TABLE IF NOT EXISTS wp_codela_eft_notifications ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, order_id bigint(20) unsigned NOT NULL, name varchar(191) DEFAULT '', email varchar(191) DEFAULT '', amount varchar(80) DEFAULT '', bank varchar(120) DEFAULT '', status varchar(20) NOT NULL DEFAULT 'open', receipt_id bigint(20) unsigned DEFAULT NULL, status_actor varchar(30) DEFAULT '', status_updated_at datetime DEFAULT NULL, created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY order_status (order_id, status), KEY order_created (order_id, created_at), KEY status_created (status, created_at), KEY email_status (email, status) ) $charset_collate;\"; $notify_logs_sql = \"CREATE TABLE IF NOT EXISTS wp_codela_notify_logs ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, created_at datetime NOT NULL, created_at_gmt datetime NOT NULL, channel varchar(20) NOT NULL, recipient_masked varchar(191) NOT NULL DEFAULT '', recipient_hash char(64) NOT NULL DEFAULT '', recipient_type varchar(20) NOT NULL DEFAULT '', recipient_label varchar(191) NOT NULL DEFAULT '', source varchar(191) NOT NULL DEFAULT '', subject varchar(255) NOT NULL DEFAULT '', message longtext NOT NULL, success tinyint(1) NOT NULL DEFAULT 0, error text DEFAULT NULL, event_id varchar(191) NOT NULL DEFAULT '', message_hash char(40) NOT NULL DEFAULT '', subject_hash char(40) NOT NULL DEFAULT '', title varchar(191) NOT NULL DEFAULT '', PRIMARY KEY (id), KEY created_at (created_at), KEY success_created (success, created_at), KEY channel (channel), KEY event_id (event_id), KEY source (source), KEY recipient_hash (recipient_hash) ) $charset_collate;\"; $consent_sync_queue_sql = \"CREATE TABLE IF NOT EXISTS wp_codela_consent_sync_queue ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, order_id bigint(20) unsigned DEFAULT NULL, channel varchar(20) NOT NULL, registry_channel varchar(20) NOT NULL, recipient varchar(191) NOT NULL, recipient_hash char(64) NOT NULL, consent_status varchar(10) NOT NULL, source varchar(80) NOT NULL DEFAULT '', provider varchar(40) NOT NULL DEFAULT 'custom_webhook', brand_code varchar(80) NOT NULL DEFAULT '', status varchar(20) NOT NULL DEFAULT 'pending', attempts smallint unsigned NOT NULL DEFAULT 0, http_code smallint unsigned DEFAULT NULL, last_error text DEFAULT NULL, response_body text DEFAULT NULL, payload_json longtext DEFAULT NULL, synced_at datetime DEFAULT NULL, created_at datetime NOT NULL, updated_at datetime NOT NULL, PRIMARY KEY (id), KEY recipient_channel (recipient_hash, channel), KEY status_attempts (status, attempts), KEY order_id (order_id), KEY created_at (created_at) ) $charset_collate;\"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $logs_sql );","columns":[{"name":"id","type":"bigint(20)","nullable":false,"primary_key":true},{"name":"module","type":"varchar(50)","nullable":false,"primary_key":false},{"name":"event","type":"varchar(100)","nullable":false,"primary_key":false},{"name":"object_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"data","type":"longtext","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":true,"primary_key":false},{"name":"order_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"step_index","type":"tinyint unsigned","nullable":false,"primary_key":false},{"name":"channel","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"idempotency_key","type":"char(32)","nullable":false,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"scheduled_at","type":"datetime","nullable":false,"primary_key":false},{"name":"attempted_at","type":"datetime","nullable":true,"primary_key":false},{"name":"sent_at","type":"datetime","nullable":true,"primary_key":false},{"name":"converted_at","type":"datetime","nullable":true,"primary_key":false},{"name":"attempts","type":"smallint unsigned","nullable":false,"primary_key":false},{"name":"last_error","type":"text","nullable":true,"primary_key":false},{"name":"action_id","type":"bigint(20) unsigned","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"updated_at","type":"datetime","nullable":false,"primary_key":false},{"name":"legacy_post_id","type":"bigint(20) unsigned","nullable":true,"primary_key":false},{"name":"user_id","type":"bigint(20) unsigned","nullable":true,"primary_key":false},{"name":"email","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"fname","type":"varchar(100)","nullable":true,"primary_key":false},{"name":"lname","type":"varchar(100)","nullable":true,"primary_key":false},{"name":"phone","type":"varchar(50)","nullable":true,"primary_key":false},{"name":"items","type":"longtext","nullable":true,"primary_key":false},{"name":"total","type":"decimal(18,4)","nullable":false,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"hash","type":"varchar(64)","nullable":true,"primary_key":false},{"name":"hash_created_at","type":"datetime","nullable":true,"primary_key":false},{"name":"modified","type":"datetime","nullable":true,"primary_key":false},{"name":"last_activity","type":"datetime","nullable":true,"primary_key":false},{"name":"send_count","type":"smallint unsigned","nullable":false,"primary_key":false},{"name":"last_sent","type":"datetime","nullable":true,"primary_key":false},{"name":"last_sent_channels","type":"text","nullable":true,"primary_key":false},{"name":"clicked_at","type":"datetime","nullable":true,"primary_key":false},{"name":"recovery_consumed_at","type":"datetime","nullable":true,"primary_key":false},{"name":"recovered_at","type":"datetime","nullable":true,"primary_key":false},{"name":"recovered_order_id","type":"bigint(20) unsigned","nullable":true,"primary_key":false},{"name":"expired_at","type":"datetime","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"updated_at","type":"datetime","nullable":false,"primary_key":false},{"name":"order_id","type":"bigint(20) unsigned","nullable":false,"primary_key":false},{"name":"name","type":"varchar(191)","nullable":true,"primary_key":false},{"name":"email","type":"varchar(191)","nullable":true,"primary_key":false},{"name":"amount","type":"varchar(80)","nullable":true,"primary_key":false},{"name":"bank","type":"varchar(120)","nullable":true,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"receipt_id","type":"bigint(20) unsigned","nullable":true,"primary_key":false},{"name":"status_actor","type":"varchar(30)","nullable":true,"primary_key":false},{"name":"status_updated_at","type":"datetime","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"updated_at","type":"datetime","nullable":false,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"created_at_gmt","type":"datetime","nullable":false,"primary_key":false},{"name":"channel","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"recipient_masked","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"recipient_hash","type":"char(64)","nullable":false,"primary_key":false},{"name":"recipient_type","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"recipient_label","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"source","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"subject","type":"varchar(255)","nullable":false,"primary_key":false},{"name":"message","type":"longtext","nullable":false,"primary_key":false},{"name":"success","type":"tinyint(1)","nullable":false,"primary_key":false},{"name":"error","type":"text","nullable":true,"primary_key":false},{"name":"event_id","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"message_hash","type":"char(40)","nullable":false,"primary_key":false},{"name":"subject_hash","type":"char(40)","nullable":false,"primary_key":false},{"name":"title","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"order_id","type":"bigint(20) unsigned","nullable":true,"primary_key":false},{"name":"channel","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"registry_channel","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"recipient","type":"varchar(191)","nullable":false,"primary_key":false},{"name":"recipient_hash","type":"char(64)","nullable":false,"primary_key":false},{"name":"consent_status","type":"varchar(10)","nullable":false,"primary_key":false},{"name":"source","type":"varchar(80)","nullable":false,"primary_key":false},{"name":"provider","type":"varchar(40)","nullable":false,"primary_key":false},{"name":"brand_code","type":"varchar(80)","nullable":false,"primary_key":false},{"name":"status","type":"varchar(20)","nullable":false,"primary_key":false},{"name":"attempts","type":"smallint unsigned","nullable":false,"primary_key":false},{"name":"http_code","type":"smallint unsigned","nullable":true,"primary_key":false},{"name":"last_error","type":"text","nullable":true,"primary_key":false},{"name":"response_body","type":"text","nullable":true,"primary_key":false},{"name":"payload_json","type":"longtext","nullable":true,"primary_key":false},{"name":"synced_at","type":"datetime","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":false,"primary_key":false},{"name":"updated_at","type":"datetime","nullable":false,"primary_key":false}],"plugin":{"slug":"codela-commerce-toolkit","name":"Codela – Checkout, Shipping & Notifications for WooCommerce","active_installs":0,"version":"1.1.1","wp_org_url":"https://wordpress.org/plugins/codela-commerce-toolkit/"}}