add device subtype table in feature's dbscripts

scep-fix3
kavindya_devindi 2 years ago
parent 9ab437a324
commit 0c0300e2fc

@ -786,4 +786,16 @@ CREATE TABLE IF NOT EXISTS DYNAMIC_TASK_PROPERTIES (
CONSTRAINT FK_DYNAMIC_TASK_TASK_PROPERTIES FOREIGN KEY (DYNAMIC_TASK_ID) REFERENCES
DYNAMIC_TASK (DYNAMIC_TASK_ID) ON DELETE CASCADE ON UPDATE CASCADE
);
-- END OF DYNAMIC TASK TABLE--
-- END OF DYNAMIC TASK TABLE--
-- DM_DEVICE_SUB_TYPE TABLE--
CREATE TABLE IF NOT EXISTS DM_DEVICE_SUB_TYPE (
TENANT_ID INT DEFAULT 0,
SUB_TYPE_ID INT NOT NULL,
DEVICE_TYPE VARCHAR(25) NOT NULL,
SUB_TYPE_NAME VARCHAR(45) NOT NULL,
TYPE_DEFINITION TEXT NOT NULL,
PRIMARY KEY (SUB_TYPE_ID,DEVICE_TYPE)
);
-- END OF DM_DEVICE_SUB_TYPE TABLE--

@ -753,4 +753,17 @@ CREATE TABLE DYNAMIC_TASK_PROPERTIES (
CONSTRAINT FK_DYNAMIC_TASK_TASK_PROPERTIES FOREIGN KEY (DYNAMIC_TASK_ID) REFERENCES
DYNAMIC_TASK (DYNAMIC_TASK_ID) ON DELETE CASCADE ON UPDATE CASCADE
);
-- END OF DYNAMIC TASK TABLE--
-- END OF DYNAMIC TASK TABLE--
-- DM_DEVICE_SUB_TYPE TABLE--
IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[DM_DEVICE_SUB_TYPE]') AND TYPE IN (N'U'))
CREATE TABLE DM_DEVICE_SUB_TYPE (
TENANT_ID INT DEFAULT 0,
SUB_TYPE_ID INT NOT NULL,
DEVICE_TYPE VARCHAR(25) NOT NULL,
SUB_TYPE_NAME VARCHAR(45) NOT NULL,
TYPE_DEFINITION TEXT NOT NULL,
PRIMARY KEY (SUB_TYPE_ID,DEVICE_TYPE)
);
-- END OF DM_DEVICE_SUB_TYPE TABLE--

@ -851,3 +851,15 @@ CREATE TABLE IF NOT EXISTS DYNAMIC_TASK_PROPERTIES (
DYNAMIC_TASK (DYNAMIC_TASK_ID) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;
-- END OF DYNAMIC TASK TABLE--
-- DM_DEVICE_SUB_TYPE TABLE--
CREATE TABLE IF NOT EXISTS DM_DEVICE_SUB_TYPE (
TENANT_ID INT DEFAULT 0,
SUB_TYPE_ID INT NOT NULL,
DEVICE_TYPE VARCHAR(25) NOT NULL,
SUB_TYPE_NAME VARCHAR(45) NOT NULL,
TYPE_DEFINITION TEXT NOT NULL,
PRIMARY KEY (SUB_TYPE_ID,DEVICE_TYPE)
) ENGINE=InnoDB;
-- END OF DM_DEVICE_SUB_TYPE TABLE--

@ -1119,3 +1119,15 @@ CREATE TABLE IF NOT EXISTS DYNAMIC_TASK_PROPERTIES (
DYNAMIC_TASK (DYNAMIC_TASK_ID) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;
-- END OF DYNAMIC TASK TABLE--
-- DM_DEVICE_SUB_TYPE TABLE--
CREATE TABLE IF NOT EXISTS DM_DEVICE_SUB_TYPE (
TENANT_ID INT DEFAULT 0,
SUB_TYPE_ID INT NOT NULL,
DEVICE_TYPE VARCHAR(25) NOT NULL,
SUB_TYPE_NAME VARCHAR(45) NOT NULL,
TYPE_DEFINITION TEXT NOT NULL,
PRIMARY KEY (SUB_TYPE_ID,DEVICE_TYPE)
) ENGINE=InnoDB;
-- END OF DM_DEVICE_SUB_TYPE TABLE--

@ -772,3 +772,16 @@ CREATE TABLE IF NOT EXISTS DYNAMIC_TASK_PROPERTIES (
DYNAMIC_TASK (DYNAMIC_TASK_ID) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB;
-- END OF DYNAMIC TASK TABLE--
-- DM_DEVICE_SUB_TYPE TABLE--
CREATE TABLE IF NOT EXISTS DM_DEVICE_SUB_TYPE (
TENANT_ID INT DEFAULT 0,
SUB_TYPE_ID INT NOT NULL,
DEVICE_TYPE VARCHAR(25) NOT NULL,
SUB_TYPE_NAME VARCHAR(45) NOT NULL,
TYPE_DEFINITION TEXT NOT NULL,
PRIMARY KEY (SUB_TYPE_ID,DEVICE_TYPE)
) ENGINE=InnoDB;
-- END OF DM_DEVICE_SUB_TYPE TABLE--

Loading…
Cancel
Save