You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-02 22:49:09 +02:00
All: Allow attaching files of unknown mime type
This commit is contained in:
@@ -202,7 +202,7 @@ class JoplinDatabase extends Database {
|
||||
// default value and thus might cause problems. In that case, the default value
|
||||
// must be set in the synchronizer too.
|
||||
|
||||
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6];
|
||||
const existingDatabaseVersions = [0, 1, 2, 3, 4, 5, 6, 7];
|
||||
|
||||
let currentVersionIndex = existingDatabaseVersions.indexOf(fromVersion);
|
||||
if (currentVersionIndex == existingDatabaseVersions.length - 1) return false;
|
||||
@@ -228,7 +228,7 @@ class JoplinDatabase extends Database {
|
||||
);
|
||||
`;
|
||||
|
||||
queries.push({ sql: 'DROP TABLE deleted_items' });
|
||||
// queries.push({ sql: 'DROP TABLE deleted_items' });
|
||||
queries.push({ sql: this.sqlStringToLines(newTableSql)[0] });
|
||||
queries.push({ sql: "CREATE INDEX deleted_items_sync_target ON deleted_items (sync_target)" });
|
||||
}
|
||||
@@ -259,6 +259,10 @@ class JoplinDatabase extends Database {
|
||||
queries.push('CREATE INDEX alarm_note_id ON alarms (note_id)');
|
||||
}
|
||||
|
||||
if (targetVersion == 7) {
|
||||
queries.push('ALTER TABLE resources ADD COLUMN file_extension TEXT NOT NULL DEFAULT ""');
|
||||
}
|
||||
|
||||
queries.push({ sql: 'UPDATE version SET version = ?', params: [targetVersion] });
|
||||
await this.transactionExecBatch(queries);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user