File manager - Edit - /home/webapp69.cm.in.th/u69319090039/Shop39/database/migrations/20260813_update_reviews_table.sql
Back
-- Migration: Add order_item_id and status to reviews table and create review_images table ALTER TABLE reviews ADD COLUMN IF NOT EXISTS order_item_id INT UNSIGNED NULL AFTER order_id, ADD COLUMN IF NOT EXISTS status ENUM('pending', 'approved', 'rejected', 'hidden') DEFAULT 'approved' AFTER comment, ADD INDEX IF NOT EXISTS idx_order_item_id (order_item_id); CREATE TABLE IF NOT EXISTS review_images ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, review_id INT UNSIGNED NOT NULL, image_path VARCHAR(255) NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (review_id) REFERENCES reviews (id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.25 |
proxy
|
phpinfo
|
Settings