aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter/src/main/resources
diff options
context:
space:
mode:
authorSmokowski, Steven <steve.smokowski@att.com>2019-04-30 21:00:08 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-04-30 21:00:20 -0400
commitacb8997a69725a39270a6527b33995f51c1e4586 (patch)
tree44984771fe8b939093982ef049f0aa393336136e /adapters/mso-catalog-db-adapter/src/main/resources
parentd26574fe0e44f43bfbf507adbf91a28c1b53c63a (diff)
Add Model Version Query
Fix the sql migration version numbering to be proper Fix marking test as private, mark public Clean up public declarations to private Fix schema.sql to have new column for unit test Revert POM Change, add License, clean up comments Fix bad spelling of method name issue Update catalog db to support new rest endpoint Update local query service and mappers Localstaging of potential catalog db changes Update logic to write overall distro status Change-Id: I84d53b972ede3176c5af32d13444583a36606efa Issue-ID: SO-1820 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main/resources')
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/manual/Migrate_Distrobution_Status.sql11
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.6.6__Add_Column_For_Distrobution_Status.sql1
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