import { AccountVideoRateModel } from '../models/account/account-video-rate-interface'
import { AccountFollowModel } from '../models/account/account-follow-interface'
import { TagModel } from './../models/video/tag-interface'
-import { PodModel } from './../models/pod/pod-interface'
+import { ServerModel } from '../models/server/server-interface'
import { OAuthTokenModel } from './../models/oauth/oauth-token-interface'
import { OAuthClientModel } from './../models/oauth/oauth-client-interface'
import { JobModel } from './../models/job/job-interface'
Job?: JobModel,
OAuthClient?: OAuthClientModel,
OAuthToken?: OAuthTokenModel,
- Pod?: PodModel,
+ Server?: ServerModel,
Tag?: TagModel,
AccountVideoRate?: AccountVideoRateModel,
AccountFollow?: AccountFollowModel,
for (const modelName of Object.keys(database)) {
if ('associate' in database[modelName]) {
- database[modelName].associate(database)
+ try {
+ database[modelName].associate(database)
+ } catch (err) {
+ logger.error('Cannot associate model %s.', modelName, err)
+ process.exit(0)
+ }
}
}