aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-catalog-db-adapter/src/main/resources/db
diff options
context:
space:
mode:
authorBonkur, Venkat (vb8416) <vb8416@att.com>2019-04-09 00:41:32 -0400
committerMarcus Williams <marcus.williams@intel.com>2019-04-09 22:44:08 +0000
commit324173086123b6ce15e23c1da8d563bef6b6926d (patch)
tree718f8092306c23862db7f809666a6ed83c0cd617 /adapters/mso-catalog-db-adapter/src/main/resources/db
parent1d9a4a6444f1a192ae69aa1f9c5df908c34ad164 (diff)
Add SO Populate Activity BB Data in Catalog DB
Added SO Populate Activity BB Data in Catalog DB. Make the ID columns auto increment activity_spec_categories, activity_spec_to_activity_spec_categories Issue-ID: SO-1724 Signed-off-by: Bonkur, Venkat (vb8416) <vb8416@att.com> Change-Id: Ic59727cd8aa13133d6b5ebde98a249cda180cc9d
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src/main/resources/db')
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql27
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.10__AlterforWorkFlowDesignerTables.sql14
2 files changed, 41 insertions, 0 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql
new file mode 100644
index 0000000000..c74ce6940c
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/R__WorkflowDesignerData.sql
@@ -0,0 +1,27 @@
+use catalogdb;
+
+DELETE FROM activity_spec_to_activity_spec_parameters;
+DELETE FROM activity_spec_to_activity_spec_categories;
+DELETE FROM activity_spec;
+DELETE FROM activity_spec_categories;
+DELETE FROM activity_spec_parameters;
+
+INSERT INTO activity_spec (NAME, DESCRIPTION, VERSION)
+VALUES ('VNFSetInMaintFlagActivity','Activity to Set InMaint Flag in A&AI',1.0);
+
+INSERT INTO activity_spec_categories (NAME)
+VALUES ('VNF');
+
+INSERT INTO activity_spec_parameters (NAME, TYPE, DIRECTION, DESCRIPTION)
+VALUES('WorkflowException','WorkflowException','outputParameters','Description');
+
+INSERT INTO activity_spec_to_activity_spec_categories(ACTIVITY_SPEC_ID, ACTIVITY_SPEC_CATEGORIES_ID)
+VALUES
+(
+(select ID from ACTIVITY_SPEC where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_categories where NAME='VNF'));
+
+INSERT INTO activity_spec_to_activity_spec_parameters( ACTIVITY_SPEC_ID, ACTIVITY_SPEC_PARAMETERS_ID)
+VALUES(
+(select ID from ACTIVITY_SPEC where NAME='VNFSetInMaintFlagActivity' and VERSION=1.0),
+(select ID from activity_spec_parameters where NAME='WorkflowException' and DIRECTION='outputParameters')); \ No newline at end of file
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.10__AlterforWorkFlowDesignerTables.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.10__AlterforWorkFlowDesignerTables.sql
new file mode 100644
index 0000000000..775455d589
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V5.10__AlterforWorkFlowDesignerTables.sql
@@ -0,0 +1,14 @@
+use catalogdb;
+
+ALTER TABLE activity_spec_to_activity_spec_categories DROP FOREIGN KEY fk_activity_spec_to_activity_spec_categories__activity_spec_c1;
+
+ALTER TABLE activity_spec_categories modify id INT(11) not null auto_increment;
+
+ALTER TABLE activity_spec_to_activity_spec_categories ADD
+ CONSTRAINT `fk_activity_spec_to_activity_spec_categories__activity_spec_c1`
+ FOREIGN KEY (`ACTIVITY_SPEC_CATEGORIES_ID`)
+ REFERENCES `activity_spec_categories` (`ID`)
+ ON DELETE CASCADE
+ ON UPDATE CASCADE;
+
+ALTER TABLE activity_spec_to_activity_spec_categories modify id INT(11) not null auto_increment; \ No newline at end of file