CREATE TABLE IF NOT EXISTS menu_versions (
    id INT AUTO_INCREMENT PRIMARY KEY,
    location_id INT NOT NULL,
    version_name VARCHAR(255) NOT NULL,
    description TEXT,
    json_data LONGTEXT NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    created_by VARCHAR(100),
    FOREIGN KEY (location_id) REFERENCES locations(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
