/**Begin D:\PDM_UPGRADE\PDM1\HBSS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HBSS_RECRUSCENE')
 CREATE TABLE T_HBSS_RECRUSCENE (
FID BIGINT DEFAULT 0 NOT NULL,
FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
FNAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FDESCRIPTION NVARCHAR(255) DEFAULT ' ' NOT NULL,
FRECRUITMENTCATEGORY BIGINT DEFAULT 0 NOT NULL,
FISSYSPRESET CHAR(1) DEFAULT ' ' NOT NULL,
FSTATUS VARCHAR(2) DEFAULT ' ' NOT NULL,
FENABLE VARCHAR(2) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FDISABLERID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFYTIME DATETIME,
FDISABLEDATE DATETIME,
FMASTERID BIGINT DEFAULT 0 NOT NULL,
FSIMPLENAME NVARCHAR(100) DEFAULT ' ' NOT NULL,
FINDEX BIGINT DEFAULT 0 NOT NULL
);


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


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


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_LOGINCONFIG' AND KSQL_COL_NAME IN ('FREDIRECTFORMID')) 
 ALTER TABLE T_HBSS_LOGINCONFIG ADD (FREDIRECTFORMID BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_LOGINCONFIG' AND KSQL_COL_NAME IN ('FUSERTYPEID')) 
 ALTER TABLE T_HBSS_LOGINCONFIG ADD (FUSERTYPEID BIGINT DEFAULT 0 NOT NULL );

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