局长信箱-后台服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

29 lines
728 B

ALTER TABLE "mailbox"."mail_label"
ADD COLUMN "sort" int;
CREATE TABLE "mailbox"."mail_extension" (
"id" varchar(40) NOT NULL,
"mail_id" varchar(40) NOT NULL,
"days" int2,
"extension_reason" text,
"create_time" datatime,
CONSTRAINT "mail_extension_pkey" PRIMARY KEY ("id")
);
COMMENT ON COLUMN "mailbox"."mail_extension"."days" IS '延期天数';
COMMENT ON COLUMN "mailbox"."mail_extension"."extension_reason" IS '延期理由';
COMMENT ON TABLE "mailbox"."mail_extension" IS '信件延期';
INSERT INTO mail_extension ( ID, mail_id, days, extension_reason )
SELECT
extension_request_id,
ID,
extension_days,
extension_reason
FROM
mail
WHERE
extension_state = 'applying'