/**Begin C:\PDM_UPGRADE\PDM1\PBD_constraint.sql **/
 EXEC P_ALTERPK 'PK_PBD_SMONI_DATA', 'T_PBD_SMONI_DATA', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_DATA_FBILLNO') CREATE INDEX IDX_PBD_SMONI_DATA_FBILLNO ON T_PBD_SMONI_DATA ( FBILLNO );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_DATA_FCREATTIME') CREATE INDEX IDX_PBD_SMONI_DATA_FCREATTIME ON T_PBD_SMONI_DATA ( FCREATETIME );


 EXEC P_ALTERPK 'PK_PBD_SMONI_ABNENTITY', 'T_PBD_SMONI_ABNENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_ABN_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_ABN_FID_FSEQ ON T_PBD_SMONI_ABNENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_BRANCHENTITY', 'T_PBD_SMONI_BRANCHENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_BRANCH_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_BRANCH_FID_FSEQ ON T_PBD_SMONI_BRANCHENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_CHECKENTITY', 'T_PBD_SMONI_CHECKENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_CHECK_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_CHECK_FID_FSEQ ON T_PBD_SMONI_CHECKENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_NEWSENTITY', 'T_PBD_SMONI_NEWSENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_NEWS_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_NEWS_FID_FSEQ ON T_PBD_SMONI_NEWSENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_COMENTITY', 'T_PBD_SMONI_COMENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_COM_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_COM_FID_FSEQ ON T_PBD_SMONI_COMENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_BIGSHARENTITY', 'T_PBD_SMONI_BIGSHARENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_BIGSHAR_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_BIGSHAR_FID_FSEQ ON T_PBD_SMONI_BIGSHARENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_ILLEGALENTITY', 'T_PBD_SMONI_ILLEGALENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_ILLEGAL_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_ILLEGAL_FID_FSEQ ON T_PBD_SMONI_ILLEGALENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_PUNISHENTITY', 'T_PBD_SMONI_PUNISHENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_PUNISH_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_PUNISH_FID_FSEQ ON T_PBD_SMONI_PUNISHENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_OPUNISHENTITY', 'T_PBD_SMONI_OPUNISHENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_OPUNISH_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_OPUNISH_FID_FSEQ ON T_PBD_SMONI_OPUNISHENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_HOLDERENTITY', 'T_PBD_SMONI_HOLDERENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_HOLDER_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_HOLDER_FID_FSEQ ON T_PBD_SMONI_HOLDERENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_COURTANENTITY', 'T_PBD_SMONI_COURTANENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_COURTAN_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_COURTAN_FID_FSEQ ON T_PBD_SMONI_COURTANENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_COURTREENTITY', 'T_PBD_SMONI_COURTREENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_COURTRE_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_COURTRE_FID_FSEQ ON T_PBD_SMONI_COURTREENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_EXEENTITY', 'T_PBD_SMONI_EXEENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_EXE_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_EXE_FID_FSEQ ON T_PBD_SMONI_EXEENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_DISHONEENTITY', 'T_PBD_SMONI_DISHONEENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_DISHONE_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_DISHONE_FID_FSEQ ON T_PBD_SMONI_DISHONEENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_SMONI_KTANENTITY', 'T_PBD_SMONI_KTANENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_SMONI_KTAN_FID_FSEQ') CREATE INDEX IDX_PBD_SMONI_KTAN_FID_FSEQ ON T_PBD_SMONI_KTANENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_MONITOR', 'T_PBD_MONITOR', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_MONITOR_FBILLNO') CREATE INDEX IDX_PBD_MONITOR_FBILLNO ON T_PBD_MONITOR ( FBILLNO );


 EXEC P_ALTERPK 'PK_PBD_MONITOR_ENTRYENTITY', 'T_PBD_MONITOR_ENTRYENTITY', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_MONITOR_ENTRY_FID_FSEQ') CREATE INDEX IDX_PBD_MONITOR_ENTRY_FID_FSEQ ON T_PBD_MONITOR_ENTRYENTITY ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_MONITOR_API', 'T_PBD_MONITOR_API', 'FID', '1';

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


 EXEC P_ALTERPK 'PK_PBD_MONITOR_API_L', 'T_PBD_MONITOR_API_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_MONITOR_API_L_FID') CREATE INDEX IDX_PBD_MONITOR_API_L_FID ON T_PBD_MONITOR_API_L ( FLOCALEID );


 EXEC P_ALTERPK 'PK_PBD_MONITORAPI_INPUTS', 'T_PBD_MONITORAPI_INPUTS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_MAPI_INPUTS_FID_FSEQ') CREATE INDEX IDX_PBD_MAPI_INPUTS_FID_FSEQ ON T_PBD_MONITORAPI_INPUTS ( FID ,FSEQ );


 EXEC P_ALTERPK 'PK_PBD_MONITORAPI_OUTPUTS', 'T_PBD_MONITORAPI_OUTPUTS', 'FENTRYID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PBD_MAPI_OUTPUTS_FID_FSEQ') CREATE INDEX IDX_PBD_MAPI_OUTPUTS_FID_FSEQ ON T_PBD_MONITORAPI_OUTPUTS ( FID ,FSEQ );



/**End C:\PDM_UPGRADE\PDM1\PBD_constraint.sql **/
