/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_MSG_SELECTSCENE', 'T_MSG_SELECTSCENE', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSG_SELECTSCENE') CREATE INDEX IDX_MSG_SELECTSCENE ON T_MSG_SELECTSCENE ( FID ,FBASEDATAID );


 EXEC P_ALTERPK 'PK_T_MSG_TEMPLATE_L', 'T_MSG_TEMPLATE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_MSG_TPLSCENE', 'T_MSG_TPLSCENE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_MSG_TPLSCENE') CREATE INDEX IDX_MSG_TPLSCENE ON T_MSG_TPLSCENE ( FENTITYNUMBER );


 EXEC P_ALTERPK 'PK_T_MSG_TPLSCENE_L', 'T_MSG_TPLSCENE_L', 'FPKID', '1';

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



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