/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_table.sql **/
 EXEC p_AlterColumn 'T_EB_COSTTYPE', 'FDIMMEMNAME', 'NVARCHAR(50)', 'NOT NULL', '0001', ''' ''';

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TASKPROCESS' AND KSQL_COL_NAME IN ('FTEMPLATETYPE')) 
 ALTER TABLE T_EB_TASKPROCESS ADD (FTEMPLATETYPE NVARCHAR(20) DEFAULT ' ' NOT NULL );



IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_BRALLOCATEENTITY') 
 CREATE TABLE T_EB_BRALLOCATEENTITY (
FID BIGINT DEFAULT 0 NOT NULL,
FMODELID BIGINT DEFAULT 0 NOT NULL,
FEXECSEQ INT DEFAULT 0 NOT NULL,
FTEMPLATEID BIGINT DEFAULT 0 NOT NULL,
FTEMPLATETYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBIZRULEID BIGINT DEFAULT 0 NOT NULL,
FBIZRULETYPE NVARCHAR(30) DEFAULT ' ' NOT NULL,
FBIZRULENUMBER NVARCHAR(100) DEFAULT ' ' NOT NULL,
FBIZRULENAME NVARCHAR(100) DEFAULT ' ' NOT NULL
);



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