将 015–023 双文件冲突线性化为 015–050;提供已有库 schema_migrations 修复脚本;admin Playwright 对齐 /psy/admin/ 预览路径。 Co-authored-by: Cursor <cursoragent@cursor.com>
18 lines
610 B
SQL
18 lines
610 B
SQL
-- ECR-036 RhythmConfig (read catalog)
|
|
|
|
CREATE TABLE IF NOT EXISTS rhythm_configs (
|
|
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_rhythm_configs_active ON rhythm_configs(active);
|
|
|
|
INSERT INTO rhythm_configs(code, title, active, system)
|
|
VALUES ('default_rhythm', '默认节律配置', true, true)
|
|
ON CONFLICT (code) DO NOTHING;
|