wp_ksgc_templates

Static

Stores ksgc templates data created by this plugin.

Column Definitions

ColumnTypeNullable
🔑idbigint(20) unsignedNO
namevarchar(255)NO
pdf_file_idbigint(20) unsignedNO
expiry_monthsint(11)NO
trigger_statusvarchar(50)NO
field_mappingslongtextNO
created_atdatetimeNO
updated_atdatetimeNO
template_idbigint(20) unsignedNO
order_idbigint(20) unsignedNO
order_item_idbigint(20) unsignedNO
template_idbigint(20) unsignedNO
voucher_codevarchar(32)NO
pdf_pathvarchar(1000)NO
statusvarchar(20)NO
generated_atdatetimeNO

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