-- -----------------------------------
-- 修改应用表的授权集合
-- -----------------------------------
UPDATE "BLADEX"."BLADE_CLIENT" SET AUTHORIZED_GRANT_TYPES = 'authorization_code,password,refresh_token,captcha,social,sms_code,register' where ID < 1123598811738675205;

-- -----------------------------------
-- 各表增加状态和是否已删除字段
-- -----------------------------------
ALTER TABLE "BLADEX"."BLADE_USER_APP" ADD "STATUS" INT DEFAULT 1;
ALTER TABLE "BLADEX"."BLADE_USER_APP" ADD "IS_DELETED" INT DEFAULT 0;
COMMENT ON COLUMN "BLADEX"."BLADE_USER_APP"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_APP"."IS_DELETED" IS '是否已删除';

ALTER TABLE "BLADEX"."BLADE_USER_WEB" ADD "STATUS" INT DEFAULT 1;
ALTER TABLE "BLADEX"."BLADE_USER_WEB" ADD "IS_DELETED" INT DEFAULT 0;
COMMENT ON COLUMN "BLADEX"."BLADE_USER_WEB"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_WEB"."IS_DELETED" IS '是否已删除';

ALTER TABLE "BLADEX"."BLADE_USER_OTHER" ADD "STATUS" INT DEFAULT 1;
ALTER TABLE "BLADEX"."BLADE_USER_OTHER" ADD "IS_DELETED" INT DEFAULT 0;
COMMENT ON COLUMN "BLADEX"."BLADE_USER_OTHER"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_OTHER"."IS_DELETED" IS '是否已删除';

ALTER TABLE "BLADEX"."BLADE_USER_DEPT" ADD "STATUS" INT DEFAULT 1;
ALTER TABLE "BLADEX"."BLADE_USER_DEPT" ADD "IS_DELETED" INT DEFAULT 0;
COMMENT ON COLUMN "BLADEX"."BLADE_USER_DEPT"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_DEPT"."IS_DELETED" IS '是否已删除';

ALTER TABLE "BLADEX"."BLADE_USER_OAUTH" ADD "STATUS" INT DEFAULT 1;
ALTER TABLE "BLADEX"."BLADE_USER_OAUTH" ADD "IS_DELETED" INT DEFAULT 0;
COMMENT ON COLUMN "BLADEX"."BLADE_USER_OAUTH"."STATUS" IS '状态';
COMMENT ON COLUMN "BLADEX"."BLADE_USER_OAUTH"."IS_DELETED" IS '是否已删除';

ALTER TABLE "BLADEX"."BLADE_ROLE" ADD "STATUS" INT DEFAULT 1;
COMMENT ON COLUMN "BLADEX"."BLADE_ROLE"."STATUS" IS '状态';

ALTER TABLE "BLADEX"."BLADE_DEPT" ADD "STATUS" INT DEFAULT 1;
COMMENT ON COLUMN "BLADEX"."BLADE_DEPT"."STATUS" IS '状态';

ALTER TABLE "BLADEX"."BLADE_DICT" ADD "STATUS" INT DEFAULT 1;
COMMENT ON COLUMN "BLADEX"."BLADE_DICT"."STATUS" IS '状态';

ALTER TABLE "BLADEX"."BLADE_DICT_BIZ" ADD "STATUS" INT DEFAULT 1;
COMMENT ON COLUMN "BLADEX"."BLADE_DICT_BIZ"."STATUS" IS '状态';
