
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_REQUIRETYPE') 
 CREATE TABLE T_BD_REQUIRETYPE (
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FDEMANDOFFSET VARCHAR(30) DEFAULT ' ' NOT NULL,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FALLOWDROP CHAR(1) DEFAULT '0' NOT NULL,
FNUMBER NVARCHAR(80) DEFAULT ' ' NOT NULL,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FENABLE VARCHAR(30) DEFAULT ' ' NOT NULL,
FINDEPENDENTREQ CHAR(1) DEFAULT '0' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FSTATUS VARCHAR(30) DEFAULT ' ' NOT NULL,
FORDERINVOLVEDMRP CHAR(1) DEFAULT '0' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_REQUIRETYPE_INV') 
 CREATE TABLE T_BD_REQUIRETYPE_INV (
FBASEDATAID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FPKID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_REQUIRETYPE_L') 
 CREATE TABLE T_BD_REQUIRETYPE_L (
FID BIGINT DEFAULT 0 NOT NULL,
FPKID VARCHAR(36) DEFAULT ' ' NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_REQUIRETYPE_RANGE') 
 CREATE TABLE T_BD_REQUIRETYPE_RANGE (
FBASEDATAID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FPKID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_REQUIRETYPE_WAY') 
 CREATE TABLE T_BD_REQUIRETYPE_WAY (
FBASEDATAID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FPKID BIGINT DEFAULT 0 NOT NULL
);
