From 2567827693b1cda53da3f47df7342f0f82db9ad9 Mon Sep 17 00:00:00 2001 From: charitha Date: Mon, 17 Jun 2019 14:37:45 +0530 Subject: [PATCH] Add migration scripts for https://gitlab.com/entgra/product-iots/issues/109 --- .../migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mssql.sql | 3 +++ .../migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mysql.sql | 5 +++++ .../cdm-migration-postgres.sql | 3 +++ 3 files changed, 11 insertions(+) create mode 100644 modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mssql.sql create mode 100644 modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mysql.sql create mode 100644 modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-postgres.sql diff --git a/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mssql.sql b/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mssql.sql new file mode 100644 index 00000000..e2f7e6d5 --- /dev/null +++ b/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mssql.sql @@ -0,0 +1,3 @@ +ALTER TABLE DM_ENROLMENT ALTER COLUMN OWNER VARCHAR (255) NOT NULL; + +ALTER TABLE DM_GROUP ALTER COLUMN OWNER VARCHAR (255) DEFAULT NULL; diff --git a/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mysql.sql b/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mysql.sql new file mode 100644 index 00000000..99d8db97 --- /dev/null +++ b/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-mysql.sql @@ -0,0 +1,5 @@ +ALTER TABLE `DM_ENROLMENT` +CHANGE COLUMN `OWNER` `OWNER` VARCHAR(255) NOT NULL; + +ALTER TABLE `DM_GROUP` +CHANGE COLUMN `OWNER` `OWNER` VARCHAR(255) NULL DEFAULT NULL; diff --git a/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-postgres.sql b/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-postgres.sql new file mode 100644 index 00000000..a5fb68f7 --- /dev/null +++ b/modules/migration/migration-iot_3.3.1-to-iot_3.6.0/cdm-migration-postgres.sql @@ -0,0 +1,3 @@ +ALTER TABLE dm_enrolment ALTER COLUMN owner TYPE character varying(255); + +ALTER TABLE dm_group ALTER COLUMN owner TYPE character varying(255);