From 1a506214e5779e068c1d2b7b34dbf3d1c2e8c637 Mon Sep 17 00:00:00 2001
From: Oleg Mitsura <oleg.mitsura@amdocs.com>
Date: Tue, 27 Jul 2021 16:24:23 -0400
Subject: SO-3720 BuildingBlockRollback lookup table

Issue-ID: SO-3720

BuildingBlockRollback lookup table will indicate the rollback BB to take;
this is the first part for simplifying WorkflowActionBBTasks logic:
instead of doing string matching, we just do a lookup of a block to call
to perform the rollback operation.
In some cases, the Action is set as well - this would be needed for certain
BBs, in that case, there is a corresponding rollbackAction as well.

Change-Id: I072a2ada894cf4672f5a1cdce762605757cb1d14
Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com>
---
 .../db/migration/V8.9.1__AddBuildingBlockRollback.sql          | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.9.1__AddBuildingBlockRollback.sql

(limited to 'adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.9.1__AddBuildingBlockRollback.sql')

diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.9.1__AddBuildingBlockRollback.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.9.1__AddBuildingBlockRollback.sql
new file mode 100644
index 0000000000..11dd1ecfb3
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V8.9.1__AddBuildingBlockRollback.sql
@@ -0,0 +1,10 @@
+use catalogdb;
+
+CREATE TABLE IF NOT EXISTS `building_block_rollback` (
+    `ID` INT NOT NULL AUTO_INCREMENT,
+    `BUILDING_BLOCK_NAME` varchar(200) NOT NULL,
+    `ACTION` varchar(200) null,
+    `ROLLBACK_BUILDING_BLOCK_NAME` varchar(200) NOT NULL,
+    `ROLLBACK_ACTION` varchar(200) NULL,
+    PRIMARY KEY (`ID`)
+)  ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- 
cgit 

