/**Begin D:\PDM_UPGRADE\PDM1\HOM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HOM_ONBRDBILL_B')
 CREATE TABLE T_HOM_ONBRDBILL_B (
FID BIGINT DEFAULT 0 NOT NULL,
FPREINSID BIGINT DEFAULT 0 NOT NULL,
FCHECKININSID BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_COLLECT' AND KSQL_COL_NAME ='FCOLLECTINSID')
 ALTER TABLE T_HOM_COLLECT ADD (FCOLLECTINSID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_COLLECT' AND KSQL_COL_NAME ='FAPPROVEINSID')
 ALTER TABLE T_HOM_COLLECT ADD (FAPPROVEINSID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_COLLECT' AND KSQL_COL_NAME ='FACCTEPTINSID')
 ALTER TABLE T_HOM_COLLECT ADD (FACCTEPTINSID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_ONBRDINVITE' AND KSQL_COL_NAME ='FINVITEINSID')
 ALTER TABLE T_HOM_ONBRDINVITE ADD (FINVITEINSID BIGINT DEFAULT 0 NOT NULL );

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