mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-04 00:18:01 +01:00
c1aab06798
This sets up the typescript compiler. Allowing gradual migration to typescript. Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai> Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com> Co-authored-by: Fredrik Oseberg <fredrik.oseberg@getunleash.ai> Co-authored-by: Clint Checkett <clintchecketts@churchofjesuschrist.org> fixes: #676
18 lines
412 B
JavaScript
18 lines
412 B
JavaScript
'use strict';
|
|
|
|
require('db-migrate-shared').log.setLogLevel('error');
|
|
|
|
const { getInstance } = require('db-migrate');
|
|
|
|
function migrateDb({ db, databaseSchema = 'public' }) {
|
|
const custom = { ...db, schema: databaseSchema };
|
|
const dbmigrate = getInstance(true, {
|
|
cwd: __dirname,
|
|
config: { custom },
|
|
env: 'custom',
|
|
});
|
|
return dbmigrate.up();
|
|
}
|
|
|
|
module.exports = migrateDb;
|