diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 09:47:21 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | 74bb2cb8348d6794ed3a0e2ec94c8c9abdde82cf (patch) | |
tree | fdbc4ed5894f95b0bbdaa83a7f4c3a1e45c75ff6 /server/initializers/database.ts | |
parent | df1966c9b48fd3cb3e0ec227bac97065d0122d78 (diff) | |
download | PeerTube-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.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', |