Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paulr34 committed Aug 2, 2024
1 parent 08c1ed0 commit cd3e3b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src-electron/db/query-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ async function getEndpointCompositionIdByCode(db, deviceType) {
function insertDeviceComposition(db, deviceType, endpointCompositionId) {
const insertQuery = `
INSERT INTO DEVICE_COMPOSITION (CODE, ENDPOINT_COMPOSITION_REF)
VALUES (?, ?, ?)
VALUES (?, ?)
`
return dbApi.dbInsert(db, insertQuery, [
parseInt(deviceType.childDeviceId, 16),
Expand Down
4 changes: 2 additions & 2 deletions src-electron/db/zap-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ CREATE TABLE IF NOT EXISTS "ENDPOINT_COMPOSITION" (
"DEVICE_TYPE_REF" integer,
"TYPE" text,
"CODE" integer,
FOREIGN KEY ("PACKAGE_REF") REFERENCES "PACKAGE"("PACKAGE_ID") ON DELETE CASCADE ON UPDATE CASCADE
FOREIGN KEY ("DEVICE_TYPE_REF") REFERENCES "DEVICE_TYPE"("DEVICE_TYPE_ID") ON DELETE CASCADE
);
/*
This table defines the composition of devices within the system.
Expand All @@ -400,7 +400,7 @@ CREATE TABLE IF NOT EXISTS "DEVICE_COMPOSITION" (
"CONFORMANCE" text,
"CONSTRAINT" integer,
FOREIGN KEY ("ENDPOINT_COMPOSITION_REF") REFERENCES "ENDPOINT_COMPOSITION"("ENDPOINT_COMPOSITION_ID") ON DELETE CASCADE
FOREIGN KEY ("PACKAGE_REF") REFERENCES "PACKAGE"("PACKAGE_ID") ON DELETE CASCADE ON UPDATE CASCADE
FOREIGN KEY ("DEVICE_TYPE_REF") REFERENCES "DEVICE_TYPE"("DEVICE_TYPE_ID") ON DELETE CASCADE
);

/*
Expand Down

0 comments on commit cd3e3b1

Please sign in to comment.