/**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_BGMD_BIZRULETAXES' AND KSQL_COL_NAME ='FAVTCASHFLOWACCOUNT') 
 ALTER TABLE T_BGMD_BIZRULETAXES ADD (FAVTCASHFLOWACCOUNT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BGMD_BIZRULETAXES' AND KSQL_COL_NAME ='FAVTPAYABLEACCOUNT') 
 ALTER TABLE T_BGMD_BIZRULETAXES ADD (FAVTPAYABLEACCOUNT BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_TASKPROSUPERVISOR') 
 CREATE TABLE T_EB_TASKPROSUPERVISOR (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FUSERFIELD BIGINT DEFAULT 0 NOT NULL,
FSUPERVISOR BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_EB_TASKSUPERVISOR') 
 CREATE TABLE T_EB_TASKSUPERVISOR (
FID BIGINT DEFAULT 0 NOT NULL,
FENTRYID BIGINT DEFAULT 0 NOT NULL,
FSEQ INT DEFAULT 0 NOT NULL,
FSUPERVISOR BIGINT DEFAULT 0 NOT NULL,
FUSERFIELD BIGINT DEFAULT 0 NOT NULL
);


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_TASKDISTORG' AND KSQL_COL_NAME ='FEXECUTORID') 
 ALTER TABLE T_EB_TASKDISTORG ADD (FEXECUTORID BIGINT DEFAULT 0 NOT NULL );




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