/**Begin E:\PDM_UPGRADE\PDM1\SYS_constraint.sql **/
 EXEC P_ALTERPK 'PK_CTS_ADDRCONFIGCOUNTRY', 'T_CTS_ADDRCONFIGCOUNTRY', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_CTS_ADDRCONFIGFORMAT', 'T_CTS_ADDRCONFIGFORMAT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_CTS_ADDRCONFIGSTRUCT', 'T_CTS_ADDRCONFIGSTRUCT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_CTS_ADDRPRECONFIG', 'T_CTS_ADDRPRECONFIG', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_CTS_ADDRPRECONFIG_L', 'T_CTS_ADDRPRECONFIG_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_CTS_ADDRPROPALIAS', 'T_CTS_ADDRPROPALIAS', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CTS_ADDRPROPALIAS') CREATE INDEX IDX_CTS_ADDRPROPALIAS ON T_CTS_ADDRPROPALIAS ( FTYPE );



/**End E:\PDM_UPGRADE\PDM1\SYS_constraint.sql **/
