diff --git a/packages/backend/src/models/entities/AbuseUserReport.ts b/packages/backend/src/models/entities/AbuseUserReport.ts index 2e9db87b7e..522cc502cc 100644 --- a/packages/backend/src/models/entities/AbuseUserReport.ts +++ b/packages/backend/src/models/entities/AbuseUserReport.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('abuse_user_report') export class MiAbuseUserReport { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/AccessToken.ts b/packages/backend/src/models/entities/AccessToken.ts index 978e701eb8..08bd2483ee 100644 --- a/packages/backend/src/models/entities/AccessToken.ts +++ b/packages/backend/src/models/entities/AccessToken.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiApp } from './App.js'; -@Entity() +@Entity('access_token') export class MiAccessToken { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Ad.ts b/packages/backend/src/models/entities/Ad.ts index f348467732..2f84e7144e 100644 --- a/packages/backend/src/models/entities/Ad.ts +++ b/packages/backend/src/models/entities/Ad.ts @@ -6,7 +6,7 @@ import { Entity, Index, Column, PrimaryColumn } from 'typeorm'; import { id } from '../id.js'; -@Entity() +@Entity('ad') export class MiAd { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Announcement.ts b/packages/backend/src/models/entities/Announcement.ts index f6b8ed9029..9a2722b39c 100644 --- a/packages/backend/src/models/entities/Announcement.ts +++ b/packages/backend/src/models/entities/Announcement.ts @@ -7,7 +7,7 @@ import { Entity, Index, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('announcement') export class MiAnnouncement { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/AnnouncementRead.ts b/packages/backend/src/models/entities/AnnouncementRead.ts index 44309cc255..89dadaab37 100644 --- a/packages/backend/src/models/entities/AnnouncementRead.ts +++ b/packages/backend/src/models/entities/AnnouncementRead.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiAnnouncement } from './Announcement.js'; -@Entity() +@Entity('announcement_read') @Index(['userId', 'announcementId'], { unique: true }) export class MiAnnouncementRead { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Antenna.ts b/packages/backend/src/models/entities/Antenna.ts index bb80939ef2..e73a4d55c6 100644 --- a/packages/backend/src/models/entities/Antenna.ts +++ b/packages/backend/src/models/entities/Antenna.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiUserList } from './UserList.js'; -@Entity() +@Entity('antenna') export class MiAntenna { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/App.ts b/packages/backend/src/models/entities/App.ts index b267e8055d..99c41a2035 100644 --- a/packages/backend/src/models/entities/App.ts +++ b/packages/backend/src/models/entities/App.ts @@ -7,7 +7,7 @@ import { Entity, PrimaryColumn, Column, Index, ManyToOne } from 'typeorm'; import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('app') export class MiApp { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/AttestationChallenge.ts b/packages/backend/src/models/entities/AttestationChallenge.ts index 91ab142491..dace378eff 100644 --- a/packages/backend/src/models/entities/AttestationChallenge.ts +++ b/packages/backend/src/models/entities/AttestationChallenge.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('attestation_challenge') export class MiAttestationChallenge { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/AuthSession.ts b/packages/backend/src/models/entities/AuthSession.ts index 9c98c1ae9d..1aabf836db 100644 --- a/packages/backend/src/models/entities/AuthSession.ts +++ b/packages/backend/src/models/entities/AuthSession.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiApp } from './App.js'; -@Entity() +@Entity('auth_session') export class MiAuthSession { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Blocking.ts b/packages/backend/src/models/entities/Blocking.ts index 35ab20a068..8bedb4395c 100644 --- a/packages/backend/src/models/entities/Blocking.ts +++ b/packages/backend/src/models/entities/Blocking.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('blocking') @Index(['blockerId', 'blockeeId'], { unique: true }) export class MiBlocking { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Channel.ts b/packages/backend/src/models/entities/Channel.ts index 19635b4f02..9a89b650a9 100644 --- a/packages/backend/src/models/entities/Channel.ts +++ b/packages/backend/src/models/entities/Channel.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiDriveFile } from './DriveFile.js'; -@Entity() +@Entity('channel') export class MiChannel { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/ChannelFavorite.ts b/packages/backend/src/models/entities/ChannelFavorite.ts index a1383c87ba..c2be68ab7d 100644 --- a/packages/backend/src/models/entities/ChannelFavorite.ts +++ b/packages/backend/src/models/entities/ChannelFavorite.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiChannel } from './Channel.js'; -@Entity() +@Entity('channel_favorite') @Index(['userId', 'channelId'], { unique: true }) export class MiChannelFavorite { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/ChannelFollowing.ts b/packages/backend/src/models/entities/ChannelFollowing.ts index a2593a560c..dc33eb144b 100644 --- a/packages/backend/src/models/entities/ChannelFollowing.ts +++ b/packages/backend/src/models/entities/ChannelFollowing.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiChannel } from './Channel.js'; -@Entity() +@Entity('channel_following') @Index(['followerId', 'followeeId'], { unique: true }) export class MiChannelFollowing { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Clip.ts b/packages/backend/src/models/entities/Clip.ts index ea42d642f5..f8bc2f2173 100644 --- a/packages/backend/src/models/entities/Clip.ts +++ b/packages/backend/src/models/entities/Clip.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('clip') export class MiClip { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/ClipFavorite.ts b/packages/backend/src/models/entities/ClipFavorite.ts index 76b5f8f597..74d765411d 100644 --- a/packages/backend/src/models/entities/ClipFavorite.ts +++ b/packages/backend/src/models/entities/ClipFavorite.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiClip } from './Clip.js'; -@Entity() +@Entity('clip_favorite') @Index(['userId', 'clipId'], { unique: true }) export class MiClipFavorite { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/ClipNote.ts b/packages/backend/src/models/entities/ClipNote.ts index 7e92ceb420..ed5458864f 100644 --- a/packages/backend/src/models/entities/ClipNote.ts +++ b/packages/backend/src/models/entities/ClipNote.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiNote } from './Note.js'; import { MiClip } from './Clip.js'; -@Entity() +@Entity('clip_note') @Index(['noteId', 'clipId'], { unique: true }) export class MiClipNote { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/DriveFile.ts b/packages/backend/src/models/entities/DriveFile.ts index dd624c3935..55d6a9826c 100644 --- a/packages/backend/src/models/entities/DriveFile.ts +++ b/packages/backend/src/models/entities/DriveFile.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiDriveFolder } from './DriveFolder.js'; -@Entity() +@Entity('drive_file') @Index(['userId', 'folderId', 'id']) export class MiDriveFile { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/DriveFolder.ts b/packages/backend/src/models/entities/DriveFolder.ts index 4c6649bd33..614974af13 100644 --- a/packages/backend/src/models/entities/DriveFolder.ts +++ b/packages/backend/src/models/entities/DriveFolder.ts @@ -7,7 +7,7 @@ import { JoinColumn, ManyToOne, Entity, PrimaryColumn, Index, Column } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('drive_folder') export class MiDriveFolder { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Emoji.ts b/packages/backend/src/models/entities/Emoji.ts index 982051de4e..a3ae1f2580 100644 --- a/packages/backend/src/models/entities/Emoji.ts +++ b/packages/backend/src/models/entities/Emoji.ts @@ -6,7 +6,7 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; import { id } from '../id.js'; -@Entity() +@Entity('emoji') @Index(['name', 'host'], { unique: true }) export class MiEmoji { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Flash.ts b/packages/backend/src/models/entities/Flash.ts index cad98e2863..af4553ee9b 100644 --- a/packages/backend/src/models/entities/Flash.ts +++ b/packages/backend/src/models/entities/Flash.ts @@ -7,7 +7,7 @@ import { Entity, Index, JoinColumn, Column, PrimaryColumn, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('flash') export class MiFlash { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/FlashLike.ts b/packages/backend/src/models/entities/FlashLike.ts index 4a6f736c92..9486be3ea6 100644 --- a/packages/backend/src/models/entities/FlashLike.ts +++ b/packages/backend/src/models/entities/FlashLike.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiFlash } from './Flash.js'; -@Entity() +@Entity('flash_like') @Index(['userId', 'flashId'], { unique: true }) export class MiFlashLike { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/FollowRequest.ts b/packages/backend/src/models/entities/FollowRequest.ts index 11db1152b4..28385931b7 100644 --- a/packages/backend/src/models/entities/FollowRequest.ts +++ b/packages/backend/src/models/entities/FollowRequest.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('follow_request') @Index(['followerId', 'followeeId'], { unique: true }) export class MiFollowRequest { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Following.ts b/packages/backend/src/models/entities/Following.ts index 3b5ee2c09a..df509cf944 100644 --- a/packages/backend/src/models/entities/Following.ts +++ b/packages/backend/src/models/entities/Following.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('following') @Index(['followerId', 'followeeId'], { unique: true }) export class MiFollowing { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/GalleryLike.ts b/packages/backend/src/models/entities/GalleryLike.ts index 13aef1bc4f..40aeeaad0c 100644 --- a/packages/backend/src/models/entities/GalleryLike.ts +++ b/packages/backend/src/models/entities/GalleryLike.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiGalleryPost } from './GalleryPost.js'; -@Entity() +@Entity('gallery_like') @Index(['userId', 'postId'], { unique: true }) export class MiGalleryLike { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/GalleryPost.ts b/packages/backend/src/models/entities/GalleryPost.ts index 7ac5dcb94e..777fe942e1 100644 --- a/packages/backend/src/models/entities/GalleryPost.ts +++ b/packages/backend/src/models/entities/GalleryPost.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import type { MiDriveFile } from './DriveFile.js'; -@Entity() +@Entity('gallery_post') export class MiGalleryPost { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Hashtag.ts b/packages/backend/src/models/entities/Hashtag.ts index 5c02f360fc..30fea91b7d 100644 --- a/packages/backend/src/models/entities/Hashtag.ts +++ b/packages/backend/src/models/entities/Hashtag.ts @@ -7,7 +7,7 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; import { id } from '../id.js'; import type { MiUser } from './User.js'; -@Entity() +@Entity('hashtag') export class MiHashtag { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Instance.ts b/packages/backend/src/models/entities/Instance.ts index 8d2601efa9..8c562ffa80 100644 --- a/packages/backend/src/models/entities/Instance.ts +++ b/packages/backend/src/models/entities/Instance.ts @@ -6,7 +6,7 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; import { id } from '../id.js'; -@Entity() +@Entity('instance') export class MiInstance { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Meta.ts b/packages/backend/src/models/entities/Meta.ts index b0e56f58da..5a9c875a78 100644 --- a/packages/backend/src/models/entities/Meta.ts +++ b/packages/backend/src/models/entities/Meta.ts @@ -7,7 +7,7 @@ import { Entity, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm'; import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('meta') export class MiMeta { @PrimaryColumn({ type: 'varchar', diff --git a/packages/backend/src/models/entities/ModerationLog.ts b/packages/backend/src/models/entities/ModerationLog.ts index cbf06b31c0..027645de6b 100644 --- a/packages/backend/src/models/entities/ModerationLog.ts +++ b/packages/backend/src/models/entities/ModerationLog.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('moderation_log') export class MiModerationLog { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/MutedNote.ts b/packages/backend/src/models/entities/MutedNote.ts index c82ff34d24..d33af90a97 100644 --- a/packages/backend/src/models/entities/MutedNote.ts +++ b/packages/backend/src/models/entities/MutedNote.ts @@ -9,7 +9,7 @@ import { mutedNoteReasons } from '../../types.js'; import { MiNote } from './Note.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('muted_note') @Index(['noteId', 'userId'], { unique: true }) export class MiMutedNote { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Muting.ts b/packages/backend/src/models/entities/Muting.ts index 66816062ef..b1f12f0118 100644 --- a/packages/backend/src/models/entities/Muting.ts +++ b/packages/backend/src/models/entities/Muting.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('muting') @Index(['muterId', 'muteeId'], { unique: true }) export class MiMuting { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Note.ts b/packages/backend/src/models/entities/Note.ts index 54a56b966f..42343f015b 100644 --- a/packages/backend/src/models/entities/Note.ts +++ b/packages/backend/src/models/entities/Note.ts @@ -10,7 +10,7 @@ import { MiUser } from './User.js'; import { MiChannel } from './Channel.js'; import type { MiDriveFile } from './DriveFile.js'; -@Entity() +@Entity('note') @Index('IDX_NOTE_TAGS', { synchronize: false }) @Index('IDX_NOTE_MENTIONS', { synchronize: false }) @Index('IDX_NOTE_VISIBLE_USER_IDS', { synchronize: false }) diff --git a/packages/backend/src/models/entities/NoteFavorite.ts b/packages/backend/src/models/entities/NoteFavorite.ts index 7e5311d566..1b637e6b92 100644 --- a/packages/backend/src/models/entities/NoteFavorite.ts +++ b/packages/backend/src/models/entities/NoteFavorite.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiNote } from './Note.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('note_favorite') @Index(['userId', 'noteId'], { unique: true }) export class MiNoteFavorite { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/NoteReaction.ts b/packages/backend/src/models/entities/NoteReaction.ts index fcde356ef7..19511abd12 100644 --- a/packages/backend/src/models/entities/NoteReaction.ts +++ b/packages/backend/src/models/entities/NoteReaction.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiNote } from './Note.js'; -@Entity() +@Entity('note_reaction') @Index(['userId', 'noteId'], { unique: true }) export class MiNoteReaction { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/NoteThreadMuting.ts b/packages/backend/src/models/entities/NoteThreadMuting.ts index 79ed5eb4a3..d8ccbe0f74 100644 --- a/packages/backend/src/models/entities/NoteThreadMuting.ts +++ b/packages/backend/src/models/entities/NoteThreadMuting.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('note_thread_muting') @Index(['userId', 'threadId'], { unique: true }) export class MiNoteThreadMuting { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/NoteUnread.ts b/packages/backend/src/models/entities/NoteUnread.ts index 8bd9a46534..0f111cc1b0 100644 --- a/packages/backend/src/models/entities/NoteUnread.ts +++ b/packages/backend/src/models/entities/NoteUnread.ts @@ -9,7 +9,7 @@ import { MiUser } from './User.js'; import { MiNote } from './Note.js'; import type { MiChannel } from './Channel.js'; -@Entity() +@Entity('note_unread') @Index(['userId', 'noteId'], { unique: true }) export class MiNoteUnread { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Page.ts b/packages/backend/src/models/entities/Page.ts index 202ae7e637..30131af85c 100644 --- a/packages/backend/src/models/entities/Page.ts +++ b/packages/backend/src/models/entities/Page.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiDriveFile } from './DriveFile.js'; -@Entity() +@Entity('page') @Index(['userId', 'name'], { unique: true }) export class MiPage { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/PageLike.ts b/packages/backend/src/models/entities/PageLike.ts index a358a9b3e0..36f5177cff 100644 --- a/packages/backend/src/models/entities/PageLike.ts +++ b/packages/backend/src/models/entities/PageLike.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiPage } from './Page.js'; -@Entity() +@Entity('page_like') @Index(['userId', 'pageId'], { unique: true }) export class MiPageLike { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/PasswordResetRequest.ts b/packages/backend/src/models/entities/PasswordResetRequest.ts index 17cb3634bd..4c608d979c 100644 --- a/packages/backend/src/models/entities/PasswordResetRequest.ts +++ b/packages/backend/src/models/entities/PasswordResetRequest.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('password_reset_request') export class MiPasswordResetRequest { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Poll.ts b/packages/backend/src/models/entities/Poll.ts index 4c4287f6ef..557fd1be11 100644 --- a/packages/backend/src/models/entities/Poll.ts +++ b/packages/backend/src/models/entities/Poll.ts @@ -9,7 +9,7 @@ import { noteVisibilities } from '../../types.js'; import { MiNote } from './Note.js'; import type { MiUser } from './User.js'; -@Entity() +@Entity('poll') export class MiPoll { @PrimaryColumn(id()) public noteId: MiNote['id']; diff --git a/packages/backend/src/models/entities/PollVote.ts b/packages/backend/src/models/entities/PollVote.ts index 48f5f4fca5..5070ab16c0 100644 --- a/packages/backend/src/models/entities/PollVote.ts +++ b/packages/backend/src/models/entities/PollVote.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiNote } from './Note.js'; -@Entity() +@Entity('poll_vote') @Index(['userId', 'noteId', 'choice'], { unique: true }) export class MiPollVote { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/PromoNote.ts b/packages/backend/src/models/entities/PromoNote.ts index 3aa4e651e5..9daf915b51 100644 --- a/packages/backend/src/models/entities/PromoNote.ts +++ b/packages/backend/src/models/entities/PromoNote.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiNote } from './Note.js'; import type { MiUser } from './User.js'; -@Entity() +@Entity('promo_note') export class MiPromoNote { @PrimaryColumn(id()) public noteId: MiNote['id']; diff --git a/packages/backend/src/models/entities/PromoRead.ts b/packages/backend/src/models/entities/PromoRead.ts index 5ec1ac2bfa..83a12858e8 100644 --- a/packages/backend/src/models/entities/PromoRead.ts +++ b/packages/backend/src/models/entities/PromoRead.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiNote } from './Note.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('promo_read') @Index(['userId', 'noteId'], { unique: true }) export class MiPromoRead { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/RegistrationTicket.ts b/packages/backend/src/models/entities/RegistrationTicket.ts index 0437ff9c10..2b1c541a28 100644 --- a/packages/backend/src/models/entities/RegistrationTicket.ts +++ b/packages/backend/src/models/entities/RegistrationTicket.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, Column, ManyToOne, JoinColumn, OneToOne } import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('registration_ticket') export class MiRegistrationTicket { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/RegistryItem.ts b/packages/backend/src/models/entities/RegistryItem.ts index 164400e0d7..fdfa4212d0 100644 --- a/packages/backend/src/models/entities/RegistryItem.ts +++ b/packages/backend/src/models/entities/RegistryItem.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; // TODO: 同じdomain、同じscope、同じkeyのレコードは二つ以上存在しないように制約付けたい -@Entity() +@Entity('registry_item') export class MiRegistryItem { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Relay.ts b/packages/backend/src/models/entities/Relay.ts index cb68f2a2db..f73ab193a6 100644 --- a/packages/backend/src/models/entities/Relay.ts +++ b/packages/backend/src/models/entities/Relay.ts @@ -6,7 +6,7 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; import { id } from '../id.js'; -@Entity() +@Entity('relay') export class MiRelay { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/RenoteMuting.ts b/packages/backend/src/models/entities/RenoteMuting.ts index 7feac7ec12..fc87b82b7d 100644 --- a/packages/backend/src/models/entities/RenoteMuting.ts +++ b/packages/backend/src/models/entities/RenoteMuting.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('renote_muting') @Index(['muterId', 'muteeId'], { unique: true }) export class MiRenoteMuting { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/RetentionAggregation.ts b/packages/backend/src/models/entities/RetentionAggregation.ts index 42c2fa7a60..7d7874a601 100644 --- a/packages/backend/src/models/entities/RetentionAggregation.ts +++ b/packages/backend/src/models/entities/RetentionAggregation.ts @@ -7,7 +7,7 @@ import { Entity, PrimaryColumn, Index, Column } from 'typeorm'; import { id } from '../id.js'; import type { MiUser } from './User.js'; -@Entity() +@Entity('retention_aggregation') export class MiRetentionAggregation { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/Role.ts b/packages/backend/src/models/entities/Role.ts index 252bf47a7e..52e1f0c347 100644 --- a/packages/backend/src/models/entities/Role.ts +++ b/packages/backend/src/models/entities/Role.ts @@ -84,7 +84,7 @@ export type RoleCondFormulaValue = CondFormulaValueNotesLessThanOrEq | CondFormulaValueNotesMoreThanOrEq; -@Entity() +@Entity('role') export class MiRole { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/RoleAssignment.ts b/packages/backend/src/models/entities/RoleAssignment.ts index ac96dccf72..5a2dacb91a 100644 --- a/packages/backend/src/models/entities/RoleAssignment.ts +++ b/packages/backend/src/models/entities/RoleAssignment.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiRole } from './Role.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('role_assignment') @Index(['userId', 'roleId'], { unique: true }) export class MiRoleAssignment { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/Signin.ts b/packages/backend/src/models/entities/Signin.ts index edfb5ee072..709a998889 100644 --- a/packages/backend/src/models/entities/Signin.ts +++ b/packages/backend/src/models/entities/Signin.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('signin') export class MiSignin { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/SwSubscription.ts b/packages/backend/src/models/entities/SwSubscription.ts index d6c86efd34..9c3f97cf99 100644 --- a/packages/backend/src/models/entities/SwSubscription.ts +++ b/packages/backend/src/models/entities/SwSubscription.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('sw_subscription') export class MiSwSubscription { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/UsedUsername.ts b/packages/backend/src/models/entities/UsedUsername.ts index a146794f48..c75bf424c1 100644 --- a/packages/backend/src/models/entities/UsedUsername.ts +++ b/packages/backend/src/models/entities/UsedUsername.ts @@ -5,7 +5,7 @@ import { PrimaryColumn, Entity, Column } from 'typeorm'; -@Entity() +@Entity('used_username') export class MiUsedUsername { @PrimaryColumn('varchar', { length: 128, diff --git a/packages/backend/src/models/entities/User.ts b/packages/backend/src/models/entities/User.ts index 6868ed21de..49c9865675 100644 --- a/packages/backend/src/models/entities/User.ts +++ b/packages/backend/src/models/entities/User.ts @@ -7,7 +7,7 @@ import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'type import { id } from '../id.js'; import { MiDriveFile } from './DriveFile.js'; -@Entity() +@Entity('user') @Index(['usernameLower', 'host'], { unique: true }) export class MiUser { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/UserIp.ts b/packages/backend/src/models/entities/UserIp.ts index 946f3ec6a9..8384984e6b 100644 --- a/packages/backend/src/models/entities/UserIp.ts +++ b/packages/backend/src/models/entities/UserIp.ts @@ -7,7 +7,7 @@ import { Entity, Index, Column, PrimaryGeneratedColumn } from 'typeorm'; import { id } from '../id.js'; import type { MiUser } from './User.js'; -@Entity() +@Entity('user_ip') @Index(['userId', 'ip'], { unique: true }) export class MiUserIp { @PrimaryGeneratedColumn() diff --git a/packages/backend/src/models/entities/UserKeypair.ts b/packages/backend/src/models/entities/UserKeypair.ts index 57e6d57875..c9ea7d11f8 100644 --- a/packages/backend/src/models/entities/UserKeypair.ts +++ b/packages/backend/src/models/entities/UserKeypair.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, JoinColumn, Column, OneToOne } from 'typeorm'; import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('user_keypair') export class MiUserKeypair { @PrimaryColumn(id()) public userId: MiUser['id']; diff --git a/packages/backend/src/models/entities/UserList.ts b/packages/backend/src/models/entities/UserList.ts index ba5f298da6..a6216b5670 100644 --- a/packages/backend/src/models/entities/UserList.ts +++ b/packages/backend/src/models/entities/UserList.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, ManyToOne } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('user_list') export class MiUserList { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/UserListFavorite.ts b/packages/backend/src/models/entities/UserListFavorite.ts index 24a7176008..f3c4c1a4d8 100644 --- a/packages/backend/src/models/entities/UserListFavorite.ts +++ b/packages/backend/src/models/entities/UserListFavorite.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiUserList } from './UserList.js'; -@Entity() +@Entity('user_list_favorite') @Index(['userId', 'userListId'], { unique: true }) export class MiUserListFavorite { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/UserListJoining.ts b/packages/backend/src/models/entities/UserListJoining.ts index 47add7bd7d..e4912024c1 100644 --- a/packages/backend/src/models/entities/UserListJoining.ts +++ b/packages/backend/src/models/entities/UserListJoining.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiUser } from './User.js'; import { MiUserList } from './UserList.js'; -@Entity() +@Entity('user_list_joining') @Index(['userId', 'userListId'], { unique: true }) export class MiUserListJoining { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/UserMemo.ts b/packages/backend/src/models/entities/UserMemo.ts index 72fcbc58c6..9b89080509 100644 --- a/packages/backend/src/models/entities/UserMemo.ts +++ b/packages/backend/src/models/entities/UserMemo.ts @@ -7,7 +7,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne, PrimaryColumn } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('user_memo') @Index(['userId', 'targetUserId'], { unique: true }) export class MiUserMemo { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/UserNotePining.ts b/packages/backend/src/models/entities/UserNotePining.ts index 16394f06d5..95bcb158b6 100644 --- a/packages/backend/src/models/entities/UserNotePining.ts +++ b/packages/backend/src/models/entities/UserNotePining.ts @@ -8,7 +8,7 @@ import { id } from '../id.js'; import { MiNote } from './Note.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('user_note_pining') @Index(['userId', 'noteId'], { unique: true }) export class MiUserNotePining { @PrimaryColumn(id()) diff --git a/packages/backend/src/models/entities/UserPending.ts b/packages/backend/src/models/entities/UserPending.ts index b8fbc4db38..8c9e01e59c 100644 --- a/packages/backend/src/models/entities/UserPending.ts +++ b/packages/backend/src/models/entities/UserPending.ts @@ -6,7 +6,7 @@ import { PrimaryColumn, Entity, Index, Column } from 'typeorm'; import { id } from '../id.js'; -@Entity() +@Entity('user_pending') export class MiUserPending { @PrimaryColumn(id()) public id: string; diff --git a/packages/backend/src/models/entities/UserProfile.ts b/packages/backend/src/models/entities/UserProfile.ts index 76ee07ba94..54144cb429 100644 --- a/packages/backend/src/models/entities/UserProfile.ts +++ b/packages/backend/src/models/entities/UserProfile.ts @@ -11,7 +11,7 @@ import { MiPage } from './Page.js'; // TODO: このテーブルで管理している情報すべてレジストリで管理するようにしても良いかも // ただ、「emailVerified が true なユーザーを find する」のようなクエリは書けなくなるからウーン -@Entity() +@Entity('user_profile') export class MiUserProfile { @PrimaryColumn(id()) public userId: MiUser['id']; diff --git a/packages/backend/src/models/entities/UserPublickey.ts b/packages/backend/src/models/entities/UserPublickey.ts index 8794d8c9dc..afa37cf7ea 100644 --- a/packages/backend/src/models/entities/UserPublickey.ts +++ b/packages/backend/src/models/entities/UserPublickey.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, Index, JoinColumn, Column, OneToOne } from 'type import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('user_publickey') export class MiUserPublickey { @PrimaryColumn(id()) public userId: MiUser['id']; diff --git a/packages/backend/src/models/entities/UserSecurityKey.ts b/packages/backend/src/models/entities/UserSecurityKey.ts index 5ee170d026..ce1c270d46 100644 --- a/packages/backend/src/models/entities/UserSecurityKey.ts +++ b/packages/backend/src/models/entities/UserSecurityKey.ts @@ -7,7 +7,7 @@ import { PrimaryColumn, Entity, JoinColumn, Column, ManyToOne, Index } from 'typ import { id } from '../id.js'; import { MiUser } from './User.js'; -@Entity() +@Entity('user_security_key') export class MiUserSecurityKey { @PrimaryColumn('varchar', { comment: 'Variable-length id given to navigator.credentials.get()', diff --git a/packages/backend/src/models/entities/Webhook.ts b/packages/backend/src/models/entities/Webhook.ts index b28dcf92ce..f08d15825a 100644 --- a/packages/backend/src/models/entities/Webhook.ts +++ b/packages/backend/src/models/entities/Webhook.ts @@ -9,7 +9,7 @@ import { MiUser } from './User.js'; export const webhookEventTypes = ['mention', 'unfollow', 'follow', 'followed', 'note', 'reply', 'renote', 'reaction'] as const; -@Entity() +@Entity('webhook') export class MiWebhook { @PrimaryColumn(id()) public id: string;