IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_GBS_FLOWSCHEME')
 CREATE TABLE T_GBS_FLOWSCHEME (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FCONFIG VARCHAR(255) DEFAULT ' ' NOT NULL,
FCONFIG_TAG NCLOB,
FISPRESET CHAR(1) DEFAULT '0' NOT NULL
);

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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_GBS_FLOWNODE')
 CREATE TABLE T_GBS_FLOWNODE (
FID VARCHAR(60) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(50) DEFAULT ' ' NOT NULL,
FNODEID NVARCHAR(50) DEFAULT ' ' NOT NULL,
FFLOWSCHEMEID BIGINT DEFAULT 0 NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_GBS_FLOWNODE_L')
 CREATE TABLE T_GBS_FLOWNODE_L (
FID VARCHAR(60) DEFAULT ' ' NOT NULL,
FLOCALEID VARCHAR(10) DEFAULT ' ' NOT NULL,
FPKID VARCHAR(18) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(200) DEFAULT ' ' NOT NULL
);
