wp_ksgc_templates
StaticStores ksgc templates data created by this plugin.
Column Definitions
| Column | Type | Nullable |
|---|---|---|
| 🔑id | bigint(20) unsigned | NO |
| name | varchar(255) | NO |
| pdf_file_id | bigint(20) unsigned | NO |
| expiry_months | int(11) | NO |
| trigger_status | varchar(50) | NO |
| field_mappings | longtext | NO |
| created_at | datetime | NO |
| updated_at | datetime | NO |
| template_id | bigint(20) unsigned | NO |
| order_id | bigint(20) unsigned | NO |
| order_item_id | bigint(20) unsigned | NO |
| template_id | bigint(20) unsigned | NO |
| voucher_code | varchar(32) | NO |
| pdf_path | varchar(1000) | NO |
| status | varchar(20) | NO |
| generated_at | datetime | NO |
CREATE TABLE Statement
CREATE TABLE IF NOT EXISTS wp_ksgc_templates ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, pdf_file_id bigint(20) unsigned NOT NULL DEFAULT 0, expiry_months int(11) NOT NULL DEFAULT 12, trigger_status varchar(50) NOT NULL DEFAULT 'processing', field_mappings longtext NOT NULL DEFAULT '{}', created_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, updated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY pdf_file_id (pdf_file_id) ) $charset;"; $sql_associations = "CREATE TABLE IF NOT EXISTS wp_ksgc_associations ( product_id bigint(20) unsigned NOT NULL, template_id bigint(20) unsigned NOT NULL, PRIMARY KEY (product_id), KEY template_id (template_id) ) $charset;"; $sql_generated = "CREATE TABLE IF NOT EXISTS wp_ksgc_generated ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, order_id bigint(20) unsigned NOT NULL, order_item_id bigint(20) unsigned NOT NULL, template_id bigint(20) unsigned NOT NULL, voucher_code varchar(32) NOT NULL, pdf_path varchar(1000) NOT NULL, status varchar(20) NOT NULL DEFAULT 'generated', generated_at datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id), KEY order_id (order_id), KEY order_item_id (order_item_id), UNIQUE KEY voucher_code (voucher_code) ) $charset;"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $sql_templates );Safe to delete?
If you have uninstalled PDF Gift Cards for WooCommerce, 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_ksgc_templates`;
Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.
Other tables from PDF Gift Cards for WooCommerce