CREATE TABLE "axj_mate_change_h" (
  "def20" varchar(101) COLLATE "pg_catalog"."default",
  "def19" varchar(101) COLLATE "pg_catalog"."default",
  "def18" varchar(101) COLLATE "pg_catalog"."default",
  "def17" varchar(101) COLLATE "pg_catalog"."default",
  "def16" varchar(101) COLLATE "pg_catalog"."default",
  "def15" varchar(101) COLLATE "pg_catalog"."default",
  "def14" varchar(101) COLLATE "pg_catalog"."default",
  "def13" varchar(101) COLLATE "pg_catalog"."default",
  "def12" varchar(101) COLLATE "pg_catalog"."default",
  "def11" varchar(101) COLLATE "pg_catalog"."default",
  "def10" varchar(101) COLLATE "pg_catalog"."default",
  "def9" varchar(101) COLLATE "pg_catalog"."default",
  "def8" varchar(101) COLLATE "pg_catalog"."default",
  "def7" varchar(101) COLLATE "pg_catalog"."default",
  "def6" varchar(101) COLLATE "pg_catalog"."default",
  "def5" varchar(101) COLLATE "pg_catalog"."default",
  "def4" varchar(101) COLLATE "pg_catalog"."default",
  "def3" varchar(101) COLLATE "pg_catalog"."default",
  "def2" varchar(101) COLLATE "pg_catalog"."default",
  "def1" varchar(101) COLLATE "pg_catalog"."default",
  "srcbilltype" varchar(50) COLLATE "pg_catalog"."default",
  "srcbillid" varchar(50) COLLATE "pg_catalog"."default",
  "busitype" varchar(20) COLLATE "pg_catalog"."default",
  "billmaker" varchar(20) COLLATE "pg_catalog"."default",
  "emendenum" int4,
  "approvestatus" int2,
  "approvedate" char(19) COLLATE "pg_catalog"."default",
  "approver" varchar(20) COLLATE "pg_catalog"."default",
  "approvenote" varchar(50) COLLATE "pg_catalog"."default",
  "transtypepk" varchar(20) COLLATE "pg_catalog"."default",
  "transtype" varchar(50) COLLATE "pg_catalog"."default",
  "billtype" varchar(50) COLLATE "pg_catalog"."default",
  "billversionpk" varchar(50) COLLATE "pg_catalog"."default",
  "lastmaketime" char(19) COLLATE "pg_catalog"."default",
  "maketime" char(19) COLLATE "pg_catalog"."default",
  "pk_org_v" varchar(20) COLLATE "pg_catalog"."default",
  "modifiedtime" char(19) COLLATE "pg_catalog"."default",
  "modifier" varchar(20) COLLATE "pg_catalog"."default",
  "creationtime" char(19) COLLATE "pg_catalog"."default",
  "creator" varchar(20) COLLATE "pg_catalog"."default",
  "name" varchar(50) COLLATE "pg_catalog"."default",
  "code" varchar(50) COLLATE "pg_catalog"."default",
  "pk_group" varchar(20) COLLATE "pg_catalog"."default",
  "pk_org" varchar(20) COLLATE "pg_catalog"."default",
  "pk_mate_change_h" char(20) COLLATE "pg_catalog"."default" NOT NULL,
  "ts" char(19) COLLATE "pg_catalog"."default" DEFAULT to_char(CURRENT_TIMESTAMP, 'yyyy-mm-dd hh24:mi:ss'::text),
  "dr" int2,
  CONSTRAINT "axj_mate_change_h_pk" PRIMARY KEY ("pk_mate_change_h")
)
;



CREATE TABLE "axj_mate_change_b" (
  "def50" varchar(101) COLLATE "pg_catalog"."default",
  "def49" varchar(101) COLLATE "pg_catalog"."default",
  "def48" varchar(101) COLLATE "pg_catalog"."default",
  "def47" varchar(101) COLLATE "pg_catalog"."default",
  "def46" varchar(101) COLLATE "pg_catalog"."default",
  "def45" varchar(101) COLLATE "pg_catalog"."default",
  "def44" varchar(101) COLLATE "pg_catalog"."default",
  "def43" varchar(101) COLLATE "pg_catalog"."default",
  "def42" varchar(101) COLLATE "pg_catalog"."default",
  "def41" varchar(101) COLLATE "pg_catalog"."default",
  "def40" varchar(101) COLLATE "pg_catalog"."default",
  "def39" varchar(101) COLLATE "pg_catalog"."default",
  "def38" varchar(101) COLLATE "pg_catalog"."default",
  "def37" varchar(101) COLLATE "pg_catalog"."default",
  "def36" varchar(101) COLLATE "pg_catalog"."default",
  "def35" varchar(101) COLLATE "pg_catalog"."default",
  "def34" varchar(101) COLLATE "pg_catalog"."default",
  "def33" varchar(101) COLLATE "pg_catalog"."default",
  "def32" varchar(101) COLLATE "pg_catalog"."default",
  "def31" varchar(101) COLLATE "pg_catalog"."default",
  "def30" varchar(101) COLLATE "pg_catalog"."default",
  "def29" varchar(101) COLLATE "pg_catalog"."default",
  "def28" varchar(101) COLLATE "pg_catalog"."default",
  "def27" varchar(101) COLLATE "pg_catalog"."default",
  "def26" varchar(101) COLLATE "pg_catalog"."default",
  "def25" varchar(101) COLLATE "pg_catalog"."default",
  "def24" varchar(101) COLLATE "pg_catalog"."default",
  "def23" varchar(101) COLLATE "pg_catalog"."default",
  "def22" varchar(101) COLLATE "pg_catalog"."default",
  "def21" varchar(101) COLLATE "pg_catalog"."default",
  "def20" varchar(101) COLLATE "pg_catalog"."default",
  "def19" varchar(101) COLLATE "pg_catalog"."default",
  "def18" varchar(101) COLLATE "pg_catalog"."default",
  "def17" varchar(101) COLLATE "pg_catalog"."default",
  "def16" varchar(101) COLLATE "pg_catalog"."default",
  "def15" varchar(101) COLLATE "pg_catalog"."default",
  "def14" varchar(101) COLLATE "pg_catalog"."default",
  "def13" varchar(101) COLLATE "pg_catalog"."default",
  "def12" varchar(101) COLLATE "pg_catalog"."default",
  "def11" varchar(101) COLLATE "pg_catalog"."default",
  "def10" varchar(101) COLLATE "pg_catalog"."default",
  "def9" varchar(101) COLLATE "pg_catalog"."default",
  "def8" varchar(101) COLLATE "pg_catalog"."default",
  "def7" varchar(101) COLLATE "pg_catalog"."default",
  "def6" varchar(101) COLLATE "pg_catalog"."default",
  "def5" varchar(101) COLLATE "pg_catalog"."default",
  "def4" varchar(101) COLLATE "pg_catalog"."default",
  "def3" varchar(101) COLLATE "pg_catalog"."default",
  "def2" varchar(101) COLLATE "pg_catalog"."default",
  "def1" varchar(101) COLLATE "pg_catalog"."default",
  "enablestatereason" varchar(50) COLLATE "pg_catalog"."default",
  "enablestate" varchar(50) COLLATE "pg_catalog"."default",
  "pk_material" varchar(20) COLLATE "pg_catalog"."default",
  "pk_mattaxes" varchar(20) COLLATE "pg_catalog"."default",
  "pk_brand" varchar(20) COLLATE "pg_catalog"."default",
  "scalefactor" varchar(50) COLLATE "pg_catalog"."default",
  "pk_measdoc" varchar(20) COLLATE "pg_catalog"."default",
  "materialtype" varchar(50) COLLATE "pg_catalog"."default",
  "materialspec" varchar(50) COLLATE "pg_catalog"."default",
  "name" varchar(50) COLLATE "pg_catalog"."default",
  "srcrowno" varchar(50) COLLATE "pg_catalog"."default",
  "rowno" varchar(50) COLLATE "pg_catalog"."default",
  "pk_mate_change_b" char(20) COLLATE "pg_catalog"."default" NOT NULL,
  "pk_mate_change_h" char(20) COLLATE "pg_catalog"."default" NOT NULL,
  "ts" char(19) COLLATE "pg_catalog"."default" DEFAULT to_char(CURRENT_TIMESTAMP, 'yyyy-mm-dd hh24:mi:ss'::text),
  "dr" int2,
  CONSTRAINT "axj_mate_change_b_pk" PRIMARY KEY ("pk_mate_change_b")
)
;



CREATE INDEX "i_axj_mate_change_b_1" ON "axj_mate_change_b" USING btree (
  "pk_mate_change_h" COLLATE "pg_catalog"."default" "pg_catalog"."bpchar_ops" ASC NULLS LAST
);