mirror of
https://github.com/oxen-io/session-desktop.git
synced 2023-12-14 02:12:57 +01:00
Slight sql changes
This commit is contained in:
parent
06832e4978
commit
8225bf5847
1 changed files with 3 additions and 2 deletions
|
@ -843,7 +843,7 @@ async function updateToLokiSchemaVersion1(currentVersion, instance) {
|
|||
|
||||
async function updateLokiSchema(instance) {
|
||||
const result = await instance.get(
|
||||
"SELECT name FROM sqlite_master WHERE type = 'table' AND name='loki_schema'"
|
||||
"SELECT name FROM sqlite_master WHERE type = 'table' AND name='loki_schema';"
|
||||
);
|
||||
if (!result) {
|
||||
await createLokiSchemaTable(instance);
|
||||
|
@ -869,7 +869,8 @@ async function updateLokiSchema(instance) {
|
|||
|
||||
async function getLokiSchemaVersion(instance) {
|
||||
const result = await instance.get(
|
||||
'SELECT version FROM loki_schema WHERE version = (SELECT MAX(version) FROM loki_schema);'
|
||||
`SELECT version FROM loki_schema WHERE version =
|
||||
(SELECT MAX(version) FROM loki_schema);`
|
||||
);
|
||||
if (!result.version) {
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue