/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TASKREFTEMPLATE' AND KSQL_COL_NAME ='FSEQ') 
 ALTER TABLE T_EB_TASKREFTEMPLATE ADD (FSEQ INT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_SCHEMEENTRY' AND KSQL_COL_NAME ='FDIMCACHE') 
 ALTER TABLE T_EB_SCHEMEENTRY ADD (FDIMCACHE NVARCHAR(2000) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TASKPROCESS' AND KSQL_COL_NAME IN ('FFINISHTIME')) 
 ALTER TABLE T_EB_TASKPROCESS ADD (FFINISHTIME DATETIME );
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_BRALLOCATEENTITY' AND KSQL_COL_NAME ='FCATALOGID') 
 ALTER TABLE T_EB_BRALLOCATEENTITY ADD (FCATALOGID BIGINT DEFAULT 0 NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_EB_BRALLOCATEENTITY', 'FBIZRULEID', 'NULL', 'NULL', '1001', 'NULL';

 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_EB_BRALLOCATEENTITY', 'FBIZRULETYPE', 'NULL', 'NULL', '1001', 'NULL';

 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_EB_BRALLOCATEENTITY', 'FBIZRULENUMBER', 'NULL', 'NULL', '1001', 'NULL';

 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_EB_BRALLOCATEENTITY', 'FBIZRULENAME', 'NULL', 'NULL', '1001', 'NULL';


/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/
