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

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRCS_ENTITYFORBID' AND KSQL_COL_NAME IN ('FAPPID')) 
 ALTER TABLE T_HRCS_ENTITYFORBID ADD (FAPPID VARCHAR(36) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HRCS_ENTITYFORBID' AND KSQL_COL_NAME IN ('FFORBIDTYPE')) 
 ALTER TABLE T_HRCS_ENTITYFORBID ADD (FFORBIDTYPE CHAR(1) DEFAULT '1' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_HRCS_PERMRELATCFG') 
 CREATE TABLE T_HRCS_PERMRELATCFG (
FID BIGINT DEFAULT 0 NOT NULL,
FAPPID VARCHAR(36) DEFAULT ' ' NOT NULL,
FENTITYTYPEID VARCHAR(36) DEFAULT ' ' NOT NULL,
FISASSIGN CHAR(1) DEFAULT '0' NOT NULL,
FPERMITEMID VARCHAR(18) DEFAULT ' ' NOT NULL,
FCREATORID BIGINT DEFAULT 0 NOT NULL,
FCREATETIME DATETIME,
FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
FMODIFYTIME DATETIME,
FISSYSPRESET CHAR(1) DEFAULT ' ' NOT NULL
);



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