mirror of
https://github.com/zadam/trilium.git
synced 2024-12-25 16:51:16 +08:00
trim note_ids to 22 characters (there was a bug in nodejs backend which generated 32 character noteids)
This commit is contained in:
parent
a2f0a372a5
commit
a76e82e9a2
3 changed files with 7 additions and 4 deletions
6
migrations/0015__trim_note_ids.sql
Normal file
6
migrations/0015__trim_note_ids.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
UPDATE notes SET note_id = substr(note_id, 0, 22);
|
||||
UPDATE notes_tree SET note_id = substr(note_id, 0, 22), note_pid = substr(note_pid, 0, 22);
|
||||
UPDATE notes_history SET note_id = substr(note_id, 0, 22);
|
||||
UPDATE audit_log SET note_id = substr(note_id, 0, 22);
|
||||
UPDATE links SET note_id = substr(note_id, 0, 22);
|
||||
UPDATE images SET note_id = substr(note_id, 0, 22);
|
|
@ -13,9 +13,6 @@ router.get('/:full_load_time', auth.checkApiAuth, async (req, res, next) => {
|
|||
const row = await sql.getSingleResult("SELECT COUNT(*) AS 'count' FROM audit_log WHERE (browser_id IS NULL OR browser_id != ?) " +
|
||||
"AND date_modified >= ?", [browserId, fullLoadTime]);
|
||||
|
||||
console.log("SELECT COUNT(*) AS 'count' FROM audit_log WHERE (browser_id IS NULL OR browser_id != ?) " +
|
||||
"AND date_modified >= ?");
|
||||
|
||||
res.send({
|
||||
'changed': row.count > 0
|
||||
});
|
||||
|
|
|
@ -3,7 +3,7 @@ const sql = require('./sql');
|
|||
const fs = require('fs-extra');
|
||||
const log = require('./log');
|
||||
|
||||
const APP_DB_VERSION = 14;
|
||||
const APP_DB_VERSION = 15;
|
||||
const MIGRATIONS_DIR = "./migrations";
|
||||
|
||||
async function migrate() {
|
||||
|
|
Loading…
Reference in a new issue