/**Begin D:\PDM_UPGRADE\PDM1\FCS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_FCS_SNAPSCHEDULE', 'T_FCS_SNAPSCHEDULE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_SNAPSCHEDULE') CREATE INDEX IDX_T_FCS_SNAPSCHEDULE ON T_FCS_SNAPSCHEDULE ( FNUMBER ,FENABLE );


 EXEC P_ALTERPK 'PK_FCS_SNAPSCHEDULE_L', 'T_FCS_SNAPSCHEDULE_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FCS_DATASNAP', 'T_FCS_DATASNAP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_DATASNAP') CREATE INDEX IDX_T_FCS_DATASNAP ON T_FCS_DATASNAP ( FNUMBER ,FENABLE );


 EXEC P_ALTERPK 'PK_FCS_DATASNAP_L', 'T_FCS_DATASNAP_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FCS_TDALOG', 'T_FCS_TDALOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_TDALOG') CREATE INDEX IDX_T_FCS_TDALOG ON T_FCS_TDALOG ( FREPORTID ,FORGVIEWID ,FORG );

EXEC p_DropIdx 'IDX_T_FCS_TDALOG', 'T_FCS_TDALOG';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_TDALOG') CREATE INDEX IDX_T_FCS_TDALOG ON T_FCS_TDALOG ( FORGVIEWID ,FORG );


 EXEC P_ALTERPK 'PK_T_FCS_PAYACCESS_NEWPARAM', 'T_FCS_PAYACCESS_NEWPARAM', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_FCS_PAYACCESS_NEWPARAM') CREATE INDEX IDX_T_FCS_PAYACCESS_NEWPARAM ON T_FCS_PAYACCESS_NEWPARAM ( FENABLE );


 EXEC P_ALTERPK 'PK_FCS_PAYACCESS_NEWPARAM_L', 'T_FCS_PAYACCESS_NEWPARAM_L', 'FPKID', '1';

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


/**End D:\PDM_UPGRADE\PDM1\FCS_constraint.sql **/
