{"table_name":"tc_downloadable_files","full_table_name":"wp_tc_downloadable_files","description":"Stores tc downloadable files data created by this plugin.","detection_method":"static","confidence":"medium","create_sql":"CREATE TABLE wp_tc_downloadable_files ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, product_id BIGINT UNSIGNED NOT NULL, variation_id BIGINT UNSIGNED NULL, filename VARCHAR(255) NOT NULL DEFAULT '', original_name VARCHAR(255) NOT NULL DEFAULT '', file_path VARCHAR(512) NOT NULL DEFAULT '', file_size BIGINT UNSIGNED NOT NULL DEFAULT 0, mime_type VARCHAR(128) NOT NULL DEFAULT '', preview_path VARCHAR(512) NULL, readme TEXT NULL, position INT UNSIGNED NOT NULL DEFAULT 0, status ENUM('active','disabled') NOT NULL DEFAULT 'active', created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_product_id (product_id), KEY idx_variation_id (variation_id), KEY idx_status (status) ) {$charset}\", 'tc_downloadable_keys' => \"CREATE TABLE wp_tc_downloadable_keys ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, key_hash CHAR(64) NOT NULL, order_id BIGINT UNSIGNED NOT NULL, order_item_id BIGINT UNSIGNED NOT NULL, product_id BIGINT UNSIGNED NOT NULL, file_id BIGINT UNSIGNED NOT NULL, customer_id BIGINT UNSIGNED NULL, email VARCHAR(255) NOT NULL DEFAULT '', status ENUM('active','expired','revoked') NOT NULL DEFAULT 'active', expires_at DATETIME NULL, download_count INT UNSIGNED NOT NULL DEFAULT 0, max_downloads INT UNSIGNED NULL, last_ip VARCHAR(45) NULL, last_downloaded_at DATETIME NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), UNIQUE KEY uq_key_hash (key_hash), KEY idx_order_id (order_id), KEY idx_order_item_id (order_item_id), KEY idx_customer_id (customer_id), KEY idx_email (email), KEY idx_status (status), KEY idx_expires_at (expires_at) ) {$charset}\", 'tc_downloadable_log' => \"CREATE TABLE wp_tc_downloadable_log ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, key_id BIGINT UNSIGNED NULL, event ENUM('issued','downloaded','expired','revoked','failed_auth','failed_quota') NOT NULL DEFAULT 'downloaded', ip_address VARCHAR(45) NULL, user_agent VARCHAR(255) NULL, bytes_served BIGINT UNSIGNED NOT NULL DEFAULT 0, meta JSON NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_key_id (key_id), KEY idx_event (event), KEY idx_created_at (created_at) ) {$charset}\", 'tc_downloadable_agreements' => \"CREATE TABLE wp_tc_downloadable_agreements ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, product_id BIGINT UNSIGNED NULL, is_global TINYINT(1) NOT NULL DEFAULT 0, version INT UNSIGNED NOT NULL DEFAULT 1, title VARCHAR(255) NOT NULL DEFAULT '', content LONGTEXT NOT NULL, language_code CHAR(2) NOT NULL DEFAULT 'en', required TINYINT(1) NOT NULL DEFAULT 1, status ENUM('active','archived') NOT NULL DEFAULT 'active', created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_product_id (product_id), KEY idx_is_global (is_global), KEY idx_status (status), KEY idx_language_code (language_code) ) {$charset}\", 'tc_downloadable_acceptances' => \"CREATE TABLE wp_tc_downloadable_acceptances ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, agreement_id BIGINT UNSIGNED NOT NULL, agreement_version INT UNSIGNED NOT NULL DEFAULT 1, customer_id BIGINT UNSIGNED NULL, email VARCHAR(255) NOT NULL DEFAULT '', order_id BIGINT UNSIGNED NULL, order_item_id BIGINT UNSIGNED NULL, ip_address VARCHAR(45) NULL, user_agent VARCHAR(255) NULL, accepted_content_hash CHAR(64) NOT NULL, accepted_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY idx_agreement_id (agreement_id), KEY idx_customer_id (customer_id), KEY idx_email (email), KEY idx_order_id (order_id), KEY idx_order_item_id (order_item_id), KEY idx_accepted_at (accepted_at) ) {$charset}\", ]; foreach ( $tables as $table_name => $sql ) { $exists = $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $table_name ) );","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"product_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"variation_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"filename","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"original_name","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"file_path","type":"VARCHAR(512)","nullable":false,"primary_key":false},{"name":"file_size","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"mime_type","type":"VARCHAR(128)","nullable":false,"primary_key":false},{"name":"preview_path","type":"VARCHAR(512)","nullable":true,"primary_key":false},{"name":"readme","type":"TEXT","nullable":true,"primary_key":false},{"name":"position","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"status","type":"ENUM('active','disabled')","nullable":false,"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 UNSIGNED","nullable":false,"primary_key":false},{"name":"order_item_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"product_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"file_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"customer_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"email","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"status","type":"ENUM('active','expired','revoked')","nullable":false,"primary_key":false},{"name":"expires_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"download_count","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"max_downloads","type":"INT UNSIGNED","nullable":true,"primary_key":false},{"name":"last_ip","type":"VARCHAR(45)","nullable":true,"primary_key":false},{"name":"last_downloaded_at","type":"DATETIME","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"event","type":"ENUM('issued','downloaded','expired','revoked','failed_auth','failed_quota')","nullable":false,"primary_key":false},{"name":"ip_address","type":"VARCHAR(45)","nullable":true,"primary_key":false},{"name":"user_agent","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"bytes_served","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"meta","type":"JSON","nullable":true,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"product_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"is_global","type":"TINYINT(1)","nullable":false,"primary_key":false},{"name":"version","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"title","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"content","type":"LONGTEXT","nullable":false,"primary_key":false},{"name":"language_code","type":"CHAR(2)","nullable":false,"primary_key":false},{"name":"required","type":"TINYINT(1)","nullable":false,"primary_key":false},{"name":"status","type":"ENUM('active','archived')","nullable":false,"primary_key":false},{"name":"created_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"updated_at","type":"DATETIME","nullable":false,"primary_key":false},{"name":"agreement_id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":false},{"name":"agreement_version","type":"INT UNSIGNED","nullable":false,"primary_key":false},{"name":"customer_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"email","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"order_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"order_item_id","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"ip_address","type":"VARCHAR(45)","nullable":true,"primary_key":false},{"name":"user_agent","type":"VARCHAR(255)","nullable":true,"primary_key":false},{"name":"accepted_content_hash","type":"CHAR(64)","nullable":false,"primary_key":false},{"name":"accepted_at","type":"DATETIME","nullable":false,"primary_key":false}],"plugin":{"slug":"titancart-lite","name":"TitanCart Lite","active_installs":0,"version":"0.2.16","wp_org_url":"https://wordpress.org/plugins/titancart-lite/"}}