Project

General

Profile

Actions

Bug #11845

closed

Error when executing sql query for creating DM_DEVICE_TAG_MAPPING table against SQL DB

Added by Arshana Atapattu 26 days ago. Updated 25 days ago.

Status:
Closed
Priority:
High
Start date:
29/08/2024
Due date:
30/08/2024
% Done:

100%

Estimated time:
0:30 h
Spent time:
Device Type:
Component:
Type:

Description

Cannot execute the query for creating the table DM_DEVICE_TAG_MAPPING with sql DB
it throws a incompatible error [1]

Code location: https://repository.entgra.net/community/device-mgt-core/src/commit/cfa40c0d2be0c6b58c94941f42ca2c7a3ebe81bd/features/device-mgt/io.entgra.device.mgt.core.device.mgt.basics.feature/src/main/resources/dbscripts/cdm/mysql.sql#L965

Query: [2]

Related PR: https://repository.entgra.net/community/device-mgt-core/pulls/492/files

[1]
[1]

[2]

-- DM_TAG TABLE --
CREATE TABLE IF NOT EXISTS DM_TAG (
ID BIGINT AUTO_INCREMENT PRIMARY KEY,
NAME VARCHAR NOT NULL,
DESCRIPTION VARCHAR NULL,
TENANT_ID INT NOT NULL,
CONSTRAINT DM_TAG_NAME_TENANT_UNIQUE UNIQUE (NAME, TENANT_ID)
);
-- END OF DM_TAG TABLE --

-- DM_DEVICE_TAG_MAPPING TABLE --
CREATE TABLE IF NOT EXISTS DM_DEVICE_TAG_MAPPING (
ENROLMENT_ID BIGINT NOT NULL,
TAG_ID BIGINT NOT NULL,
TENANT_ID INT NOT NULL,
PRIMARY KEY (ENROLMENT_ID, TAG_ID, TENANT_ID),
FOREIGN KEY (ENROLMENT_ID) REFERENCES DM_ENROLMENT(ID),
FOREIGN KEY (TAG_ID) REFERENCES DM_TAG(ID) ON DELETE CASCADE
);
-- END OF DM_DEVICE_TAG_MAPPING TABLE --


Files

Screenshot from 2024-08-29 08-42-30.png (101 KB) Screenshot from 2024-08-29 08-42-30.png [1] Arshana Atapattu, 29/08/2024 11:05 AM
Actions #1

Updated by Gimhan Wijayawardana 26 days ago

  • % Done changed from 0 to 100
  • Estimated time set to 0:30 h
Actions #2

Updated by Gimhan Wijayawardana 26 days ago

  • Due date set to 30/08/2024
Actions #3

Updated by Lasantha Dharmakeerthi 26 days ago

This issue has been fixed with the following PR.

https://repository.entgra.net/community/device-mgt-core/pulls/502

Actions #4

Updated by Lasantha Dharmakeerthi 26 days ago

  • Status changed from New to QA
Actions #5

Updated by Arshana Atapattu 25 days ago

  • Status changed from QA to QA Accept

Fix is working

Actions #6

Updated by Arshana Atapattu 25 days ago

  • Status changed from QA Accept to Closed

Closing due to QA accept

Actions

Also available in: Atom PDF