diff options
Diffstat (limited to 'server/initializers/database.ts')
-rw-r--r-- | server/initializers/database.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts index 5c757694e..9b9a81e26 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts | |||
@@ -31,7 +31,7 @@ const dbname = CONFIG.DATABASE.DBNAME | |||
31 | const username = CONFIG.DATABASE.USERNAME | 31 | const username = CONFIG.DATABASE.USERNAME |
32 | const password = CONFIG.DATABASE.PASSWORD | 32 | const password = CONFIG.DATABASE.PASSWORD |
33 | 33 | ||
34 | const database: { | 34 | export type PeerTubeDatabase = { |
35 | sequelize?: Sequelize.Sequelize, | 35 | sequelize?: Sequelize.Sequelize, |
36 | init?: (silent: boolean) => Promise<void>, | 36 | init?: (silent: boolean) => Promise<void>, |
37 | 37 | ||
@@ -53,7 +53,9 @@ const database: { | |||
53 | BlacklistedVideo?: BlacklistedVideoModel, | 53 | BlacklistedVideo?: BlacklistedVideoModel, |
54 | VideoTag?: VideoTagModel, | 54 | VideoTag?: VideoTagModel, |
55 | Video?: VideoModel | 55 | Video?: VideoModel |
56 | } = {} | 56 | } |
57 | |||
58 | const database: PeerTubeDatabase = {} | ||
57 | 59 | ||
58 | const sequelize = new Sequelize(dbname, username, password, { | 60 | const sequelize = new Sequelize(dbname, username, password, { |
59 | dialect: 'postgres', | 61 | dialect: 'postgres', |