diff --git a/package.json b/package.json index a0315c42ae85..fc34d9d81542 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@indutny/sneequals": "3.2.0", "@popperjs/core": "2.11.6", "@react-spring/web": "9.5.5", - "@signalapp/better-sqlite3": "8.1.0", + "@signalapp/better-sqlite3": "8.1.1", "@signalapp/libsignal-client": "0.21.1", "@signalapp/ringrtc": "2.23.0", "@types/fabric": "4.5.3", diff --git a/ts/sql/migrations/41-uuid-keys.ts b/ts/sql/migrations/41-uuid-keys.ts index 925e4224b86f..036d27a6896f 100644 --- a/ts/sql/migrations/41-uuid-keys.ts +++ b/ts/sql/migrations/41-uuid-keys.ts @@ -138,7 +138,7 @@ export default function updateToSchemaVersion41( db.exec( ` - DELETE FROM items WHERE id = "identityKey" OR id = "registrationId"; + DELETE FROM items WHERE id = 'identityKey' OR id = 'registrationId'; ` ); }; diff --git a/ts/sql/migrations/index.ts b/ts/sql/migrations/index.ts index 31631ff583d2..6526e7181264 100644 --- a/ts/sql/migrations/index.ts +++ b/ts/sql/migrations/index.ts @@ -324,7 +324,7 @@ function updateToSchemaVersion7( number ) WHERE number IS NOT NULL; INSERT INTO sessions(id, number, json) - SELECT "+" || id, number, json FROM sessions_old; + SELECT '+' || id, number, json FROM sessions_old; DROP TABLE sessions_old; `); @@ -899,7 +899,7 @@ function updateToSchemaVersion20( // Drop triggers const triggers = db .prepare( - 'SELECT * FROM sqlite_master WHERE type = "trigger" AND tbl_name = "messages"' + "SELECT * FROM sqlite_master WHERE type = 'trigger' AND tbl_name = 'messages'" ) .all(); diff --git a/ts/test-node/sql_migrations_test.ts b/ts/test-node/sql_migrations_test.ts index e8dd0b7c6ac4..1a283d5ffc4a 100644 --- a/ts/test-node/sql_migrations_test.ts +++ b/ts/test-node/sql_migrations_test.ts @@ -719,7 +719,7 @@ describe('SQL migrations test', () => { updateToVersion(43); const { members, json: convoJSON } = db - .prepare('SELECT members, json FROM conversations WHERE id = "c"') + .prepare("SELECT members, json FROM conversations WHERE id = 'c'") .get(); assert.strictEqual(members, `${UUID_A} ${UUID_B}`); @@ -742,7 +742,7 @@ describe('SQL migrations test', () => { }); const { json: messageMJSON } = db - .prepare('SELECT json FROM messages WHERE id = "m"') + .prepare("SELECT json FROM messages WHERE id = 'm'") .get(); assert.deepStrictEqual(JSON.parse(messageMJSON), { @@ -770,7 +770,7 @@ describe('SQL migrations test', () => { }); const { json: messageNJSON } = db - .prepare('SELECT json FROM messages WHERE id = "n"') + .prepare("SELECT json FROM messages WHERE id = 'n'") .get(); assert.deepStrictEqual(JSON.parse(messageNJSON), { @@ -800,7 +800,7 @@ describe('SQL migrations test', () => { updateToVersion(43); const { json: messageMJSON } = db - .prepare('SELECT json FROM messages WHERE id = "m"') + .prepare("SELECT json FROM messages WHERE id = 'm'") .get(); assert.deepStrictEqual(JSON.parse(messageMJSON), { @@ -2368,9 +2368,9 @@ describe('SQL migrations test', () => { INSERT INTO sticker_packs (id, key, lastUsed) VALUES - ("a", "key-1", 1), - ("b", "key-2", 2), - ("c", "key-3", 3); + ('a', 'key-1', 1), + ('b', 'key-2', 2), + ('c', 'key-3', 3); ` ); @@ -2401,8 +2401,8 @@ describe('SQL migrations test', () => { .prepare( ` SELECT COUNT(*) FROM sqlite_schema - WHERE type = "table" - AND name = "groupCallRings" + WHERE type = 'table' + AND name = 'groupCallRings' ` ) .pluck(); diff --git a/yarn.lock b/yarn.lock index 9d0afba477f3..89621cf10eb4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2154,10 +2154,10 @@ "@react-spring/shared" "~9.5.5" "@react-spring/types" "~9.5.5" -"@signalapp/better-sqlite3@8.1.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@signalapp/better-sqlite3/-/better-sqlite3-8.1.0.tgz#6ddbb759e4bbd572b343dc0e740836bb5c8edf0d" - integrity sha512-3KRDCfrlvoLYuCQ0MzcCtnzVaaivvejz6/XjCzV3tbECzH8SIc1PBASEMHSy4nAeqjY8MpETIwScW1613kFJiA== +"@signalapp/better-sqlite3@8.1.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@signalapp/better-sqlite3/-/better-sqlite3-8.1.1.tgz#b39b9138bc79992d5e9707b246a67a1b88a18c49" + integrity sha512-k4njS/Vsr12Eow7G7TNBjJKSPU971DZQWGY4dfISdOBobAAiewstOwlqF3ZhpJznL6M3sri14MUM0iV1aZR15g== dependencies: bindings "^1.5.0" tar "^6.1.0"