|
|
|
@ -3,10 +3,10 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_TYPE (
|
|
|
|
|
NAME VARCHAR(300) DEFAULT NULL,
|
|
|
|
|
PROVIDER_TENANT_ID INTEGER DEFAULT 0,
|
|
|
|
|
SHARED_WITH_ALL_TENANTS BOOLEAN NOT NULL DEFAULT FALSE,
|
|
|
|
|
UNIQUE(NAME)
|
|
|
|
|
UNIQUE(NAME, PROVIDER_TENANT_ID)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
CREATE INDEX IDX_DEVICE_TYPE ON DM_DEVICE_TYPE (NAME);
|
|
|
|
|
CREATE INDEX IDX_DEVICE_TYPE ON DM_DEVICE_TYPE (NAME, PROVIDER_TENANT_ID);
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS DM_GROUP (
|
|
|
|
|
ID BIGSERIAL NOT NULL PRIMARY KEY,
|
|
|
|
|