     DM_OPERATION (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
 );
 
-DROP TABLE IF EXISTS DM_PROFILE_OPERATION;
-CREATE TABLE DM_PROFILE_OPERATION (
+CREATE TABLE IF NOT EXISTS  DM_PROFILE_OPERATION (
   OPERATION_ID INTEGER NOT NULL,
   ENABLED INTEGER NOT NULL DEFAULT 0,
   OPERATION_DETAILS BYTEA DEFAULT NULL,

DROP TABLE IF EXISTS DM_DEVICE_TYPE;
CREATE TABLE DM_DEVICE_TYPE (
  ID BIGSERIAL PRIMARY KEY,
  NAME VARCHAR(300) DEFAULT NULL
);

DROP TABLE IF EXISTS DM_DEVICE;
CREATE TABLE DM_DEVICE (
  ID                    BIGSERIAL NOT NULL PRIMARY KEY,
  DESCRIPTION           TEXT DEFAULT NULL,
  NAME                  VARCHAR(100) DEFAULT NULL,

  REFERENCES DM_DEVICE_TYPE (ID) ON DELETE NO ACTION ON UPDATE NO ACTION
);

CREATE TABLE IF NOT EXISTS  DM_OPERATION (
  ID BIGSERIAL NOT NULL PRIMARY KEY,
  TYPE VARCHAR(50) NOT NULL,
  CREATED_TIMESTAMP TIMESTAMP NOT NULL,
