/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/
 EXEC P_ALTERPK 'PK_CTS_TERMWORD', 'T_CTS_TERMWORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CTS_TERMWORD_FAPPID') CREATE INDEX IDX_CTS_TERMWORD_FAPPID ON T_CTS_TERMWORD ( FAPPID );


 EXEC P_ALTERPK 'PK_CTS_TERMWORDCOMP', 'T_CTS_TERMWORDCOMP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CTS_TERMWORDCOMP_FWORDID') CREATE INDEX IDX_CTS_TERMWORDCOMP_FWORDID ON T_CTS_TERMWORDCOMP ( FWORDID );


 EXEC P_ALTERPK 'PK_CTS_TERMWORDLOG', 'T_CTS_TERMWORDLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CTS_TERMWORDLOG_FWORDID') CREATE INDEX IDX_CTS_TERMWORDLOG_FWORDID ON T_CTS_TERMWORDLOG ( FWORDID );


 EXEC P_ALTERPK 'PK_CTS_TERMWORDLOG_L', 'T_CTS_TERMWORDLOG_L', 'FPKID', '1';

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



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