
INSERT IGNORE INTO app_feature_policy (tab_id, visibility, message_type, message_content, min_tier, allow_override_for_developer_admin, updated_at) VALUES
('workerControlTab', 'show', 'none', NULL, 'trial', 1, NOW());
INSERT IGNORE INTO ftt_app_feature_policy (tab_id, visibility, message_type, message_content, min_tier, allow_override_for_developer_admin, updated_at) VALUES
('workerControlTab', 'show', 'none', NULL, 'trial', 1, NOW());
INSERT IGNORE INTO app_feature_policy (tab_id, visibility, message_type, message_content, min_tier, allow_override_for_developer_admin, updated_at) VALUES
('uiContractShellTab', 'hide', 'none', NULL, 'developer', 1, NOW()),
('uiContractFormsTab', 'hide', 'none', NULL, 'developer', 1, NOW()),
('uiContractDataTab',  'hide', 'none', NULL, 'developer', 1, NOW());
INSERT IGNORE INTO ftt_app_feature_policy (tab_id, visibility, message_type, message_content, min_tier, allow_override_for_developer_admin, updated_at) VALUES
('uiContractShellTab', 'hide', 'none', NULL, 'developer', 1, NOW()),
('uiContractFormsTab', 'hide', 'none', NULL, 'developer', 1, NOW()),
('uiContractDataTab',  'hide', 'none', NULL, 'developer', 1, NOW());

-- 3. E2E Results table (used by api/delete_all_e2e_results.php)
CREATE TABLE IF NOT EXISTS e2e_results (
    id INT AUTO_INCREMENT PRIMARY KEY,
    test_name VARCHAR(128) NOT NULL,
    status VARCHAR(16) NOT NULL,
    duration_ms INT DEFAULT 0,
    error_message TEXT,
    created_at DATETIME NOT NULL,
    INDEX idx_created (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS ftt_e2e_results (
    id INT AUTO_INCREMENT PRIMARY KEY,
    test_name VARCHAR(128) NOT NULL,
    status VARCHAR(16) NOT NULL,
    duration_ms INT DEFAULT 0,
    error_message TEXT,
    created_at DATETIME NOT NULL,
    INDEX idx_created (created_at)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
