diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
commit | 62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch) | |
tree | c45c35d35d7a3e32621fba06edc63646930c8efd /server/initializers/migrator.ts | |
parent | 84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff) | |
download | PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.gz PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.zst PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.zip |
Correctly migrate to fs-extra
Diffstat (limited to 'server/initializers/migrator.ts')
-rw-r--r-- | server/initializers/migrator.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/initializers/migrator.ts b/server/initializers/migrator.ts index 539e2bc8f..adc2f9fb3 100644 --- a/server/initializers/migrator.ts +++ b/server/initializers/migrator.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import * as path from 'path' | 1 | import * as path from 'path' |
2 | import { readdirPromise } from '../helpers/core-utils' | ||
3 | import { logger } from '../helpers/logger' | 2 | import { logger } from '../helpers/logger' |
4 | import { LAST_MIGRATION_VERSION } from './constants' | 3 | import { LAST_MIGRATION_VERSION } from './constants' |
5 | import { sequelizeTypescript } from './database' | 4 | import { sequelizeTypescript } from './database' |
5 | import { readdir } from 'fs-extra' | ||
6 | 6 | ||
7 | async function migrate () { | 7 | async function migrate () { |
8 | const tables = await sequelizeTypescript.getQueryInterface().showAllTables() | 8 | const tables = await sequelizeTypescript.getQueryInterface().showAllTables() |
@@ -52,7 +52,7 @@ export { | |||
52 | // --------------------------------------------------------------------------- | 52 | // --------------------------------------------------------------------------- |
53 | 53 | ||
54 | async function getMigrationScripts () { | 54 | async function getMigrationScripts () { |
55 | const files = await readdirPromise(path.join(__dirname, 'migrations')) | 55 | const files = await readdir(path.join(__dirname, 'migrations')) |
56 | const filesToMigrate: { | 56 | const filesToMigrate: { |
57 | version: string, | 57 | version: string, |
58 | script: string | 58 | script: string |