/**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_APPROVEBILLENTRY' AND KSQL_COL_NAME ='FTASKPROCESSID') 
 ALTER TABLE T_EB_APPROVEBILLENTRY ADD (FTASKPROCESSID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_APPROVEBILLENTRY' AND KSQL_COL_NAME ='FPAGEDIMJSON') 
 ALTER TABLE T_EB_APPROVEBILLENTRY ADD (FPAGEDIMJSON NCLOB );
 EXEC p_AlterColumn 'T_EB_SHAREDIMENSIONDATA', 'FBILL', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_EB_SHAREDIMENSIONDATA', 'FAPP', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_EB_SHAREDIMENSIONDATA', 'FCLOUD', 'NVARCHAR(50)', 'NOT NULL', '1111', ''' ''';

 EXEC p_AlterColumn 'T_EB_SHAREDIMENSIONDATA', 'FDIMENSIONRANGEJSON', 'NVARCHAR(250)', 'NOT NULL', '0011', ''' ''';

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

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