/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MPS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MDS_QUOTA_L', 'T_MDS_QUOTA_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_MDS_QUOTA', 'T_MDS_QUOTA', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_QUOTA') CREATE INDEX IDX_MDS_QUOTA ON T_MDS_QUOTA ( FNUMBER ,FCREATEORGID );


 EXEC P_ALTERPK 'PK_T_MDS_QUOTAINFO', 'T_MDS_QUOTAINFO', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MDS_QUOTAINFO') CREATE INDEX IDX_MDS_QUOTAINFO ON T_MDS_QUOTAINFO ( FID ,FSEQ );



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