feat(page-data): complete Phase 4-5, ops UI, and publish integration
Add visitor roles, row-level scope, owner ops APIs, MySQL policy index, Turnstile captcha, browser client SDK, publish-panel dataset binding, acceptance tests, and usage documentation. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -834,6 +834,19 @@ export async function migrateSchema(pool) {
|
||||
AND c.category_code IN ('public', 'oa')`,
|
||||
);
|
||||
|
||||
await pool.query(`
|
||||
CREATE TABLE IF NOT EXISTS h5_page_data_policy_index (
|
||||
page_id CHAR(36) PRIMARY KEY,
|
||||
owner_user_id CHAR(36) NOT NULL,
|
||||
access_mode VARCHAR(32) NOT NULL,
|
||||
dataset_count INT UNSIGNED NOT NULL DEFAULT 0,
|
||||
scope_hash CHAR(16) NOT NULL,
|
||||
updated_at BIGINT NOT NULL,
|
||||
KEY idx_h5_page_data_policy_owner (owner_user_id, updated_at),
|
||||
CONSTRAINT fk_h5_page_data_policy_owner FOREIGN KEY (owner_user_id) REFERENCES h5_users(id) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
|
||||
`);
|
||||
|
||||
await pool.query(`
|
||||
CREATE TABLE IF NOT EXISTS h5_user_feedback (
|
||||
id CHAR(36) PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user