diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-06-29 23:12:00 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-06-29 23:12:00 +0900 |
| commit | bb2d76ffa362dd0fb032d5faf975661b1c9a26f7 (patch) | |
| tree | d1c6c3b8cd8061c1318450a0aaab4c3aadf96ff7 /src/db | |
| parent | Revert "Update ormconfig.ts" (diff) | |
| download | sharkey-bb2d76ffa362dd0fb032d5faf975661b1c9a26f7.tar.gz sharkey-bb2d76ffa362dd0fb032d5faf975661b1c9a26f7.tar.bz2 sharkey-bb2d76ffa362dd0fb032d5faf975661b1c9a26f7.zip | |
Fix #4926
Diffstat (limited to 'src/db')
| -rw-r--r-- | src/db/postgre.ts | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/src/db/postgre.ts b/src/db/postgre.ts index c91cd8e1d7..925e3fcbfc 100644 --- a/src/db/postgre.ts +++ b/src/db/postgre.ts @@ -80,6 +80,51 @@ class MyCustomLogger implements Logger { } } +export const entities = [ + Meta, + Instance, + App, + AuthSession, + AccessToken, + User, + UserProfile, + UserKeypair, + UserPublickey, + UserList, + UserListJoining, + UserGroup, + UserGroupJoining, + UserGroupInvite, + UserNotePining, + Following, + FollowRequest, + Muting, + Blocking, + Note, + NoteFavorite, + NoteReaction, + NoteWatching, + NoteUnread, + Page, + PageLike, + Log, + DriveFile, + DriveFolder, + Poll, + PollVote, + Notification, + Emoji, + Hashtag, + SwSubscription, + AbuseUserReport, + RegistrationTicket, + MessagingMessage, + Signin, + ReversiGame, + ReversiMatching, + ...charts as any +]; + export function initDb(justBorrow = false, sync = false, log = false) { try { const conn = getConnection(); @@ -110,49 +155,6 @@ export function initDb(justBorrow = false, sync = false, log = false) { } : false, logging: log, logger: log ? new MyCustomLogger() : undefined, - entities: [ - Meta, - Instance, - App, - AuthSession, - AccessToken, - User, - UserProfile, - UserKeypair, - UserPublickey, - UserList, - UserListJoining, - UserGroup, - UserGroupJoining, - UserGroupInvite, - UserNotePining, - Following, - FollowRequest, - Muting, - Blocking, - Note, - NoteFavorite, - NoteReaction, - NoteWatching, - NoteUnread, - Page, - PageLike, - Log, - DriveFile, - DriveFolder, - Poll, - PollVote, - Notification, - Emoji, - Hashtag, - SwSubscription, - AbuseUserReport, - RegistrationTicket, - MessagingMessage, - Signin, - ReversiGame, - ReversiMatching, - ...charts as any - ] + entities: entities }); } |