/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\AR_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_AR_EDITSETTINGSINBULK', 'T_AR_EDITSETTINGSINBULK', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'INDEX_EDITSETTINGSINBULK') CREATE INDEX INDEX_EDITSETTINGSINBULK ON T_AR_EDITSETTINGSINBULK ( FSTATUS );


 EXEC P_ALTERPK 'PK_AR_EDITSETTINGSENTRY', 'T_AR_EDITSETTINGSENTRY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_EDITSETTINGSE_PID') CREATE INDEX IDX_AR_EDITSETTINGSE_PID ON T_AR_EDITSETTINGSENTRY ( FID );


 EXEC P_ALTERPK 'PK_T_AR_EDITSETTINGSINBULK_L', 'T_AR_EDITSETTINGSINBULK_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_AR_ESIB_FID') CREATE INDEX IDX_AR_ESIB_FID ON T_AR_EDITSETTINGSINBULK_L ( FID ,FLOCALEID );

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