/**Begin D:\PDM\PDM_UPGRADE\pdm1\FCS_constraint.sql **/
EXEC P_ALTERPK 'PK_T_FCS_SNAPSCHEME', 'T_FCS_SNAPSCHEME', 'FID', '1';

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


EXEC P_ALTERPK 'PK_T_FCS_EXPORTSCHEME', 'T_FCS_EXPORTSCHEME', 'FID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_EXPORTSCHEME') CREATE INDEX IDX_T_FCS_EXPORTSCHEME ON T_FCS_EXPORTSCHEME ( FNUMBER );


EXEC P_ALTERPK 'PK_T_FCS_SNAPSCHEME_COMB', 'T_FCS_SNAPSCHEME_COMB', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FCS_EXPORTSCHEME_L', 'T_FCS_EXPORTSCHEME_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_FCS_SNAPSCHEME_L', 'T_FCS_SNAPSCHEME_L', 'FPKID', '1';

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


EXEC P_ALTERPK 'PK_T_FCS_SNAPSCHEME_COMB_L', 'T_FCS_SNAPSCHEME_COMB_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_FCS_SNAPSCHEME_COMB_L') CREATE INDEX IDX_FCS_SNAPSCHEME_COMB_L ON T_FCS_SNAPSCHEME_COMB_L ( FENTRYID ,FLOCALEID );


EXEC P_ALTERPK 'PK_T_FCS_SNAPLOG', 'T_FCS_SNAPLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SNAPLOG') CREATE INDEX IDX_T_FCS_SNAPLOG ON T_FCS_SNAPLOG ( FREPORTID ,FSNAPSCHEMEID );

EXEC P_ALTERPK 'PK_T_FCS_SNAPSCHEME_PARAMS', 'T_FCS_SNAPSCHEME_PARAMS', 'FENTRYID', '1';

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


EXEC P_ALTERPK 'PK_T_FCS_SNAPLOG_H', 'T_FCS_SNAPLOG_H', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SNAPLOG_H') CREATE INDEX IDX_T_FCS_SNAPLOG_H ON T_FCS_SNAPLOG_H ( FREPORTID ,FSNAPSCHEMEID );

/**End D:\PDM\PDM_UPGRADE\pdm1\FCS_constraint.sql **/
