diff options
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main/resources')
2 files changed, 12 insertions, 0 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/manual/Migrate_Distrobution_Status.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/manual/Migrate_Distrobution_Status.sql new file mode 100644 index 0000000000..4a9c2cce9f --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/manual/Migrate_Distrobution_Status.sql @@ -0,0 +1,11 @@ + +UPDATE catalogdb.service serv SET OVERALL_DISTRIBUTION_STATUS =( +SELECT wds.DISTRIBUTION_ID_STATUS +FROM requestdb.watchdog_distributionid_status wds +INNER JOIN requestdb.watchdog_service_mod_ver_id_lookup wdlook +ON wds.DISTRIBUTION_ID = wdlook.DISTRIBUTION_ID +WHERE wdlook.SERVICE_MODEL_VERSION_ID = serv.MODEL_UUID +ORDER BY wdlook.MODIFY_TIME DESC LIMIT 1); + +UPDATE catalogdb.service SET OVERALL_DISTRIBUTION_STATUS = 'DISTRIBUTION_COMPLETE_OK' +WHERE service.OVERALL_DISTRIBUTION_STATUS = NULL;
\ No newline at end of file diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.6__Add_Column_For_Distrobution_Status.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.6__Add_Column_For_Distrobution_Status.sql new file mode 100644 index 0000000000..ae416ffbfe --- /dev/null +++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.6__Add_Column_For_Distrobution_Status.sql @@ -0,0 +1 @@ +ALTER TABLE catalogdb.service ADD COLUMN IF NOT EXISTS OVERALL_DISTRIBUTION_STATUS varchar(45);
\ No newline at end of file |