aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/migrator.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
commit62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch)
treec45c35d35d7a3e32621fba06edc63646930c8efd /server/initializers/migrator.ts
parent84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff)
downloadPeerTube-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.ts4
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 @@
1import * as path from 'path' 1import * as path from 'path'
2import { readdirPromise } from '../helpers/core-utils'
3import { logger } from '../helpers/logger' 2import { logger } from '../helpers/logger'
4import { LAST_MIGRATION_VERSION } from './constants' 3import { LAST_MIGRATION_VERSION } from './constants'
5import { sequelizeTypescript } from './database' 4import { sequelizeTypescript } from './database'
5import { readdir } from 'fs-extra'
6 6
7async function migrate () { 7async 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
54async function getMigrationScripts () { 54async 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