feat(ECR-035): ExploreConfig StarConfig 只读并 Closed
StarConfig catalog (000036) · Loop continuous.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
DELETE FROM admin_role_permissions WHERE code = 'admin.explore.read';
|
||||
DROP TABLE IF EXISTS star_configs;
|
||||
@@ -0,0 +1,23 @@
|
||||
-- ECR-035 StarConfig (read catalog)
|
||||
|
||||
CREATE TABLE IF NOT EXISTS star_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_star_configs_active ON star_configs(active);
|
||||
|
||||
INSERT INTO star_configs(code, title, active, system)
|
||||
VALUES ('default_star', '默认星座配置', true, true)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
|
||||
INSERT INTO admin_role_permissions(role_id, code)
|
||||
SELECT r.id, 'admin.explore.read'
|
||||
FROM admin_roles r
|
||||
WHERE r.name = 'super_admin'
|
||||
ON CONFLICT DO NOTHING;
|
||||
Reference in New Issue
Block a user