{"slug":"tutor","name":"Tutor LMS – eLearning and online course solution","description":"A complete WordPress LMS plugin to create any eLearning website easily.","author":"Themeum","active_installs":100000,"version":"3.9.9","wp_org_url":"https://wordpress.org/plugins/tutor/","is_closed":false,"cleanup":{"has_uninstall_hook":true,"drops_tables_on_uninstall":false,"deletes_options_on_uninstall":false},"tables":[{"table_name":"tutor_cart_items","full_table_name":"wp_tutor_cart_items","description":"Stores tutor cart items data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_carts","full_table_name":"wp_tutor_carts","description":"Stores tutor carts data created by this plugin.","detection_method":"static","confidence":"medium","columns":[],"create_sql":null},{"table_name":"tutor_coupon_applications","full_table_name":"wp_tutor_coupon_applications","description":"Stores tutor coupon applications data created by this plugin.","detection_method":"static","confidence":"medium","columns":[],"create_sql":null},{"table_name":"tutor_coupon_usages","full_table_name":"wp_tutor_coupon_usages","description":"Stores tutor coupon usages data created by this plugin.","detection_method":"static","confidence":"medium","columns":[],"create_sql":null},{"table_name":"tutor_coupons","full_table_name":"wp_tutor_coupons","description":"Stores tutor coupons data created by this plugin.","detection_method":"static","confidence":"medium","columns":[],"create_sql":null},{"table_name":"tutor_customers","full_table_name":"wp_tutor_customers","description":"Stores tutor customers data created by this plugin.","detection_method":"static","confidence":"medium","columns":[],"create_sql":null},{"table_name":"tutor_earnings","full_table_name":"wp_tutor_earnings","description":"Stores tutor earnings data created by this plugin.","detection_method":"static","confidence":"high","columns":[{"name":"earning_id","type":"bigint(20)","nullable":false,"primary_key":true},{"name":"user_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"course_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"order_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"order_status","type":"varchar(50)","nullable":true,"primary_key":false},{"name":"course_price_total","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"course_price_grand_total","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"instructor_amount","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"instructor_rate","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"admin_amount","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"admin_rate","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"commission_type","type":"varchar(20)","nullable":true,"primary_key":false},{"name":"deduct_fees_amount","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"deduct_fees_name","type":"varchar(250)","nullable":true,"primary_key":false},{"name":"deduct_fees_type","type":"varchar(20)","nullable":true,"primary_key":false},{"name":"process_by","type":"varchar(20)","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":true,"primary_key":false},{"name":"user_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"amount","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"method_data","type":"text","nullable":true,"primary_key":false},{"name":"status","type":"varchar(50)","nullable":true,"primary_key":false},{"name":"updated_at","type":"datetime","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE IF NOT EXISTS wp_tutor_earnings ( earning_id bigint(20) NOT NULL AUTO_INCREMENT, user_id bigint(20) DEFAULT NULL, course_id bigint(20) DEFAULT NULL, order_id bigint(20) DEFAULT NULL, order_status varchar(50) DEFAULT NULL, course_price_total decimal(16,2) DEFAULT NULL, course_price_grand_total decimal(16,2) DEFAULT NULL, instructor_amount decimal(16,2) DEFAULT NULL, instructor_rate decimal(16,2) DEFAULT NULL, admin_amount decimal(16,2) DEFAULT NULL, admin_rate decimal(16,2) DEFAULT NULL, commission_type varchar(20) DEFAULT NULL, deduct_fees_amount decimal(16,2) DEFAULT NULL, deduct_fees_name varchar(250) DEFAULT NULL, deduct_fees_type varchar(20) DEFAULT NULL, process_by varchar(20) DEFAULT NULL, created_at datetime DEFAULT NULL, PRIMARY KEY (earning_id) ) $charset_collate;\"; $withdraw_table = \"CREATE TABLE IF NOT EXISTS wp_tutor_withdraws ( withdraw_id bigint(20) NOT NULL AUTO_INCREMENT, user_id bigint(20) DEFAULT NULL, amount decimal(16,2) DEFAULT NULL, method_data text DEFAULT NULL, status varchar(50) DEFAULT NULL, updated_at datetime DEFAULT NULL, created_at datetime DEFAULT NULL, PRIMARY KEY (withdraw_id) ) $charset_collate;\"; require_once ABSPATH . 'wp-admin/includes/upgrade.php'; dbDelta( $earning_table );"},{"table_name":"tutor_email_queue","full_table_name":"wp_tutor_email_queue","description":"A job queue table for managing background tasks and scheduled operations.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_gradebooks","full_table_name":"wp_tutor_gradebooks","description":"Stores tutor gradebooks data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_gradebooks_results","full_table_name":"wp_tutor_gradebooks_results","description":"Stores tutor gradebooks results data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_order_itemmeta","full_table_name":"wp_tutor_order_itemmeta","description":"Stores order records and related transaction data.","detection_method":"static","confidence":"high","columns":[{"name":"id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":true},{"name":"item_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"meta_key","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"meta_value","type":"LONGTEXT","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE wp_tutor_order_itemmeta ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, item_id BIGINT(20) UNSIGNED NOT NULL, meta_key VARCHAR(255) NOT NULL, meta_value LONGTEXT NOT NULL, PRIMARY KEY (id), KEY item_id (item_id), KEY meta_key (meta_key), CONSTRAINT fk_tutor_itemmeta FOREIGN KEY (item_id) REFERENCES wp_tutor_order_items(id) ON DELETE CASCADE ) $charset_collate;\"; dbDelta( $item_meta_table );"},{"table_name":"tutor_order_items","full_table_name":"wp_tutor_order_items","description":"Stores order records and related transaction data.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_ordermeta","full_table_name":"wp_tutor_ordermeta","description":"Stores order records and related transaction data.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_orders","full_table_name":"wp_tutor_orders","description":"Stores order records and related transaction data.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_quiz_attempt_answers","full_table_name":"wp_tutor_quiz_attempt_answers","description":"Stores tutor quiz attempt answers data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_quiz_attempts","full_table_name":"wp_tutor_quiz_attempts","description":"Stores tutor quiz attempts data created by this plugin.","detection_method":"static","confidence":"high","columns":[{"name":"attempt_id","type":"bigint(20)","nullable":false,"primary_key":true},{"name":"course_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"quiz_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"user_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"total_questions","type":"int(11)","nullable":true,"primary_key":false},{"name":"total_answered_questions","type":"int(11)","nullable":true,"primary_key":false},{"name":"total_marks","type":"decimal(9,2)","nullable":true,"primary_key":false},{"name":"earned_marks","type":"decimal(9,2)","nullable":true,"primary_key":false},{"name":"attempt_info","type":"text","nullable":true,"primary_key":false},{"name":"attempt_status","type":"varchar(50)","nullable":true,"primary_key":false},{"name":"attempt_ip","type":"varchar(250)","nullable":true,"primary_key":false},{"name":"attempt_started_at","type":"datetime","nullable":true,"primary_key":false},{"name":"attempt_ended_at","type":"datetime","nullable":true,"primary_key":false},{"name":"is_manually_reviewed","type":"int(1)","nullable":true,"primary_key":false},{"name":"manually_reviewed_at","type":"datetime","nullable":true,"primary_key":false},{"name":"result","type":"varchar(10)","nullable":true,"primary_key":false},{"name":"user_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"quiz_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"question_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"quiz_attempt_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"given_answer","type":"longtext","nullable":true,"primary_key":false},{"name":"question_mark","type":"decimal(8,2)","nullable":true,"primary_key":false},{"name":"achieved_mark","type":"decimal(8,2)","nullable":true,"primary_key":false},{"name":"minus_mark","type":"decimal(8,2)","nullable":true,"primary_key":false},{"name":"is_correct","type":"tinyint(4)","nullable":true,"primary_key":false},{"name":"quiz_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"question_title","type":"text","nullable":true,"primary_key":false},{"name":"question_description","type":"longtext","nullable":true,"primary_key":false},{"name":"answer_explanation","type":"longtext","nullable":true,"primary_key":false},{"name":"question_type","type":"varchar(50)","nullable":true,"primary_key":false},{"name":"question_mark","type":"decimal(9,2)","nullable":true,"primary_key":false},{"name":"question_settings","type":"longtext","nullable":true,"primary_key":false},{"name":"question_order","type":"int(11)","nullable":true,"primary_key":false},{"name":"belongs_question_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"belongs_question_type","type":"varchar(250)","nullable":true,"primary_key":false},{"name":"answer_title","type":"text","nullable":true,"primary_key":false},{"name":"is_correct","type":"tinyint(4)","nullable":true,"primary_key":false},{"name":"image_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"answer_two_gap_match","type":"text","nullable":true,"primary_key":false},{"name":"answer_view_format","type":"varchar(250)","nullable":true,"primary_key":false},{"name":"answer_settings","type":"text","nullable":true,"primary_key":false},{"name":"answer_order","type":"int(11)","nullable":true,"primary_key":false},{"name":"user_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"course_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"order_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"order_status","type":"varchar(50)","nullable":true,"primary_key":false},{"name":"course_price_total","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"course_price_grand_total","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"instructor_amount","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"instructor_rate","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"admin_amount","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"admin_rate","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"commission_type","type":"varchar(20)","nullable":true,"primary_key":false},{"name":"deduct_fees_amount","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"deduct_fees_name","type":"varchar(250)","nullable":true,"primary_key":false},{"name":"deduct_fees_type","type":"varchar(20)","nullable":true,"primary_key":false},{"name":"process_by","type":"varchar(20)","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":true,"primary_key":false},{"name":"user_id","type":"bigint(20)","nullable":true,"primary_key":false},{"name":"amount","type":"decimal(16,2)","nullable":true,"primary_key":false},{"name":"method_data","type":"text","nullable":true,"primary_key":false},{"name":"status","type":"varchar(50)","nullable":true,"primary_key":false},{"name":"updated_at","type":"datetime","nullable":true,"primary_key":false},{"name":"created_at","type":"datetime","nullable":true,"primary_key":false},{"name":"parent_id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":false},{"name":"store","type":"subscription","nullable":true,"primary_key":false},{"name":"user_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"order_type","type":"VARCHAR(50)","nullable":false,"primary_key":false},{"name":"subscription","type":"order_status","nullable":false,"primary_key":false},{"name":"payment_status","type":"VARCHAR(50)","nullable":false,"primary_key":false},{"name":"subtotal_price","type":"DECIMAL(13, 2)","nullable":false,"primary_key":false},{"name":"tax_rate","type":"DECIMAL(13, 2)","nullable":true,"primary_key":false},{"name":"tax_amount","type":"DECIMAL(13, 2)","nullable":true,"primary_key":false},{"name":"total_price","type":"DECIMAL(13, 2)","nullable":false,"primary_key":false},{"name":"coupon_amount","type":"DECIMAL(13, 2)","nullable":true,"primary_key":false},{"name":"discount_type","type":"ENUM('percentage', 'flat')","nullable":true,"primary_key":false},{"name":"discount_amount","type":"DECIMAL(13, 2)","nullable":true,"primary_key":false},{"name":"discount_reason","type":"TEXT","nullable":true,"primary_key":false},{"name":"fees","type":"DECIMAL(13, 2)","nullable":true,"primary_key":false},{"name":"payment_payloads","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"note","type":"TEXT","nullable":true,"primary_key":false},{"name":"created_at_gmt","type":"DATETIME","nullable":false,"primary_key":false},{"name":"created_by","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"updated_at_gmt","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_by","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"order_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"meta_key","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"meta_value","type":"LONGTEXT","nullable":false,"primary_key":false},{"name":"created_at_gmt","type":"DATETIME","nullable":false,"primary_key":false},{"name":"created_by","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"updated_at_gmt","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_by","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"order_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"item_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"coupon_status","type":"VARCHAR(50)","nullable":true,"primary_key":false},{"name":"coupon_type","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"coupon_title","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"coupon_description","type":"TEXT","nullable":true,"primary_key":false},{"name":"discount_type","type":"ENUM('percentage', 'flat')","nullable":false,"primary_key":false},{"name":"discount_amount","type":"DECIMAL(13, 2)","nullable":false,"primary_key":false},{"name":"applies_to","type":"VARCHAR(100)","nullable":true,"primary_key":false},{"name":"specific_category","type":"total_usage_limit","nullable":true,"primary_key":false},{"name":"minimum_quantity","type":"purchase_requirement_value","nullable":true,"primary_key":false},{"name":"start_date_gmt","type":"DATETIME","nullable":false,"primary_key":false},{"name":"expire_date_gmt","type":"DATETIME","nullable":true,"primary_key":false},{"name":"created_at_gmt","type":"DATETIME","nullable":false,"primary_key":false},{"name":"created_by","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"updated_at_gmt","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_by","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"reference_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"coupon_code","type":"VARCHAR(50)","nullable":false,"primary_key":false},{"name":"user_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"user_id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":false},{"name":"coupon_code","type":"VARCHAR(50)","nullable":true,"primary_key":false},{"name":"created_at_gmt","type":"DATETIME","nullable":false,"primary_key":false},{"name":"updated_at_gmt","type":"DATETIME","nullable":true,"primary_key":false},{"name":"cart_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"course_id","type":"BIGINT(20) UNSIGNED","nullable":false,"primary_key":false},{"name":"user_id","type":"BIGINT(20) UNSIGNED","nullable":true,"primary_key":false},{"name":"billing_first_name","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"billing_last_name","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"billing_email","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"billing_phone","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"billing_zip_code","type":"VARCHAR(20)","nullable":false,"primary_key":false},{"name":"billing_address","type":"TEXT","nullable":false,"primary_key":false},{"name":"billing_country","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"billing_state","type":"VARCHAR(100)","nullable":false,"primary_key":false},{"name":"billing_city","type":"VARCHAR(100)","nullable":false,"primary_key":false}],"create_sql":"CREATE TABLE wp_tutor_quiz_attempts ( attempt_id bigint(20) NOT NULL AUTO_INCREMENT, course_id bigint(20) DEFAULT NULL, quiz_id bigint(20) DEFAULT NULL, user_id bigint(20) DEFAULT NULL, total_questions int(11) DEFAULT NULL, total_answered_questions int(11) DEFAULT NULL, total_marks decimal(9,2) DEFAULT NULL, earned_marks decimal(9,2) DEFAULT NULL, attempt_info text, attempt_status varchar(50) DEFAULT NULL, attempt_ip varchar(250) DEFAULT NULL, attempt_started_at datetime DEFAULT NULL, attempt_ended_at datetime DEFAULT NULL, is_manually_reviewed int(1) DEFAULT NULL, manually_reviewed_at datetime DEFAULT NULL, result varchar(10) DEFAULT NULL, PRIMARY KEY (attempt_id), INDEX (course_id), INDEX (quiz_id), INDEX (user_id), INDEX (result) ) $charset_collate;\"; $quiz_attempt_answers = \"CREATE TABLE wp_tutor_quiz_attempt_answers ( attempt_answer_id bigint(20) NOT NULL AUTO_INCREMENT, user_id bigint(20) DEFAULT NULL, quiz_id bigint(20) DEFAULT NULL, question_id bigint(20) DEFAULT NULL, quiz_attempt_id bigint(20) DEFAULT NULL, given_answer longtext, question_mark decimal(8,2) DEFAULT NULL, achieved_mark decimal(8,2) DEFAULT NULL, minus_mark decimal(8,2) DEFAULT NULL, is_correct tinyint(4) DEFAULT NULL, PRIMARY KEY (attempt_answer_id) ) $charset_collate;\"; $tutor_quiz_questions = \"CREATE TABLE wp_tutor_quiz_questions ( question_id bigint(20) NOT NULL AUTO_INCREMENT, quiz_id bigint(20) DEFAULT NULL, question_title text, question_description longtext, answer_explanation longtext DEFAULT '', question_type varchar(50) DEFAULT NULL, question_mark decimal(9,2) DEFAULT NULL, question_settings longtext, question_order int(11) DEFAULT NULL, PRIMARY KEY (question_id) ) $charset_collate;\"; $tutor_quiz_question_answers = \"CREATE TABLE wp_tutor_quiz_question_answers ( answer_id bigint(20) NOT NULL AUTO_INCREMENT, belongs_question_id bigint(20) DEFAULT NULL, belongs_question_type varchar(250) DEFAULT NULL, answer_title text, is_correct tinyint(4) DEFAULT NULL, image_id bigint(20) DEFAULT NULL, answer_two_gap_match text, answer_view_format varchar(250) DEFAULT NULL, answer_settings text, answer_order int(11) DEFAULT '0', PRIMARY KEY (answer_id) ) $charset_collate;\"; $earning_table = \"CREATE TABLE IF NOT EXISTS wp_tutor_earnings ( earning_id bigint(20) NOT NULL AUTO_INCREMENT, user_id bigint(20) DEFAULT NULL, course_id bigint(20) DEFAULT NULL, order_id bigint(20) DEFAULT NULL, order_status varchar(50) DEFAULT NULL, course_price_total decimal(16,2) DEFAULT NULL, course_price_grand_total decimal(16,2) DEFAULT NULL, instructor_amount decimal(16,2) DEFAULT NULL, instructor_rate decimal(16,2) DEFAULT NULL, admin_amount decimal(16,2) DEFAULT NULL, admin_rate decimal(16,2) DEFAULT NULL, commission_type varchar(20) DEFAULT NULL, deduct_fees_amount decimal(16,2) DEFAULT NULL, deduct_fees_name varchar(250) DEFAULT NULL, deduct_fees_type varchar(20) DEFAULT NULL, process_by varchar(20) DEFAULT NULL, created_at datetime DEFAULT NULL, PRIMARY KEY (earning_id), INDEX (user_id), INDEX (course_id), INDEX (order_id), INDEX (process_by) ) $charset_collate;\"; $withdraw_table = \"CREATE TABLE IF NOT EXISTS wp_tutor_withdraws ( withdraw_id bigint(20) NOT NULL AUTO_INCREMENT, user_id bigint(20) DEFAULT NULL, amount decimal(16,2) DEFAULT NULL, method_data text DEFAULT NULL, status varchar(50) DEFAULT NULL, updated_at datetime DEFAULT NULL, created_at datetime DEFAULT NULL, PRIMARY KEY (withdraw_id) ) $charset_collate;\"; $orders_table = \"CREATE TABLE wp_tutor_orders ( id BIGINT(20) UNSIGNED AUTO_INCREMENT, parent_id BIGINT(20) UNSIGNED DEFAULT 0, -- for subscription order, store subscription record id transaction_id VARCHAR(255) COMMENT 'Transaction id from payment gateway', user_id BIGINT(20) UNSIGNED NOT NULL, order_type VARCHAR(50) NOT NULL, -- single_order, subscription order_status VARCHAR(50) NOT NULL, payment_status VARCHAR(50) NOT NULL, subtotal_price DECIMAL(13, 2) NOT NULL, -- price calculation based on course sale price pre_tax_price DECIMAL(13, 2) NOT NULL, -- total price before adding tax tax_type VARCHAR(50), tax_rate DECIMAL(13, 2) COMMENT 'Tax percentage', tax_amount DECIMAL(13, 2), total_price DECIMAL(13, 2) NOT NULL, -- final price net_payment DECIMAL(13, 2) NOT NULL, -- calculated price if any refund is done else same as total_price coupon_code VARCHAR(255), coupon_amount DECIMAL(13, 2), discount_type ENUM('percentage', 'flat') DEFAULT NULL, discount_amount DECIMAL(13, 2), discount_reason TEXT, fees DECIMAL(13, 2), -- payment gateway fees earnings DECIMAL(13, 2), -- net earning refund_amount DECIMAL(13, 2), -- Refund amount payment_method VARCHAR(255), payment_payloads LONGTEXT, note TEXT, created_at_gmt DATETIME NOT NULL, created_by BIGINT(20) UNSIGNED NOT NULL, updated_at_gmt DATETIME, updated_by BIGINT(20) UNSIGNED NOT NULL, PRIMARY KEY (id), KEY user_id (user_id), KEY order_type (order_type), KEY payment_status (payment_status), KEY order_status (order_status), KEY transaction_id (transaction_id) ) $charset_collate;\"; $order_meta_table = \"CREATE TABLE wp_tutor_ordermeta ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, order_id BIGINT(20) UNSIGNED NOT NULL, meta_key VARCHAR(255) NOT NULL, meta_value LONGTEXT NOT NULL, created_at_gmt DATETIME NOT NULL, created_by BIGINT(20) UNSIGNED NOT NULL, updated_at_gmt DATETIME, updated_by BIGINT(20) UNSIGNED NOT NULL, PRIMARY KEY (id), KEY order_id (order_id), KEY meta_key (meta_key), CONSTRAINT fk_tutor_ordermeta_order_id FOREIGN KEY (order_id) REFERENCES wp_tutor_orders(id) ON DELETE CASCADE ) $charset_collate;\"; $order_items_table = \"CREATE TABLE wp_tutor_order_items ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, order_id BIGINT(20) UNSIGNED NOT NULL, item_id BIGINT(20) UNSIGNED NOT NULL, -- course id/plan id regular_price DECIMAL(13, 2) NOT NULL, -- course regular price sale_price VARCHAR(13) DEFAULT NULL, -- course sale price discount_price VARCHAR(13) DEFAULT NULL, -- course discount price coupon_code VARCHAR(255) DEFAULT NULL, -- coupon code PRIMARY KEY (id), KEY order_id (order_id), KEY item_id (item_id), CONSTRAINT fk_tutor_order_item_order_id FOREIGN KEY (order_id) REFERENCES wp_tutor_orders(id) ON DELETE CASCADE ) $charset_collate;\"; $coupons_table = \"CREATE TABLE wp_tutor_coupons ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, coupon_status VARCHAR(50), coupon_type VARCHAR(100) DEFAULT 'code', -- coupon type 'code' or 'automatic' coupon_code VARCHAR(50) NOT NULL, coupon_title VARCHAR(255) NOT NULL, coupon_description TEXT, discount_type ENUM('percentage', 'flat') NOT NULL, discount_amount DECIMAL(13, 2) NOT NULL, applies_to VARCHAR(100) DEFAULT 'all_courses_and_bundles', -- possible values 'all_courses_and_bundles', 'all_courses', 'all_bundles', 'specific_courses', 'specific_bundles', 'specific_category' total_usage_limit INT(10) UNSIGNED DEFAULT NULL, -- null for unlimited usage per_user_usage_limit TINYINT(4) UNSIGNED DEFAULT NULL, -- null for unlimited usage purchase_requirement VARCHAR(50) DEFAULT 'no_minimum', -- possible values 'no_minimum', 'minimum_purchase', 'minimum_quantity' purchase_requirement_value DECIMAL(13, 2), start_date_gmt DATETIME NOT NULL, expire_date_gmt DATETIME DEFAULT NULL, created_at_gmt DATETIME NOT NULL, created_by BIGINT(20) UNSIGNED NOT NULL, updated_at_gmt DATETIME, updated_by BIGINT(20) UNSIGNED NOT NULL, PRIMARY KEY (id), UNIQUE KEY coupon_code (coupon_code), KEY start_date_gmt (start_date_gmt), KEY expire_date_gmt (expire_date_gmt) ) $charset_collate;\"; $coupon_applications_table = \"CREATE TABLE wp_tutor_coupon_applications ( coupon_code VARCHAR(50) NOT NULL, reference_id BIGINT(20) UNSIGNED NOT NULL, KEY coupon_code (coupon_code), KEY reference_id (reference_id), CONSTRAINT fk_tutor_coupon_application_coupon_code FOREIGN KEY (coupon_code) REFERENCES wp_tutor_coupons(coupon_code) ON DELETE CASCADE ) $charset_collate;\"; $coupon_usage_table = \"CREATE TABLE wp_tutor_coupon_usages ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, coupon_code VARCHAR(50) NOT NULL, user_id BIGINT(20) UNSIGNED NOT NULL, PRIMARY KEY (id), KEY coupon_code (coupon_code), KEY user_id (user_id), CONSTRAINT fk_tutor_coupon_usage_coupon_code FOREIGN KEY (coupon_code) REFERENCES wp_tutor_coupons(coupon_code) ON DELETE CASCADE, CONSTRAINT fk_tutor_coupon_usage_user_id FOREIGN KEY (user_id) REFERENCES wp_users(ID) ON DELETE CASCADE ) $charset_collate;\"; $cart_table = \"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 );"},{"table_name":"tutor_quiz_question_answers","full_table_name":"wp_tutor_quiz_question_answers","description":"Stores tutor quiz question answers data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_quiz_questions","full_table_name":"wp_tutor_quiz_questions","description":"Stores tutor quiz questions data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_scheduler","full_table_name":"wp_tutor_scheduler","description":"Stores tutor scheduler data created by this plugin.","detection_method":"static","confidence":"high","columns":[{"name":"id","type":"BIGINT UNSIGNED","nullable":false,"primary_key":true},{"name":"type","type":"VARCHAR(50)","nullable":false,"primary_key":false},{"name":"reference_id","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"scheduled_at_gmt","type":"DATETIME","nullable":false,"primary_key":false},{"name":"status","type":"VARCHAR(255)","nullable":false,"primary_key":false},{"name":"payload","type":"LONGTEXT","nullable":true,"primary_key":false},{"name":"created_at_gmt","type":"DATETIME","nullable":true,"primary_key":false},{"name":"updated_at_gmt","type":"DATETIME","nullable":true,"primary_key":false},{"name":"scheduled_by","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false},{"name":"scheduled_for","type":"BIGINT UNSIGNED","nullable":true,"primary_key":false}],"create_sql":"CREATE TABLE wp_tutor_scheduler ( id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, type VARCHAR(50) NOT NULL COMMENT 'Type of schedule, e.g., gift, email, reminder', reference_id VARCHAR(255) NOT NULL COMMENT 'Unique reference id, token, etc', scheduled_at_gmt DATETIME NOT NULL COMMENT 'When the action should be executed', status VARCHAR(255) NOT NULL DEFAULT 'processing', payload LONGTEXT, created_at_gmt DATETIME, updated_at_gmt DATETIME, scheduled_by BIGINT UNSIGNED COMMENT 'User who scheduled the action', scheduled_for BIGINT UNSIGNED COMMENT 'Target user of the scheduled action', PRIMARY KEY (id), KEY idx_context_status (type, status), KEY idx_status (status), KEY idx_scheduled_at_gmt (scheduled_at_gmt) ) $charset_collate;\"; dbDelta( $table_schema );"},{"table_name":"tutor_subscription_plan_items","full_table_name":"wp_tutor_subscription_plan_items","description":"Stores tutor subscription plan items data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_subscription_plans","full_table_name":"wp_tutor_subscription_plans","description":"Stores tutor subscription plans data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_subscriptionmeta","full_table_name":"wp_tutor_subscriptionmeta","description":"Stores tutor subscriptionmeta data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_subscriptions","full_table_name":"wp_tutor_subscriptions","description":"Stores tutor subscriptions data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null},{"table_name":"tutor_withdraws","full_table_name":"wp_tutor_withdraws","description":"Stores tutor withdraws data created by this plugin.","detection_method":"static","confidence":"high","columns":[],"create_sql":null}],"table_count":24}