diff options
Diffstat (limited to 'server/initializers/database.ts')
-rw-r--r-- | server/initializers/database.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/server/initializers/database.ts b/server/initializers/database.ts index 141566c3a..52e766394 100644 --- a/server/initializers/database.ts +++ b/server/initializers/database.ts | |||
@@ -15,8 +15,9 @@ import { BlacklistedVideoModel } from './../models/video/video-blacklist-interfa | |||
15 | import { VideoFileModel } from './../models/video/video-file-interface' | 15 | import { VideoFileModel } from './../models/video/video-file-interface' |
16 | import { VideoAbuseModel } from './../models/video/video-abuse-interface' | 16 | import { VideoAbuseModel } from './../models/video/video-abuse-interface' |
17 | import { VideoChannelModel } from './../models/video/video-channel-interface' | 17 | import { VideoChannelModel } from './../models/video/video-channel-interface' |
18 | import { UserModel } from './../models/user/user-interface' | 18 | import { UserModel } from '../models/account/user-interface' |
19 | import { UserVideoRateModel } from './../models/user/user-video-rate-interface' | 19 | import { AccountVideoRateModel } from '../models/account/account-video-rate-interface' |
20 | import { AccountFollowModel } from '../models/account/account-follow-interface' | ||
20 | import { TagModel } from './../models/video/tag-interface' | 21 | import { TagModel } from './../models/video/tag-interface' |
21 | import { RequestModel } from './../models/request/request-interface' | 22 | import { RequestModel } from './../models/request/request-interface' |
22 | import { RequestVideoQaduModel } from './../models/request/request-video-qadu-interface' | 23 | import { RequestVideoQaduModel } from './../models/request/request-video-qadu-interface' |
@@ -26,7 +27,7 @@ import { PodModel } from './../models/pod/pod-interface' | |||
26 | import { OAuthTokenModel } from './../models/oauth/oauth-token-interface' | 27 | import { OAuthTokenModel } from './../models/oauth/oauth-token-interface' |
27 | import { OAuthClientModel } from './../models/oauth/oauth-client-interface' | 28 | import { OAuthClientModel } from './../models/oauth/oauth-client-interface' |
28 | import { JobModel } from './../models/job/job-interface' | 29 | import { JobModel } from './../models/job/job-interface' |
29 | import { AuthorModel } from './../models/video/author-interface' | 30 | import { AccountModel } from './../models/account/account-interface' |
30 | import { ApplicationModel } from './../models/application/application-interface' | 31 | import { ApplicationModel } from './../models/application/application-interface' |
31 | 32 | ||
32 | const dbname = CONFIG.DATABASE.DBNAME | 33 | const dbname = CONFIG.DATABASE.DBNAME |
@@ -38,7 +39,7 @@ const database: { | |||
38 | init?: (silent: boolean) => Promise<void>, | 39 | init?: (silent: boolean) => Promise<void>, |
39 | 40 | ||
40 | Application?: ApplicationModel, | 41 | Application?: ApplicationModel, |
41 | Author?: AuthorModel, | 42 | Account?: AccountModel, |
42 | Job?: JobModel, | 43 | Job?: JobModel, |
43 | OAuthClient?: OAuthClientModel, | 44 | OAuthClient?: OAuthClientModel, |
44 | OAuthToken?: OAuthTokenModel, | 45 | OAuthToken?: OAuthTokenModel, |
@@ -48,7 +49,8 @@ const database: { | |||
48 | RequestVideoQadu?: RequestVideoQaduModel, | 49 | RequestVideoQadu?: RequestVideoQaduModel, |
49 | Request?: RequestModel, | 50 | Request?: RequestModel, |
50 | Tag?: TagModel, | 51 | Tag?: TagModel, |
51 | UserVideoRate?: UserVideoRateModel, | 52 | AccountVideoRate?: AccountVideoRateModel, |
53 | AccountFollow?: AccountFollowModel, | ||
52 | User?: UserModel, | 54 | User?: UserModel, |
53 | VideoAbuse?: VideoAbuseModel, | 55 | VideoAbuse?: VideoAbuseModel, |
54 | VideoChannel?: VideoChannelModel, | 56 | VideoChannel?: VideoChannelModel, |
@@ -126,7 +128,7 @@ async function getModelFiles (modelDirectory: string) { | |||
126 | return true | 128 | return true |
127 | }) | 129 | }) |
128 | 130 | ||
129 | const tasks: Bluebird<any>[] = [] | 131 | const tasks: Promise<any>[] = [] |
130 | 132 | ||
131 | // For each directory we read it and append model in the modelFilePaths array | 133 | // For each directory we read it and append model in the modelFilePaths array |
132 | for (const directory of directories) { | 134 | for (const directory of directories) { |