mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 09:58:32 +02:00
more fixes to migration
This commit is contained in:
parent
f49963dc67
commit
14625cc613
@ -1,11 +1,11 @@
|
|||||||
DROP TABLE anchors;
|
DROP TABLE IF EXISTS anchors;
|
||||||
DROP TABLE attachments;
|
DROP TABLE IF EXISTS attachments;
|
||||||
DROP TABLE bookmarks;
|
DROP TABLE IF EXISTS bookmarks;
|
||||||
DROP TABLE custom_properties;
|
DROP TABLE IF EXISTS custom_properties;
|
||||||
DROP TABLE deletions;
|
DROP TABLE IF EXISTS deletions;
|
||||||
DROP TABLE deletions_attachments;
|
DROP TABLE IF EXISTS deletions_attachments;
|
||||||
DROP TABLE formatting;
|
DROP TABLE IF EXISTS formatting;
|
||||||
DROP TABLE icons;
|
DROP TABLE IF EXISTS icons;
|
||||||
DROP TABLE tags;
|
DROP TABLE IF EXISTS tags;
|
||||||
DROP TABLE tags_notes;
|
DROP TABLE IF EXISTS tags_notes;
|
||||||
DROP TABLE tasks;
|
DROP TABLE IF EXISTS tasks;
|
@ -21,7 +21,6 @@ router.get('/:noteId', auth.checkApiAuth, async (req, res, next) => {
|
|||||||
|
|
||||||
res.send({
|
res.send({
|
||||||
'detail': detail,
|
'detail': detail,
|
||||||
'links': await sql.getResults("select * from links where note_id = ? order by note_offset", [noteId]),
|
|
||||||
'images': await sql.getResults("select * from images where note_id = ? order by note_offset", [noteId])
|
'images': await sql.getResults("select * from images where note_id = ? order by note_offset", [noteId])
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -22,9 +22,9 @@ async function migrate() {
|
|||||||
const name = match[2];
|
const name = match[2];
|
||||||
|
|
||||||
const migrationRecord = {
|
const migrationRecord = {
|
||||||
'db_version': dbVersion,
|
dbVersion: dbVersion,
|
||||||
'name': name,
|
name: name,
|
||||||
'file': file
|
file: file
|
||||||
};
|
};
|
||||||
|
|
||||||
migrations.push(migrationRecord);
|
migrations.push(migrationRecord);
|
||||||
@ -44,6 +44,8 @@ async function migrate() {
|
|||||||
|
|
||||||
await sql.executeScript(migrationSql);
|
await sql.executeScript(migrationSql);
|
||||||
|
|
||||||
|
await sql.setOption("db_version", mig.dbVersion);
|
||||||
|
|
||||||
await sql.commit();
|
await sql.commit();
|
||||||
|
|
||||||
mig['success'] = true;
|
mig['success'] = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user