revert Added query for set foreign key
task-fixes
parent d47c7aab6a
commit 548aba7da9

@ -39,7 +39,5 @@ CREATE TABLE IF NOT EXISTS DM_DEVICE_CERTIFICATE (
TENANT_ID INTEGER DEFAULT 0, TENANT_ID INTEGER DEFAULT 0,
DEVICE_IDENTIFIER VARCHAR(300), DEVICE_IDENTIFIER VARCHAR(300),
USERNAME VARCHAR(500) DEFAULT NULL, USERNAME VARCHAR(500) DEFAULT NULL,
PRIMARY KEY (ID), 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
); );

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

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

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

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

Loading…
Cancel
Save