Files
shz-backend/sql/migration_add_job_nature.sql

30 lines
831 B
PL/PgSQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 岗位性质后台可选、PC 岗位卡片返回的业务字典字段。
-- 岗位性质非必填;字典项由后台“业务字典”维护。
BEGIN;
ALTER TABLE "shz"."job"
ADD COLUMN IF NOT EXISTS "job_nature" VARCHAR(100);
COMMENT ON COLUMN "shz"."job"."job_nature"
IS '岗位性质,对应业务字典 job_nature非必填';
INSERT INTO "shz"."bussiness_dict_type" (
"dict_id", "dict_name", "dict_type", "status", "create_by", "create_time", "remark"
)
SELECT
(SELECT COALESCE(MAX("dict_id"), 0) + 1 FROM "shz"."bussiness_dict_type"),
'岗位性质',
'job_nature',
'0',
'system',
CURRENT_TIMESTAMP,
'岗位管理使用,字典项由业务字典维护'
WHERE NOT EXISTS (
SELECT 1
FROM "shz"."bussiness_dict_type"
WHERE "dict_type" = 'job_nature'
);
COMMIT;