Add missing device identifier column to dbscripts (#189)

## Purpose
device identifier column is missing in dm_device_certificate table

Co-authored-by: prathabanKavin <kavinprathaban025@gmail.com>
Reviewed-on: community/device-mgt-core#189
Co-authored-by: Kavin Prathaban <kavin@entgra.io>
Co-committed-by: Kavin Prathaban <kavin@entgra.io>
device-identifier
Kavin Prathaban 1 year ago committed by Pahansith Gunathilake
parent 8011170379
commit 1921b3e54d

@ -9,12 +9,13 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE (
);
CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE (
ID INTEGER auto_increment NOT NULL,
SERIAL_NUMBER VARCHAR(500) DEFAULT NULL,
CERTIFICATE BLOB DEFAULT NULL,
TENANT_ID INTEGER DEFAULT 0,
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID)
ID INTEGER auto_increment NOT NULL,
SERIAL_NUMBER VARCHAR(500) DEFAULT NULL,
CERTIFICATE BLOB DEFAULT NULL,
TENANT_ID INTEGER DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID)
);
CREATE TABLE IF NOT EXISTS DM_GROUP (

@ -21,9 +21,10 @@ IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[D
CREATE TABLE DM_DEVICE_CERTIFICATE (
ID INTEGER IDENTITY(1,1) NOT NULL,
SERIAL_NUMBER VARCHAR(500) DEFAULT NULL,
CERTIFICATE VARBINARY(max) DEFAULT NULL,
TENANT_ID INTEGER DEFAULT 0,
USERNAME VARCHAR(500) DEFAULT NULL,
CERTIFICATE VARBINARY(max) DEFAULT NULL,
TENANT_ID INTEGER DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID)
);

@ -13,12 +13,13 @@ CREATE INDEX IDX_DEVICE_NAME ON DM_DEVICE_TYPE (NAME);
CREATE INDEX IDX_DEVICE_TYPE_DEVICE_NAME ON DM_DEVICE_TYPE(ID, NAME);
CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE (
ID INTEGER auto_increment NOT NULL,
SERIAL_NUMBER VARCHAR(500) DEFAULT NULL,
CERTIFICATE BLOB DEFAULT NULL,
TENANT_ID INTEGER DEFAULT 0,
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID)
ID INTEGER auto_increment NOT NULL,
SERIAL_NUMBER VARCHAR(500) DEFAULT NULL,
CERTIFICATE BLOB DEFAULT NULL,
TENANT_ID INTEGER DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID)
)ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS DM_GROUP (

@ -24,10 +24,11 @@ WHEN (NEW.ID IS NULL)
/
CREATE TABLE DM_DEVICE_CERTIFICATE (
ID NUMBER(10) NOT NULL,
SERIAL_NUMBER VARCHAR2(500) DEFAULT NULL,
CERTIFICATE BLOB DEFAULT NULL,
ID NUMBER(10) NOT NULL,
SERIAL_NUMBER VARCHAR2(500) DEFAULT NULL,
CERTIFICATE BLOB DEFAULT NULL,
TENANT_ID NUMBER(10) DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR2(500) DEFAULT NULL,
PRIMARY KEY (ID)
)

@ -830,4 +830,15 @@ CREATE TABLE SUB_OPERATION_TEMPLATE (
-- END OF SUB_OPERATION_TEMPLATE TABLE--
CREATE SEQUENCE DM_DEVICE_CERTIFICATE_seq;
CREATE TABLE DM_DEVICE_CERTIFICATE (
ID NUMBER(10) NOT NULL,
SERIAL_NUMBER VARCHAR2(500) DEFAULT NULL,
CERTIFICATE BLOB DEFAULT NULL,
TENANT_ID NUMBER(10) DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR2(500) DEFAULT NULL,
PRIMARY KEY (ID)
)

Loading…
Cancel
Save