aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/database.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-27 09:47:21 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:53 +0100
commit74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf (patch)
treefdbc4ed5894f95b0bbdaa83a7f4c3a1e45c75ff6 /server/initializers/database.ts
parentdf1966c9b48fd3cb3e0ec227bac97065d0122d78 (diff)
downloadPeerTube-74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf.tar.gz
PeerTube-74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf.tar.zst
PeerTube-74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf.zip
Add activitypub migration script
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',