diff options
author | Chocobozzz <me@florianbigard.com> | 2020-01-31 16:56:52 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-02-03 08:31:02 +0100 |
commit | a15871560f80e07386c1dabb8370cd2664ecfd1f (patch) | |
tree | 44440e140c9e43b0d7f97ade777a76e649e0553d /server/initializers/migrator.ts | |
parent | a22046d166805222ca76060e471b6cb3d419a32d (diff) | |
download | PeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.tar.gz PeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.tar.zst PeerTube-a15871560f80e07386c1dabb8370cd2664ecfd1f.zip |
Move to eslintcontain
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 1cb0116b7..77203ae24 100644 --- a/server/initializers/migrator.ts +++ b/server/initializers/migrator.ts | |||
@@ -20,7 +20,7 @@ async function migrate () { | |||
20 | } | 20 | } |
21 | 21 | ||
22 | const rows = await sequelizeTypescript.query<{ migrationVersion: number }>(query, options) | 22 | const rows = await sequelizeTypescript.query<{ migrationVersion: number }>(query, options) |
23 | if (rows && rows[0] && rows[0].migrationVersion) { | 23 | if (rows?.[0]?.migrationVersion) { |
24 | actualVersion = rows[0].migrationVersion | 24 | actualVersion = rows[0].migrationVersion |
25 | } | 25 | } |
26 | 26 | ||
@@ -60,7 +60,7 @@ export { | |||
60 | async function getMigrationScripts () { | 60 | async function getMigrationScripts () { |
61 | const files = await readdir(path.join(__dirname, 'migrations')) | 61 | const files = await readdir(path.join(__dirname, 'migrations')) |
62 | const filesToMigrate: { | 62 | const filesToMigrate: { |
63 | version: string, | 63 | version: string |
64 | script: string | 64 | script: string |
65 | }[] = [] | 65 | }[] = [] |
66 | 66 | ||