Add policy type conversion from BLOB to Text DB scripts

remotes/1731000850486189418/master
Pahansith Gunathilake 5 months ago
parent cbbac7e37a
commit 2006d7e97d

@ -329,7 +329,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED
DEVICE_ID INT NOT NULL,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL,
POLICY_CONTENT BLOB NULL,
POLICY_CONTENT TEXT NULL,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL,
CREATED_TIME TIMESTAMP NULL,

@ -336,7 +336,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED (
DEVICE_ID INT NOT NULL ,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL ,
CREATED_TIME TIMESTAMP NULL ,

@ -336,7 +336,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED (
DEVICE_ID INT NOT NULL ,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL ,
CREATED_TIME TIMESTAMP NULL ,

@ -242,7 +242,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED (
DEVICE_ID INT NOT NULL ,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL ,
CREATED_TIME TIMESTAMP NULL ,

@ -288,7 +288,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED (
DEVICE_ID INT NOT NULL ,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL ,
CREATED_TIME TIMESTAMP NULL ,

@ -322,7 +322,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED (
DEVICE_ID INT NOT NULL ,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL ,
CREATED_TIME TIMESTAMP NULL ,

@ -161,7 +161,7 @@ CREATE TABLE IF NOT EXISTS `WSO2CDM`.`DM_DEVICE_POLICY_APPLIED` (
`ID` INT(11) NOT NULL AUTO_INCREMENT,
`DEVICE_ID` INT(11) NOT NULL,
`POLICY_ID` INT(11) NOT NULL,
`POLICY_CONTENT` BLOB NULL DEFAULT NULL,
`POLICY_CONTENT` TEXT NULL DEFAULT NULL,
`APPLIED` TINYINT(1) NULL DEFAULT NULL,
`CREATED_TIME` TIMESTAMP NULL DEFAULT NULL,
`UPDATED_TIME` TIMESTAMP NULL DEFAULT NULL,

@ -289,7 +289,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED (
DEVICE_ID INT NOT NULL ,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL ,
CREATED_TIME TIMESTAMP NULL ,

@ -304,7 +304,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED (
DEVICE_ID INT NOT NULL ,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL ,
CREATED_TIME TIMESTAMP NULL ,

@ -369,7 +369,7 @@ IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[D
DEVICE_ID INTEGER NOT NULL ,
ENROLMENT_ID INTEGER NOT NULL,
POLICY_ID INTEGER NOT NULL ,
POLICY_CONTENT VARBINARY(MAX) NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INTEGER NOT NULL,
APPLIED BIT NULL ,
CREATED_TIME DATETIME2 NULL ,

@ -355,7 +355,7 @@ CREATE TABLE IF NOT EXISTS DM_USER_POLICY (
DEVICE_ID INT NOT NULL ,
ENROLMENT_ID INT(11) NOT NULL,
POLICY_ID INT NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INT NOT NULL,
APPLIED TINYINT(1) NULL ,
CREATED_TIME TIMESTAMP NULL ,

@ -509,7 +509,7 @@ CREATE TABLE DM_DEVICE_POLICY_APPLIED (
DEVICE_ID NUMBER(10) NOT NULL ,
ENROLMENT_ID NUMBER(10) NOT NULL,
POLICY_ID NUMBER(10) NOT NULL ,
POLICY_CONTENT BLOB NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID NUMBER(10) NOT NULL,
APPLIED NUMBER(1) DEFAULT 0,
CREATED_TIME TIMESTAMP(0) NULL ,

@ -365,7 +365,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_POLICY_APPLIED (
DEVICE_ID INTEGER NOT NULL ,
ENROLMENT_ID INTEGER NOT NULL,
POLICY_ID INTEGER NOT NULL ,
POLICY_CONTENT BYTEA NULL ,
POLICY_CONTENT TEXT NULL ,
TENANT_ID INTEGER NOT NULL,
APPLIED SMALLINT NULL ,
CREATED_TIME TIMESTAMP(0) NULL ,

Loading…
Cancel
Save