From 42ef84e8a3e9737ac4e300a3670e7dea5de60cad Mon Sep 17 00:00:00 2001 From: prathabanKavin Date: Mon, 11 Sep 2023 08:51:04 +0530 Subject: [PATCH] Fix table DM_TRACCAR_UNSYNCED_DEVICES --- .../src/main/resources/dbscripts/cdm/mssql.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mssql.sql b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mssql.sql index eacceb2bc5f..d8c827f04d4 100644 --- a/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mssql.sql +++ b/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mssql.sql @@ -874,7 +874,8 @@ CREATE TABLE DM_DEVICE_SUB_TYPE ( -- END OF DM_DEVICE_SUB_TYPE TABLE-- -- DM_TRACCAR_UNSYNCED_DEVICES TABLE -- -CREATE TABLE IF NOT EXISTS DM_TRACCAR_UNSYNCED_DEVICES ( +IF NOT EXISTS (SELECT * FROM SYS.OBJECTS WHERE OBJECT_ID = OBJECT_ID(N'[DBO].[DM_TRACCAR_UNSYNCED_DEVICES]') AND TYPE IN (N'U')) +CREATE TABLE DM_TRACCAR_UNSYNCED_DEVICES ( ID INT NOT NULL IDENTITY(1,1), DEVICE_NAME VARCHAR(100) NOT NULL, IOTS_DEVICE_IDENTIFIER VARCHAR(300) NULL UNIQUE,