/**Begin D:\PDM_UPGRADE\PDM1\HOM_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_COLLECT' AND KSQL_COL_NAME ='FACCEPTCREATOR')
 ALTER TABLE T_HOM_COLLECT ADD (FACCEPTCREATOR BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_COLLECT' AND KSQL_COL_NAME ='FACCEPTCREATETIME')
 ALTER TABLE T_HOM_COLLECT ADD (FACCEPTCREATETIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_COLLECT' AND KSQL_COL_NAME ='FACCEPTMODIFIER')
 ALTER TABLE T_HOM_COLLECT ADD (FACCEPTMODIFIER BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_COLLECT' AND KSQL_COL_NAME ='FACCEPTMODIFYTIME')
 ALTER TABLE T_HOM_COLLECT ADD (FACCEPTMODIFYTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HOM_COLLECT' AND KSQL_COL_NAME ='FACCEPTSTATUS')
 ALTER TABLE T_HOM_COLLECT ADD (FACCEPTSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HOM_ACCEPTMANAGEDETAIL')
 CREATE TABLE T_HOM_ACCEPTMANAGEDETAIL (
FID BIGINT DEFAULT 0 NOT NULL,
FONBOARDID BIGINT DEFAULT 0 NOT NULL,
FCOLLECTCONFIGHISID BIGINT DEFAULT 0 NOT NULL,
FPAGEKEY VARCHAR(100) DEFAULT ' ' NOT NULL,
FFIELDKEY VARCHAR(100) DEFAULT ' ' NOT NULL,
FISPASS VARCHAR(2) DEFAULT ' ' NOT NULL,
FFIELDTYPE VARCHAR(2) DEFAULT ' ' NOT NULL,
FRECHECKSTAND NVARCHAR(255) DEFAULT ' ' NOT NULL,
FFIELDNAME NVARCHAR(255) DEFAULT ' ' NOT NULL,
FMODIFYTIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FEDUCERTID BIGINT DEFAULT 0 NOT NULL,
FINDEX INT DEFAULT 0 NOT NULL
);


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



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