/**Begin D:\PDM_UPGRADE\PDM1\HBSS_table.sql **/
-- 能力素质库添加上级维度，能力描述字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CAPACITYGROUP' AND KSQL_COL_NAME ='FPARENTDIM') 
 ALTER TABLE T_HBSS_CAPACITYGROUP ADD (FPARENTDIM BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CAPACITYGROUP' AND KSQL_COL_NAME ='FTYPE') 
 ALTER TABLE T_HBSS_CAPACITYGROUP ADD (FTYPE VARCHAR(2) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CAPACITYITEM_L' AND KSQL_COL_NAME ='FNAGBEHAVIOR') 
 ALTER TABLE T_HBSS_CAPACITYITEM_L ADD (FNAGBEHAVIOR NVARCHAR(2000) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CAPACITYITEM_L' AND KSQL_COL_NAME ='FMAINKEYWORD') 
 ALTER TABLE T_HBSS_CAPACITYITEM_L ADD (FMAINKEYWORD NVARCHAR(100) DEFAULT ' ' NOT NULL );
-- 能力素质项添加关键词，是否负向行为，负向行为定义字段 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CAPACITYITEM' AND KSQL_COL_NAME ='FMAINKEYWORD') 
 ALTER TABLE T_HBSS_CAPACITYITEM ADD (FMAINKEYWORD NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CAPACITYITEM' AND KSQL_COL_NAME ='FISNAGBEHAVIOR') 
 ALTER TABLE T_HBSS_CAPACITYITEM ADD (FISNAGBEHAVIOR CHAR(1) DEFAULT '0' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HBSS_CAPACITYITEM' AND KSQL_COL_NAME ='FNAGBEHAVIOR') 
 ALTER TABLE T_HBSS_CAPACITYITEM ADD (FNAGBEHAVIOR NVARCHAR(2000) DEFAULT ' ' NOT NULL );

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