/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\MDL_constraint.sql **/
 EXEC P_ALTERPK 'PK_META_BIZEXTCASE', 'T_META_BIZEXTCASE', 'FID', '1';

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

 EXEC P_ALTERPK 'PK_META_BIZEXTCASE_L', 'T_META_BIZEXTCASE_L', 'FPKID', '1';

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

 EXEC P_ALTERPK 'PK_META_BIZEXTPLUGIN', 'T_META_BIZEXTPLUGIN', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_META_BIZEXTPLUGIN_NO') CREATE INDEX IDX_META_BIZEXTPLUGIN_NO ON T_META_BIZEXTPLUGIN ( FPLUGINCLASS );
 
 EXEC P_ALTERPK 'PK_META_BIZEXTPLUGIN_S', 'T_META_BIZEXTPLUGIN_S', 'FENTRYID', '1';

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

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