revert Added query for set foreign key
pull/272/head
parent d47c7aab6a
commit 548aba7da9

@ -39,7 +39,5 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE (
TENANT_ID INTEGER DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_DM_DEVICE_DM_DEVICE_CERTIFICATE FOREIGN KEY (DEVICE_IDENTIFIER)
REFERENCES DM_DEVICE (DEVICE_IDENTIFICATION) ON DELETE NO ACTION ON UPDATE NO ACTION
PRIMARY KEY (ID)
);

@ -15,10 +15,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE (
TENANT_ID INTEGER DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_DM_DEVICE_DM_DEVICE_CERTIFICATE FOREIGN KEY (DEVICE_IDENTIFIER)
REFERENCES DM_DEVICE (DEVICE_IDENTIFICATION)
PRIMARY KEY (ID)
);
CREATE TABLE IF NOT EXISTS DM_GROUP (

@ -25,9 +25,7 @@ CREATE TABLE DM_DEVICE_CERTIFICATE (
TENANT_ID INTEGER DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_DM_DEVICE_DM_DEVICE_CERTIFICATE FOREIGN KEY (DEVICE_IDENTIFIER)
REFERENCES DM_DEVICE (DEVICE_IDENTIFICATION)
PRIMARY KEY (ID)
);
IF NOT EXISTS (SELECT * FROM SYS.INDEXES WHERE NAME = 'IDX_DEVICE_TYPE' AND OBJECT_ID = OBJECT_ID('DM_DEVICE_TYPE'))

@ -19,9 +19,7 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE (
TENANT_ID INTEGER DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_DM_DEVICE_DM_DEVICE_CERTIFICATE FOREIGN KEY (DEVICE_IDENTIFIER)
REFERENCES DM_DEVICE (DEVICE_IDENTIFICATION)
PRIMARY KEY (ID)
)ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS DM_GROUP (

@ -30,9 +30,7 @@ CREATE TABLE DM_DEVICE_CERTIFICATE (
TENANT_ID NUMBER(10) DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR2(500) DEFAULT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_DM_DEVICE_DM_DEVICE_CERTIFICATE FOREIGN KEY (DEVICE_IDENTIFIER)
REFERENCES DM_DEVICE (DEVICE_IDENTIFICATION)
PRIMARY KEY (ID)
)
/

@ -843,8 +843,6 @@ CREATE TABLE DM_DEVICE_CERTIFICATE (
TENANT_ID NUMBER(10) DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR2(500) DEFAULT NULL,
PRIMARY KEY (ID),
CONSTRAINT fk_DM_DEVICE_DM_DEVICE_CERTIFICATE FOREIGN KEY (DEVICE_IDENTIFIER)
REFERENCES DM_DEVICE (DEVICE_IDENTIFICATION)
PRIMARY KEY (ID)
)

Loading…
Cancel
Save