wp_litesurveys_surveys

Static

Stores litesurveys surveys data created by this plugin.

Column Definitions

ColumnTypeNullable
🔑idbigint(20)NO
namevarchar(100)NO
activetinyint(1)YES
submit_messagetextNO
targeting_settingsjsonYES
appearance_settingsjsonYES
created_attimestampYES
updated_attimestampYES
deleted_attimestampYES
survey_idbigint(20)NO
typevarchar(25)NO
contentvarchar(100)NO
answersjsonYES
created_attimestampYES
updated_attimestampYES
deleted_attimestampYES
🔑FOREIGNKEYNO
survey_idbigint(20)NO
pagevarchar(255)YES
created_attimestampYES
deleted_attimestampYES
🔑FOREIGNKEYNO
submission_idbigint(20)NO
question_idbigint(20)NO
contenttextNO
created_attimestampYES
deleted_attimestampYES
FOREIGNKEYYES
FOREIGNKEYYES

CREATE TABLE Statement

CREATE TABLE IF NOT EXISTS wp_litesurveys_surveys ( id bigint(20) NOT NULL AUTO_INCREMENT, name varchar(100) NOT NULL, active tinyint(1) DEFAULT 0, submit_message text NOT NULL, targeting_settings json DEFAULT NULL, appearance_settings json DEFAULT NULL, created_at timestamp DEFAULT CURRENT_TIMESTAMP, updated_at timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, deleted_at timestamp NULL DEFAULT NULL, PRIMARY KEY (id) ) $charset_collate;"; // Create questions table. $sql_questions = "CREATE TABLE IF NOT EXISTS wp_litesurveys_questions ( id bigint(20) NOT NULL AUTO_INCREMENT, survey_id bigint(20) NOT NULL, type varchar(25) NOT NULL, content varchar(100) NOT NULL, answers json DEFAULT NULL, created_at timestamp DEFAULT CURRENT_TIMESTAMP, updated_at timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, deleted_at timestamp NULL DEFAULT NULL, PRIMARY KEY (id), FOREIGN KEY (survey_id) REFERENCES wp_litesurveys_surveys(id) ON DELETE CASCADE ) $charset_collate;"; // Create submissions table. $sql_submissions = "CREATE TABLE IF NOT EXISTS wp_litesurveys_submissions ( id bigint(20) NOT NULL AUTO_INCREMENT, survey_id bigint(20) NOT NULL, page varchar(255) DEFAULT NULL, created_at timestamp DEFAULT CURRENT_TIMESTAMP, deleted_at timestamp NULL DEFAULT NULL, PRIMARY KEY (id), FOREIGN KEY (survey_id) REFERENCES wp_litesurveys_surveys(id) ON DELETE CASCADE ) $charset_collate;"; // Create responses table. $sql_responses = "CREATE TABLE IF NOT EXISTS wp_litesurveys_responses ( id bigint(20) NOT NULL AUTO_INCREMENT, submission_id bigint(20) NOT NULL, question_id bigint(20) NOT NULL, content text NOT NULL, created_at timestamp DEFAULT CURRENT_TIMESTAMP, deleted_at timestamp NULL DEFAULT NULL, PRIMARY KEY (id), FOREIGN KEY (submission_id) REFERENCES wp_litesurveys_submissions(id) ON DELETE CASCADE, FOREIGN KEY (question_id) REFERENCES wp_litesurveys_questions(id) ON DELETE CASCADE ) $charset_collate;"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $sql_surveys );

Safe to delete?

If you have uninstalled LiteSurveys, 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_litesurveys_surveys`;

Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.

Other tables from LiteSurveys