From f167b20192c140ccd76e8efc48b07edfcec5ddb7 Mon Sep 17 00:00:00 2001 From: ayyoob Date: Thu, 15 Jun 2017 09:47:46 +0530 Subject: [PATCH] updated migration db queries --- .../migration/3.0.0-to-3.1.0/dbscripts/h2.sql | 10 +++++++++- .../migration/3.0.0-to-3.1.0/dbscripts/mysql.sql | 11 ++++++++++- pom.xml | 4 ++-- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/modules/distribution/src/core/resources/migration/3.0.0-to-3.1.0/dbscripts/h2.sql b/modules/distribution/src/core/resources/migration/3.0.0-to-3.1.0/dbscripts/h2.sql index 2b049e14..93d3e4be 100644 --- a/modules/distribution/src/core/resources/migration/3.0.0-to-3.1.0/dbscripts/h2.sql +++ b/modules/distribution/src/core/resources/migration/3.0.0-to-3.1.0/dbscripts/h2.sql @@ -2,4 +2,12 @@ ALTER TABLE DM_DEVICE_TYPE ADD COLUMN LAST_UPDATED_TIMESTAMP TIMESTAMP DEFAULT ALTER TABLE DM_DEVICE_TYPE ADD COLUMN DEVICE_TYPE_META VARCHAR(20000) DEFAULT NULL; ALTER TABLE DM_ENROLMENT_OP_MAPPING ADD COLUMN PUSH_NOTIFICATION_STATUS VARCHAR(50) NULL; UPDATE DM_ENROLMENT_OP_MAPPING SET PUSH_NOTIFICATION_STATUS = 'COMPLETED'; -ALTER TABLE DM_CONFIG_OPERATION ADD COLUMN ENABLED BOOLEAN NOT NULL DEFAULT FALSE, \ No newline at end of file +ALTER TABLE DM_CONFIG_OPERATION ADD COLUMN ENABLED BOOLEAN NOT NULL DEFAULT FALSE; +CREATE TABLE IF NOT EXISTS DM_DEVICE_PROPERTIES ( + DEVICE_TYPE_NAME VARCHAR(300) NOT NULL, + DEVICE_IDENTIFICATION VARCHAR(300) NOT NULL, + PROPERTY_NAME VARCHAR(100) DEFAULT 0, + PROPERTY_VALUE VARCHAR(100) DEFAULT NULL, + TENANT_ID VARCHAR(100) DEFAULT NULL, + PRIMARY KEY (DEVICE_TYPE_NAME, DEVICE_IDENTIFICATION, PROPERTY_NAME, TENANT_ID) +); \ No newline at end of file diff --git a/modules/distribution/src/core/resources/migration/3.0.0-to-3.1.0/dbscripts/mysql.sql b/modules/distribution/src/core/resources/migration/3.0.0-to-3.1.0/dbscripts/mysql.sql index f8857738..d9c9b3dc 100644 --- a/modules/distribution/src/core/resources/migration/3.0.0-to-3.1.0/dbscripts/mysql.sql +++ b/modules/distribution/src/core/resources/migration/3.0.0-to-3.1.0/dbscripts/mysql.sql @@ -1,4 +1,13 @@ ALTER TABLE DM_DEVICE_TYPE ADD COLUMN LAST_UPDATED_TIMESTAMP TIMESTAMP DEFAULT CURRENT_TIMESTAMP; ALTER TABLE DM_DEVICE_TYPE ADD COLUMN DEVICE_TYPE_META VARCHAR(20000) DEFAULT NULL; ALTER TABLE DM_ENROLMENT_OP_MAPPING ADD COLUMN PUSH_NOTIFICATION_STATUS VARCHAR(50) NULL; -UPDATE DM_ENROLMENT_OP_MAPPING SET PUSH_NOTIFICATION_STATUS = 'COMPLETED'; \ No newline at end of file +UPDATE DM_ENROLMENT_OP_MAPPING SET PUSH_NOTIFICATION_STATUS = 'COMPLETED'; +ALTER TABLE DM_CONFIG_OPERATION ADD COLUMN ENABLED BOOLEAN NOT NULL DEFAULT FALSE; +CREATE TABLE IF NOT EXISTS DM_DEVICE_PROPERTIES ( + DEVICE_TYPE_NAME VARCHAR(300) NOT NULL, + DEVICE_IDENTIFICATION VARCHAR(300) NOT NULL, + PROPERTY_NAME VARCHAR(100) DEFAULT 0, + PROPERTY_VALUE VARCHAR(100) DEFAULT NULL, + TENANT_ID VARCHAR(100) DEFAULT NULL, + PRIMARY KEY (DEVICE_TYPE_NAME, DEVICE_IDENTIFICATION, PROPERTY_NAME, TENANT_ID) +)ENGINE = InnoDB; \ No newline at end of file diff --git a/pom.xml b/pom.xml index 4c211cec..6e9a6c1b 100644 --- a/pom.xml +++ b/pom.xml @@ -1511,14 +1511,14 @@ 4.7.0 - 2.0.75-SNAPSHOT + 2.0.76-SNAPSHOT [2.0.0, 3.0.0) 3.1.0-SNAPSHOT - 3.0.42-SNAPSHOT + 3.0.43-SNAPSHOT 6.1.80