/**Begin D:\softwaresetup\PDM_UPGRADE\PDM1\FPM_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_FPM_TEMPLATEINFO_BAK', 'T_FPM_TEMPLATEINFO_BAK', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TEMPLATEINFO_BAK_L', 'T_FPM_TEMPLATEINFO_BAK_L', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TEMPLATEBAKUSER', 'T_FPM_TEMPLATEBAKUSER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TPLBAK_CURRENCY', 'T_FPM_TPLBAK_CURRENCY', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TEMPLATEBAK_DIMSET', 'T_FPM_TEMPLATEBAK_DIMSET', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TEMPLATEBAK_LAYOUT', 'T_FPM_TEMPLATEBAK_LAYOUT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TPLBAK_LAYOUTMEM', 'T_FPM_TPLBAK_LAYOUTMEM', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TPLBAK_MEMBER', 'T_FPM_TPLBAK_MEMBER', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TPLBAK_REPORTTYPE', 'T_FPM_TPLBAK_REPORTTYPE', 'FPKID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TEMPLATEBAK_SUBJECT', 'T_FPM_TEMPLATEBAK_SUBJECT', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_FPM_TPLBAK_SUBJECTME', 'T_FPM_TPLBAK_SUBJECTME', 'FPKID', '1';

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



/**End D:\softwaresetup\PDM_UPGRADE\PDM1\FPM_constraint.sql **/
