/**Begin D:\PDM_UPGRADE\PDM_UPGRADE\PDM1\BCM_table.sql **/


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BCM_ISEASMAP') 
 CREATE TABLE T_BCM_ISEASMAP (
FID BIGINT DEFAULT 0 NOT NULL,
FEASNAME VARCHAR(200) DEFAULT ' ' NOT NULL,
FMEMBERID BIGINT DEFAULT 0 NOT NULL,
FMEMBERNUMBER VARCHAR(200) DEFAULT ' ' NOT NULL,
FTMPNUMBER VARCHAR(200) DEFAULT ' ' NOT NULL,
FTMPNAME VARCHAR(200) DEFAULT ' ' NOT NULL,
FDIMENSION BIGINT DEFAULT 0 NOT NULL,
FDIMENSIONNUMBER VARCHAR(50) DEFAULT ' ' NOT NULL,
FPARENTID BIGINT DEFAULT 0 NOT NULL,
FPARENTNUMBER VARCHAR(200) DEFAULT ' ' NOT NULL
);

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ISEASMAP' AND KSQL_COL_NAME IN ('FMODELID')) 
 ALTER TABLE T_BCM_ISEASMAP ADD (FMODELID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ISEASMAP' AND KSQL_COL_NAME IN ('FMODIFYTIME')) 
 ALTER TABLE T_BCM_ISEASMAP ADD (FMODIFYTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ISEASMAP' AND KSQL_COL_NAME IN ('FMODIFIERID')) 
 ALTER TABLE T_BCM_ISEASMAP ADD (FMODIFIERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ISEASMAP' AND KSQL_COL_NAME IN ('FCREATETIME')) 
 ALTER TABLE T_BCM_ISEASMAP ADD (FCREATETIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BCM_ISEASMAP' AND KSQL_COL_NAME IN ('FCREATORID')) 
 ALTER TABLE T_BCM_ISEASMAP ADD (FCREATORID BIGINT DEFAULT 0 NOT NULL );

/**End D:\PDM_UPGRADE\PDM_UPGRADE\PDM1\BCM_table.sql **/
