UNPKG

540 BJavaScriptView Raw
1/**
2 * @copyright Copyright (c) 2019 Maxim Khorin <maksimovichu@gmail.com>
3 */
4'use strict';
5
6const Base = require('../base/Base');
7
8module.exports = class Migration extends Base {
9
10 constructor (config) {
11 super({
12 // migrator: [migrator]
13 ...config
14 });
15 }
16
17 getDb (id) {
18 return this.migrator.getDb(id || this.db);
19 }
20
21 apply () {
22 throw new Error('Need to override');
23 }
24
25 revert () {
26 throw new Error('Need to override');
27 }
28};
\No newline at end of file