wp_litesurveys_surveys
StaticStores litesurveys surveys data created by this plugin.
Column Definitions
| Column | Type | Nullable |
|---|---|---|
| 🔑id | bigint(20) | NO |
| name | varchar(100) | NO |
| active | tinyint(1) | YES |
| submit_message | text | NO |
| targeting_settings | json | YES |
| appearance_settings | json | YES |
| created_at | timestamp | YES |
| updated_at | timestamp | YES |
| deleted_at | timestamp | YES |
| survey_id | bigint(20) | NO |
| type | varchar(25) | NO |
| content | varchar(100) | NO |
| answers | json | YES |
| created_at | timestamp | YES |
| updated_at | timestamp | YES |
| deleted_at | timestamp | YES |
| 🔑FOREIGN | KEY | NO |
| survey_id | bigint(20) | NO |
| page | varchar(255) | YES |
| created_at | timestamp | YES |
| deleted_at | timestamp | YES |
| 🔑FOREIGN | KEY | NO |
| submission_id | bigint(20) | NO |
| question_id | bigint(20) | NO |
| content | text | NO |
| created_at | timestamp | YES |
| deleted_at | timestamp | YES |
| FOREIGN | KEY | YES |
| FOREIGN | KEY | YES |
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