1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-27 10:32:58 +02:00
joplin/ReactNativeClient/lib/models/Migration.js
2019-07-29 15:43:53 +02:00

26 lines
466 B
JavaScript

const BaseModel = require('lib/BaseModel.js');
const migrationScripts = {
20: require('lib/migrations/20.js'),
};
class Migration extends BaseModel {
static tableName() {
return 'migrations';
}
static modelType() {
return BaseModel.TYPE_MIGRATION;
}
static migrationsToDo() {
return this.modelSelectAll('SELECT * FROM migrations ORDER BY number ASC');
}
static script(number) {
return migrationScripts[number];
}
}
module.exports = Migration;