/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\EB_constraint.sql **/
EXEC p_DropIdx 'IDX_eb_AnalysisChartCode', 'T_EB_ANALYSISCHART';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_ANALYSISCHARTCODE') CREATE UNIQUE INDEX IDX_EB_ANALYSISCHARTCODE ON T_EB_ANALYSISCHART ( FCODE );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IX_EB_TASKPROCESSASSID') CREATE INDEX IX_EB_TASKPROCESSASSID ON T_EB_TASKPROCESS ( FASSIGNERID ,FTASKID ,FTEMPLATEID );

 EXEC p_AlterPK 'PK_T_EB_ANALYSISCHARTACCOUNT', 'T_EB_ANALYSISCHARTACCOUNT', 'FENTRYID', '1';
 EXEC P_ALTERPK 'PK_T_EB_MAPPINGBASEDATA', 'T_EB_MAPPINGBASEDATA', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_EB_MAP_NO') CREATE INDEX IDX_EB_MAP_NO ON T_EB_MAPPINGBASEDATA ( FBASEDATAFIELD );



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