|
@@ -36,7 +36,7 @@ export class DBMigration extends SQLiteController {
|
|
|
const id = Number(m[1]);
|
|
const id = Number(m[1]);
|
|
|
if (id <= lastID) continue;
|
|
if (id <= lastID) continue;
|
|
|
|
|
|
|
|
- if (m[2] === 'sql') {
|
|
|
|
|
|
|
+ if (m[3] === 'sql') {
|
|
|
const migFilepath = path.join(migrationsDir, file);
|
|
const migFilepath = path.join(migrationsDir, file);
|
|
|
const migration = await fsp.readFile(migFilepath, { encoding: 'utf-8' });
|
|
const migration = await fsp.readFile(migFilepath, { encoding: 'utf-8' });
|
|
|
|
|
|
|
@@ -57,7 +57,6 @@ export class DBMigration extends SQLiteController {
|
|
|
const migFilepath = path.join(migrationsDir, file.substring(0, file.length - 3));
|
|
const migFilepath = path.join(migrationsDir, file.substring(0, file.length - 3));
|
|
|
const imp = require(migFilepath).default;
|
|
const imp = require(migFilepath).default;
|
|
|
if (typeof imp !== 'function') {
|
|
if (typeof imp !== 'function') {
|
|
|
- console.log('TYPE', typeof imp, 'KEYS', Object.keys(imp));
|
|
|
|
|
throw new MigrationException(`File ${file} is not a valid <MigrationRunner> implementation!`);
|
|
throw new MigrationException(`File ${file} is not a valid <MigrationRunner> implementation!`);
|
|
|
}
|
|
}
|
|
|
const mig = imp as MigrationRunner;
|
|
const mig = imp as MigrationRunner;
|