/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\PEA_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_BAS_SHARDSTRATEGY_L', 'T_BAS_SHARDSTRATEGY_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_BAS_SHARDSTRATEGYENTRY', 'T_BAS_SHARDSTRATEGYENTRY', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_BAS_SHARDSTRATEGYENTRY_L', 'T_BAS_SHARDSTRATEGYENTRY_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BAS_STRATEGYENTRY_L') CREATE INDEX IDX_BAS_STRATEGYENTRY_L ON T_BAS_SHARDSTRATEGYENTRY_L ( FENTRYID ,FLOCALEID );


 EXEC P_ALTERPK 'PK_T_BAS_SHARDSTRATEGY', 'T_BAS_SHARDSTRATEGY', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BAS_SHARDSTRATEGY') CREATE INDEX IDX_BAS_SHARDSTRATEGY ON T_BAS_SHARDSTRATEGY ( FNUMBER );



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