wp_tc_downloadable_files

Static

Stores tc downloadable files data created by this plugin.

Column Definitions

ColumnTypeNullable
🔑idBIGINT UNSIGNEDNO
product_idBIGINT UNSIGNEDNO
variation_idBIGINT UNSIGNEDYES
filenameVARCHAR(255)NO
original_nameVARCHAR(255)NO
file_pathVARCHAR(512)NO
file_sizeBIGINT UNSIGNEDNO
mime_typeVARCHAR(128)NO
preview_pathVARCHAR(512)YES
readmeTEXTYES
positionINT UNSIGNEDNO
statusENUM('active','disabled')NO
created_atDATETIMENO
updated_atDATETIMENO
order_idBIGINT UNSIGNEDNO
order_item_idBIGINT UNSIGNEDNO
product_idBIGINT UNSIGNEDNO
file_idBIGINT UNSIGNEDNO
customer_idBIGINT UNSIGNEDYES
emailVARCHAR(255)NO
statusENUM('active','expired','revoked')NO
expires_atDATETIMEYES
download_countINT UNSIGNEDNO
max_downloadsINT UNSIGNEDYES
last_ipVARCHAR(45)YES
last_downloaded_atDATETIMEYES
created_atDATETIMENO
eventENUM('issued','downloaded','expired','revoked','failed_auth','failed_quota')NO
ip_addressVARCHAR(45)YES
user_agentVARCHAR(255)YES
bytes_servedBIGINT UNSIGNEDNO
metaJSONYES
created_atDATETIMENO
product_idBIGINT UNSIGNEDYES
is_globalTINYINT(1)NO
versionINT UNSIGNEDNO
titleVARCHAR(255)NO
contentLONGTEXTNO
language_codeCHAR(2)NO
requiredTINYINT(1)NO
statusENUM('active','archived')NO
created_atDATETIMENO
updated_atDATETIMENO
agreement_idBIGINT UNSIGNEDNO
agreement_versionINT UNSIGNEDNO
customer_idBIGINT UNSIGNEDYES
emailVARCHAR(255)NO
order_idBIGINT UNSIGNEDYES
order_item_idBIGINT UNSIGNEDYES
ip_addressVARCHAR(45)YES
user_agentVARCHAR(255)YES
accepted_content_hashCHAR(64)NO
accepted_atDATETIMENO

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