DROP TABLE IF EXISTS wflow_model_historys;
CREATE TABLE wflow_model_historys  (
       id bigserial NOT NULL,
       process_def_id varchar(40),
       form_id varchar(40) NOT NULL,
       form_name varchar(40) NOT NULL,
       version int4 NOT NULL DEFAULT 0,
       logo text,
       settings text,
       group_id int8,
       form_items text,
       process text,
       remark varchar(255),
       created timestamp NULL DEFAULT NULL,
       region_code varchar(50),
       process_type int4,
       node_map text,
       CONSTRAINT "wflow_model_historys_pri" PRIMARY KEY ("id")
);
CREATE UNIQUE INDEX form_id_uk  ON wflow_model_historys(form_id,version);