/**Begin D:\PDM_UPGRADE\pdmnew\BASE_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BD_PROSTATUS_PERM', 'T_BD_PROSTATUS_PERM', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_BD_STATUSPERM_NUMBER') CREATE  CLUSTERED INDEX IDX_T_BD_STATUSPERM_NUMBER ON T_BD_PROSTATUS_PERM ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_BD_PROSTATUS_PERM_L', 'T_BD_PROSTATUS_PERM_L', 'FPKID', '0';

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


 EXEC P_ALTERPK 'PK_T_BD_STATUSENTRY', 'T_BD_STATUSENTRY', 'FENTRYID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_STATUSENTRY_FK') CREATE  CLUSTERED INDEX IDX_BD_STATUSENTRY_FK ON T_BD_STATUSENTRY ( FID );



/**End D:\PDM_UPGRADE\pdmnew\BASE_constraint.sql **/
