
This is not 100% reliable as database connections are closed in a separate
thread according to the documentation:
- https://developer.mozilla.org/en-US/docs/Web/API/IDBDatabase/close
- https://stackoverflow.com/a/18639298
- 80c7a06d5c/backbone-indexeddb.js (L558-L565)
16 lines
333 B
JavaScript
16 lines
333 B
JavaScript
const { runMigrations } = require('./run_migrations');
|
|
|
|
|
|
exports.migrations = [
|
|
{
|
|
version: 18,
|
|
async migrate(transaction, next) {
|
|
console.log('Migration 18');
|
|
next();
|
|
},
|
|
},
|
|
];
|
|
|
|
exports.run = ({ Backbone, closeDatabase, Database } = {}) =>
|
|
runMigrations({ Backbone, closeDatabase, database: Database });
|