feat: common code group management (separate table + CRUD)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
CREATE SEQUENCE seq_system_config INCREMENT BY 50;
|
||||
|
||||
CREATE TABLE tb_system_config (
|
||||
config_id BIGSERIAL PRIMARY KEY,
|
||||
config_key VARCHAR(100) NOT NULL UNIQUE,
|
||||
@@ -19,3 +21,5 @@ INSERT INTO tb_system_config (config_key, config_value, description) VALUES
|
||||
('notification_slack_enabled', 'false', 'Slack 알림 활성화'),
|
||||
('notification_email_enabled', 'false', 'Email 알림 활성화'),
|
||||
('file_upload_max_size', '10485760', '파일 업로드 최대 크기 (bytes)');
|
||||
|
||||
CREATE SEQUENCE seq_system_config INCREMENT BY 50;
|
||||
@@ -0,0 +1,17 @@
|
||||
CREATE SEQUENCE sq_common_code_groups INCREMENT BY 50;
|
||||
|
||||
CREATE TABLE tb_common_code_group (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
group_code VARCHAR(50) NOT NULL UNIQUE,
|
||||
group_name VARCHAR(255) NOT NULL,
|
||||
description VARCHAR(500),
|
||||
sort_order INTEGER DEFAULT 0,
|
||||
created_at TIMESTAMP,
|
||||
updated_at TIMESTAMP,
|
||||
is_deleted CHAR(1) DEFAULT 'N'
|
||||
);
|
||||
|
||||
INSERT INTO tb_common_code_group (group_code, group_name, sort_order)
|
||||
SELECT DISTINCT group_code, group_code, 0
|
||||
FROM tb_common_code
|
||||
WHERE is_deleted = 'N';
|
||||
Reference in New Issue
Block a user