wp_tc_downloadable_files
StaticStores tc downloadable files data created by this plugin.
Column Definitions
| Column | Type | Nullable |
|---|---|---|
| 🔑id | BIGINT UNSIGNED | NO |
| product_id | BIGINT UNSIGNED | NO |
| variation_id | BIGINT UNSIGNED | YES |
| filename | VARCHAR(255) | NO |
| original_name | VARCHAR(255) | NO |
| file_path | VARCHAR(512) | NO |
| file_size | BIGINT UNSIGNED | NO |
| mime_type | VARCHAR(128) | NO |
| preview_path | VARCHAR(512) | YES |
| readme | TEXT | YES |
| position | INT UNSIGNED | NO |
| status | ENUM('active','disabled') | NO |
| created_at | DATETIME | NO |
| updated_at | DATETIME | NO |
| order_id | BIGINT UNSIGNED | NO |
| order_item_id | BIGINT UNSIGNED | NO |
| product_id | BIGINT UNSIGNED | NO |
| file_id | BIGINT UNSIGNED | NO |
| customer_id | BIGINT UNSIGNED | YES |
| VARCHAR(255) | NO | |
| status | ENUM('active','expired','revoked') | NO |
| expires_at | DATETIME | YES |
| download_count | INT UNSIGNED | NO |
| max_downloads | INT UNSIGNED | YES |
| last_ip | VARCHAR(45) | YES |
| last_downloaded_at | DATETIME | YES |
| created_at | DATETIME | NO |
| event | ENUM('issued','downloaded','expired','revoked','failed_auth','failed_quota') | NO |
| ip_address | VARCHAR(45) | YES |
| user_agent | VARCHAR(255) | YES |
| bytes_served | BIGINT UNSIGNED | NO |
| meta | JSON | YES |
| created_at | DATETIME | NO |
| product_id | BIGINT UNSIGNED | YES |
| is_global | TINYINT(1) | NO |
| version | INT UNSIGNED | NO |
| title | VARCHAR(255) | NO |
| content | LONGTEXT | NO |
| language_code | CHAR(2) | NO |
| required | TINYINT(1) | NO |
| status | ENUM('active','archived') | NO |
| created_at | DATETIME | NO |
| updated_at | DATETIME | NO |
| agreement_id | BIGINT UNSIGNED | NO |
| agreement_version | INT UNSIGNED | NO |
| customer_id | BIGINT UNSIGNED | YES |
| VARCHAR(255) | NO | |
| order_id | BIGINT UNSIGNED | YES |
| order_item_id | BIGINT UNSIGNED | YES |
| ip_address | VARCHAR(45) | YES |
| user_agent | VARCHAR(255) | YES |
| accepted_content_hash | CHAR(64) | NO |
| accepted_at | DATETIME | NO |
CREATE TABLE Statement
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 ) );Safe to delete?
If you have uninstalled TitanCart Lite, this table is generally safe to remove. However, always back up your database first.
Note: Some plugins share tables or are dependencies of other plugins. Verify nothing else depends on this table before dropping it.
How to remove this table
DROP TABLE IF EXISTS `wp_tc_downloadable_files`;
Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.
Other tables from TitanCart Lite