wp_tutor_carts
StaticStores tutor carts data created by this plugin.
Column Definitions
| Column | Type | Nullable |
|---|---|---|
| 🔑id | BIGINT(20) UNSIGNED | NO |
| user_id | BIGINT(20) UNSIGNED | YES |
| coupon_code | VARCHAR(50) | YES |
| created_at_gmt | DATETIME | NO |
| updated_at_gmt | DATETIME | YES |
| cart_id | BIGINT(20) UNSIGNED | NO |
| course_id | BIGINT(20) UNSIGNED | NO |
| user_id | BIGINT(20) UNSIGNED | YES |
| billing_first_name | VARCHAR(255) | NO |
| billing_last_name | VARCHAR(255) | NO |
| billing_email | VARCHAR(255) | NO |
| billing_phone | VARCHAR(20) | NO |
| billing_zip_code | VARCHAR(20) | NO |
| billing_address | TEXT | NO |
| billing_country | VARCHAR(100) | NO |
| billing_state | VARCHAR(100) | NO |
| billing_city | VARCHAR(100) | NO |
CREATE TABLE Statement
CREATE TABLE wp_tutor_carts ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT(20) UNSIGNED DEFAULT NULL, coupon_code VARCHAR(50) DEFAULT NULL, created_at_gmt DATETIME NOT NULL, updated_at_gmt DATETIME, PRIMARY KEY (id), KEY user_id (user_id), KEY coupon_code (coupon_code), CONSTRAINT fk_tutor_cart_user_id FOREIGN KEY (user_id) REFERENCES wp_users(ID) ON DELETE CASCADE ) $charset_collate;"; $cart_items_table = "CREATE TABLE wp_tutor_cart_items ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, cart_id BIGINT(20) UNSIGNED NOT NULL, course_id BIGINT(20) UNSIGNED NOT NULL, PRIMARY KEY (id), KEY cart_id (cart_id), KEY course_id (course_id), CONSTRAINT fk_tutor_cart_item_cart_id FOREIGN KEY (cart_id) REFERENCES wp_tutor_carts(id) ON DELETE CASCADE, CONSTRAINT fk_tutor_cart_item_course_id FOREIGN KEY (course_id) REFERENCES wp_posts(ID) ON DELETE CASCADE ) $charset_collate;"; $customer_table = "CREATE TABLE wp_tutor_customers ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, user_id BIGINT(20) UNSIGNED DEFAULT NULL, billing_first_name VARCHAR(255) NOT NULL, billing_last_name VARCHAR(255) NOT NULL, billing_email VARCHAR(255) NOT NULL, billing_phone VARCHAR(20) NOT NULL, billing_zip_code VARCHAR(20) NOT NULL, billing_address TEXT NOT NULL, billing_country VARCHAR(100) NOT NULL, billing_state VARCHAR(100) NOT NULL, billing_city VARCHAR(100) NOT NULL, PRIMARY KEY (id), KEY user_id (user_id), KEY billing_email (billing_email) ) $charset_collate;"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $quiz_attempts_sql );
Safe to delete?
If you have uninstalled Tutor LMS – eLearning and online course solution, 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_tutor_carts`;
Run this query using phpMyAdmin, Adminer, or your MySQL client. Back up first.
Other tables from Tutor LMS – eLearning and online course solution