aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/database.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/database.ts')
-rw-r--r--server/initializers/database.ts6
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
31const username = CONFIG.DATABASE.USERNAME 31const username = CONFIG.DATABASE.USERNAME
32const password = CONFIG.DATABASE.PASSWORD 32const password = CONFIG.DATABASE.PASSWORD
33 33
34const database: { 34export 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
58const database: PeerTubeDatabase = {}
57 59
58const sequelize = new Sequelize(dbname, username, password, { 60const sequelize = new Sequelize(dbname, username, password, {
59 dialect: 'postgres', 61 dialect: 'postgres',