add device subtype table in feature's dbscripts

vpp-v2
kavindya_devindi 2 years ago
parent 9ab437a324
commit 0c0300e2fc

@ -787,3 +787,15 @@ CREATE TABLE IF NOT EXISTS DYNAMIC_TASK_PROPERTIES (
DYNAMIC_TASK (DYNAMIC_TASK_ID) ON DELETE CASCADE ON UPDATE CASCADE
);
-- 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--

@ -754,3 +754,16 @@ CREATE TABLE DYNAMIC_TASK_PROPERTIES (
DYNAMIC_TASK (DYNAMIC_TASK_ID) ON DELETE CASCADE ON UPDATE CASCADE
);
-- 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