mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 01:18:44 +02:00
sync fixes
This commit is contained in:
parent
91e78998d1
commit
42e85aefdc
@ -7,7 +7,9 @@ CREATE TABLE IF NOT EXISTS "etapi_tokens"
|
||||
utcDateModified TEXT NOT NULL,
|
||||
isDeleted INT NOT NULL DEFAULT 0);
|
||||
|
||||
INSERT INTO etapi_tokens (etapiTokenId, name, tokenHash, utcDateCreated, utcDateModified, isDeleted)
|
||||
INSERT INTO etapi_tokens (etapiTokenId, name, tokenHash, utcDateCreated, utcDateModified, isDeleted)
|
||||
SELECT apiTokenId, 'Trilium Sender', token, utcDateCreated, utcDateCreated, isDeleted FROM api_tokens;
|
||||
|
||||
DROP TABLE api_tokens;
|
||||
|
||||
UPDATE entity_changes SET entityName = 'etapi_tokens' WHERE entityName = 'api_tokens';
|
||||
|
@ -16,6 +16,7 @@ CREATE TABLE IF NOT EXISTS "etapi_tokens"
|
||||
name TEXT NOT NULL,
|
||||
tokenHash TEXT NOT NULL,
|
||||
utcDateCreated TEXT NOT NULL,
|
||||
utcDateModified TEXT NOT NULL,
|
||||
isDeleted INT NOT NULL DEFAULT 0);
|
||||
CREATE TABLE IF NOT EXISTS "branches" (
|
||||
`branchId` TEXT NOT NULL,
|
||||
|
@ -47,8 +47,8 @@ function checkContentHashes(otherHashes) {
|
||||
const failedChecks = [];
|
||||
|
||||
for (const entityName in entityHashes) {
|
||||
const thisSectorHashes = entityHashes[entityName];
|
||||
const otherSectorHashes = otherHashes[entityName];
|
||||
const thisSectorHashes = entityHashes[entityName] || {};
|
||||
const otherSectorHashes = otherHashes[entityName] || {};
|
||||
|
||||
const sectors = new Set(Object.keys(thisSectorHashes).concat(Object.keys(otherSectorHashes)));
|
||||
|
||||
|
@ -250,11 +250,6 @@ async function checkContentHash(syncContext) {
|
||||
|
||||
const failedChecks = contentHashService.checkContentHashes(resp.entityHashes);
|
||||
|
||||
process.exit(0);
|
||||
throw new Error("AAAA");
|
||||
|
||||
return;
|
||||
|
||||
if (failedChecks.length > 0) {
|
||||
// before requeuing sectors make sure the entity changes are correct
|
||||
const consistencyChecks = require("./consistency_checks");
|
||||
|
Loading…
x
Reference in New Issue
Block a user