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 json NOT NULL,
       settings json NOT NULL,
       group_id int8 NOT NULL,
       form_items json NOT NULL,
       process json NOT NULL,
       remark varchar(255),
       created timestamp NULL DEFAULT NULL,
       CONSTRAINT "wflow_model_historys_pri" PRIMARY KEY ("id")
)
CREATE UNIQUE INDEX form_id_uk  ON wflow_model_historys(form_id,version);