1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-02 22:49:09 +02:00

All: Fixes #371 (sort of): Allow resources greater than 10 MB but they won't be synced on mobile

This commit is contained in:
Laurent Cozic
2019-05-12 01:15:52 +01:00
parent 553a26eb63
commit 565dfba8c9
9 changed files with 91 additions and 20 deletions

View File

@@ -263,7 +263,7 @@ class JoplinDatabase extends Database {
// must be set in the synchronizer too.
// Note: v16 and v17 don't do anything. They were used to debug an issue.
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21];
let currentVersionIndex = existingDatabaseVersions.indexOf(fromVersion);
@@ -560,6 +560,10 @@ class JoplinDatabase extends Database {
queries.push({ sql: 'INSERT INTO migrations (number, created_time, updated_time) VALUES (20, ?, ?)', params: [timestamp, timestamp] });
}
if (targetVersion == 21) {
queries.push('ALTER TABLE sync_items ADD COLUMN item_location INT NOT NULL DEFAULT 1');
}
queries.push({ sql: 'UPDATE version SET version = ?', params: [targetVersion] });
try {