feat(ECR-039): GrowthInsights FunnelDefinition 只读并 Closed

FunnelDefinition catalog (000040) · Loop continuous.
This commit is contained in:
jackyu66git
2026-08-08 03:17:12 +08:00
parent 63742c1d66
commit e955f1e6a2
25 changed files with 455 additions and 1 deletions
@@ -0,0 +1 @@
DROP TABLE IF EXISTS funnel_definitions;
@@ -0,0 +1,17 @@
-- ECR-039 FunnelDefinition (read catalog)
CREATE TABLE IF NOT EXISTS funnel_definitions (
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
code varchar(64) NOT NULL UNIQUE,
title varchar(128) NOT NULL,
active boolean NOT NULL DEFAULT true,
system boolean NOT NULL DEFAULT false,
created_at timestamptz NOT NULL DEFAULT now(),
updated_at timestamptz NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_funnel_definitions_active ON funnel_definitions(active);
INSERT INTO funnel_definitions(code, title, active, system)
VALUES ('signup_to_ask', '注册到问答漏斗占位', true, true)
ON CONFLICT (code) DO NOTHING;