mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
added type and mime to note revisions
This commit is contained in:
parent
8d8ee2a87a
commit
9720868f5a
5
db/migrations/0087__add_type_mime_to_note_revision.sql
Normal file
5
db/migrations/0087__add_type_mime_to_note_revision.sql
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ALTER TABLE note_revisions ADD type TEXT DEFAULT '' NOT NULL;
|
||||||
|
ALTER TABLE note_revisions ADD mime TEXT DEFAULT '' NOT NULL;
|
||||||
|
|
||||||
|
UPDATE note_revisions SET type = (SELECT type FROM notes WHERE notes.noteId = note_revisions.noteId);
|
||||||
|
UPDATE note_revisions SET mime = (SELECT mime FROM notes WHERE notes.noteId = note_revisions.noteId);
|
@ -3,7 +3,7 @@
|
|||||||
const build = require('./build');
|
const build = require('./build');
|
||||||
const packageJson = require('../../package');
|
const packageJson = require('../../package');
|
||||||
|
|
||||||
const APP_DB_VERSION = 86;
|
const APP_DB_VERSION = 87;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
appVersion: packageJson.version,
|
appVersion: packageJson.version,
|
||||||
|
@ -180,6 +180,8 @@ async function saveNoteRevision(note) {
|
|||||||
// title and text should be decrypted now
|
// title and text should be decrypted now
|
||||||
title: note.title,
|
title: note.title,
|
||||||
content: note.content,
|
content: note.content,
|
||||||
|
type: note.type,
|
||||||
|
mime: note.mime,
|
||||||
isProtected: 0, // will be fixed in the protectNoteRevisions() call
|
isProtected: 0, // will be fixed in the protectNoteRevisions() call
|
||||||
dateModifiedFrom: note.dateModified,
|
dateModifiedFrom: note.dateModified,
|
||||||
dateModifiedTo: dateUtils.nowDate()
|
dateModifiedTo: dateUtils.nowDate()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user