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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_META_TABLEDICT_FTABLENAME') CREATE INDEX IDX_META_TABLEDICT_FTABLENAME ON T_META_TABLEDICT ( FTABLENAME );


 EXEC P_ALTERPK 'PK_T_META_TABLEREF', 'T_META_TABLEREF', 'FENTRYID', '1';

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

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_META_TABLEREF_MAINENTITYID') CREATE INDEX IDX_META_TABLEREF_MAINENTITYID ON T_META_TABLEREF ( FMAINENTITYID );



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