postgres 主键通过序列来实现增长,
没有像mysql那样直接指定主键自增的auto_increment关键字
CREATE SEQUENCE process_order_id_seq START 1;
CREATE TABLE "process_order" (
"id" int4 NOT NULL DEFAULT nextval('process_order_id_seq'::regclass),
"global_id" varchar(64) COLLATE "pg_catalog"."default" NOT NULL,
"site_code" varchar(40) COLLATE "pg_catalog"."default" NOT NULL,
"factory_code" varchar(40) COLLATE "pg_catalog"."default",
"order_id" varchar(50) NOT NULL ,
"process_type" varchar(50) NOT NULL ,
"del_flag" int2 NOT NULL DEFAULT 0,
"create_by" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
"create_time" timestamptz(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
"update_by" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
"update_time" timestamptz(6) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "process_order_pk_id" PRIMARY KEY ("id")
)