2018-04-27 21:25:04 +00:00
|
|
|
const Migrations0DatabaseWithAttachmentData = require('./migrations_0_database_with_attachment_data');
|
|
|
|
const Migrations1DatabaseWithoutAttachmentData = require('./migrations_1_database_without_attachment_data');
|
2018-03-30 20:31:33 +00:00
|
|
|
|
|
|
|
exports.getPlaceholderMigrations = () => {
|
2018-04-27 21:25:04 +00:00
|
|
|
const last0MigrationVersion = Migrations0DatabaseWithAttachmentData.getLatestVersion();
|
|
|
|
const last1MigrationVersion = Migrations1DatabaseWithoutAttachmentData.getLatestVersion();
|
2018-03-30 20:31:33 +00:00
|
|
|
|
|
|
|
const lastMigrationVersion = last1MigrationVersion || last0MigrationVersion;
|
|
|
|
|
2018-04-27 21:25:04 +00:00
|
|
|
return [
|
|
|
|
{
|
|
|
|
version: lastMigrationVersion,
|
|
|
|
migrate() {
|
|
|
|
throw new Error(
|
|
|
|
'Unexpected invocation of placeholder migration!' +
|
|
|
|
'\n\nMigrations must explicitly be run upon application startup instead' +
|
|
|
|
' of implicitly via Backbone IndexedDB adapter at any time.'
|
|
|
|
);
|
|
|
|
},
|
2018-03-30 20:31:33 +00:00
|
|
|
},
|
2018-04-27 21:25:04 +00:00
|
|
|
];
|
2018-03-30 20:31:33 +00:00
|
|
|
};
|