diff --git a/docs/downgrade.sql b/docs/downgrade.sql index 5de3e0717c..38481608e1 100644 --- a/docs/downgrade.sql +++ b/docs/downgrade.sql @@ -1,6 +1,7 @@ BEGIN; DELETE FROM "migrations" WHERE name IN ( + 'AddBackTimezone1715351290096', 'UserprofileJsonbToArray1714270605574', 'DropUnusedUserprofileColumns1714259023878', 'AntennaJsonbToArray1714192520471', @@ -105,83 +106,6 @@ CREATE INDEX "IDX_8e3bbbeb3df04d1a8105da4c8f" ON "note" USING "pgroonga" ("cw" p ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_535def119223ac05ad3fa9ef64b"; ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_535def119223ac05ad3fa9ef64b" FOREIGN KEY ("fileId") REFERENCES "drive_file"("id") ON DELETE CASCADE ON UPDATE NO ACTION; --- drop-time-zone -ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp with time zone; -ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp with time zone; -ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp with time zone; -ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "app" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp with time zone; -ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp with time zone; -ALTER TABLE "following" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp with time zone; -ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp with time zone; -ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp with time zone; -ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp with time zone; -ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp with time zone; -ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp with time zone; -ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp with time zone; -ALTER TABLE "note" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp with time zone; -ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp with time zone; -ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "page" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp with time zone; -ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp with time zone; -ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp with time zone; -ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp with time zone; -ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp with time zone; -ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp with time zone; -ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp with time zone; -ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp with time zone; -ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp with time zone; -ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp with time zone; - -- expand-note-edit ALTER TABLE "note_edit" DROP COLUMN "emojis"; diff --git a/packages/backend-rs/index.d.ts b/packages/backend-rs/index.d.ts index c959593c00..fbd6c49403 100644 --- a/packages/backend-rs/index.d.ts +++ b/packages/backend-rs/index.d.ts @@ -312,7 +312,7 @@ export function memoryUsage(): Memory export function storageUsage(): Storage | null export interface AbuseUserReport { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone targetUserId: string reporterId: string assigneeId: string | null @@ -324,12 +324,12 @@ export interface AbuseUserReport { } export interface AccessToken { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone token: string hash: string userId: string appId: string | null - lastUsedAt: Date | null + lastUsedAt: DateTimeWithTimeZone | null session: string | null name: string | null description: string | null @@ -339,8 +339,8 @@ export interface AccessToken { } export interface Ad { id: string - createdAt: Date - expiresAt: Date + createdAt: DateTimeWithTimeZone + expiresAt: DateTimeWithTimeZone place: string priority: string url: string @@ -350,11 +350,11 @@ export interface Ad { } export interface Announcement { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone text: string title: string imageUrl: string | null - updatedAt: Date | null + updatedAt: DateTimeWithTimeZone | null showPopup: boolean isGoodNews: boolean } @@ -362,11 +362,11 @@ export interface AnnouncementRead { id: string userId: string announcementId: string - createdAt: Date + createdAt: DateTimeWithTimeZone } export interface Antenna { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string name: string src: AntennaSrcEnum @@ -384,7 +384,7 @@ export interface Antenna { } export interface App { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string | null secret: string name: string @@ -396,26 +396,26 @@ export interface AttestationChallenge { id: string userId: string challenge: string - createdAt: Date + createdAt: DateTimeWithTimeZone registrationChallenge: boolean } export interface AuthSession { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone token: string userId: string | null appId: string } export interface Blocking { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone blockeeId: string blockerId: string } export interface Channel { id: string - createdAt: Date - lastNotedAt: Date | null + createdAt: DateTimeWithTimeZone + lastNotedAt: DateTimeWithTimeZone | null userId: string | null name: string description: string | null @@ -425,19 +425,19 @@ export interface Channel { } export interface ChannelFollowing { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone followeeId: string followerId: string } export interface ChannelNotePining { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone channelId: string noteId: string } export interface Clip { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string name: string isPublic: boolean @@ -450,7 +450,7 @@ export interface ClipNote { } export interface DriveFile { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string | null userHost: string | null md5: string @@ -479,14 +479,14 @@ export interface DriveFile { } export interface DriveFolder { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone name: string userId: string | null parentId: string | null } export interface Emoji { id: string - updatedAt: Date | null + updatedAt: DateTimeWithTimeZone | null name: string host: string | null originalUrl: string @@ -501,7 +501,7 @@ export interface Emoji { } export interface FollowRequest { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone followeeId: string followerId: string requestId: string | null @@ -514,7 +514,7 @@ export interface FollowRequest { } export interface Following { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone followeeId: string followerId: string followerHost: string | null @@ -526,14 +526,14 @@ export interface Following { } export interface GalleryLike { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string postId: string } export interface GalleryPost { id: string - createdAt: Date - updatedAt: Date + createdAt: DateTimeWithTimeZone + updatedAt: DateTimeWithTimeZone title: string description: string | null userId: string @@ -560,16 +560,16 @@ export interface Hashtag { } export interface Instance { id: string - caughtAt: Date + caughtAt: DateTimeWithTimeZone host: string usersCount: number notesCount: number followingCount: number followersCount: number - latestRequestSentAt: Date | null + latestRequestSentAt: DateTimeWithTimeZone | null latestStatus: number | null - latestRequestReceivedAt: Date | null - lastCommunicatedAt: Date + latestRequestReceivedAt: DateTimeWithTimeZone | null + lastCommunicatedAt: DateTimeWithTimeZone isNotResponding: boolean softwareName: string | null softwareVersion: string | null @@ -578,7 +578,7 @@ export interface Instance { description: string | null maintainerName: string | null maintainerEmail: string | null - infoUpdatedAt: Date | null + infoUpdatedAt: DateTimeWithTimeZone | null isSuspended: boolean iconUrl: string | null themeColor: string | null @@ -586,7 +586,7 @@ export interface Instance { } export interface MessagingMessage { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string recipientId: string | null text: string | null @@ -690,7 +690,7 @@ export interface Migrations { } export interface ModerationLog { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string type: string info: Json @@ -703,14 +703,14 @@ export interface MutedNote { } export interface Muting { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone muteeId: string muterId: string - expiresAt: Date | null + expiresAt: DateTimeWithTimeZone | null } export interface Note { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone replyId: string | null renoteId: string | null text: string | null @@ -740,7 +740,7 @@ export interface Note { url: string | null channelId: string | null threadId: string | null - updatedAt: Date | null + updatedAt: DateTimeWithTimeZone | null lang: string | null } export interface NoteEdit { @@ -749,12 +749,12 @@ export interface NoteEdit { text: string | null cw: string | null fileIds: Array - updatedAt: Date + updatedAt: DateTimeWithTimeZone emojis: Array } export interface NoteFavorite { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string noteId: string } @@ -765,14 +765,14 @@ export interface NoteFile { } export interface NoteReaction { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string noteId: string reaction: string } export interface NoteThreadMuting { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string threadId: string } @@ -787,14 +787,14 @@ export interface NoteUnread { } export interface NoteWatching { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string noteId: string noteUserId: string } export interface Notification { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone notifieeId: string notifierId: string | null isRead: boolean @@ -811,8 +811,8 @@ export interface Notification { } export interface Page { id: string - createdAt: Date - updatedAt: Date + createdAt: DateTimeWithTimeZone + updatedAt: DateTimeWithTimeZone title: string name: string summary: string | null @@ -831,19 +831,19 @@ export interface Page { } export interface PageLike { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string pageId: string } export interface PasswordResetRequest { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone token: string userId: string } export interface Poll { noteId: string - expiresAt: Date | null + expiresAt: DateTimeWithTimeZone | null multiple: boolean choices: Array votes: Array @@ -853,31 +853,31 @@ export interface Poll { } export interface PollVote { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string noteId: string choice: number } export interface PromoNote { noteId: string - expiresAt: Date + expiresAt: DateTimeWithTimeZone userId: string } export interface PromoRead { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string noteId: string } export interface RegistrationTicket { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone code: string } export interface RegistryItem { id: string - createdAt: Date - updatedAt: Date + createdAt: DateTimeWithTimeZone + updatedAt: DateTimeWithTimeZone userId: string key: string scope: Array @@ -891,13 +891,13 @@ export interface Relay { } export interface RenoteMuting { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone muteeId: string muterId: string } export interface ReplyMuting { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone muteeId: string muterId: string } @@ -983,7 +983,7 @@ export enum UserProfileMutingnotificationtypesEnum { } export interface Signin { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string ip: string headers: Json @@ -991,7 +991,7 @@ export interface Signin { } export interface SwSubscription { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string endpoint: string auth: string @@ -1000,13 +1000,13 @@ export interface SwSubscription { } export interface UsedUsername { username: string - createdAt: Date + createdAt: DateTimeWithTimeZone } export interface User { id: string - createdAt: Date - updatedAt: Date | null - lastFetchedAt: Date | null + createdAt: DateTimeWithTimeZone + updatedAt: DateTimeWithTimeZone | null + lastFetchedAt: DateTimeWithTimeZone | null username: string usernameLower: string name: string | null @@ -1032,7 +1032,7 @@ export interface User { token: string | null isExplorable: boolean followersUri: string | null - lastActiveDate: Date | null + lastActiveDate: DateTimeWithTimeZone | null hideOnlineStatus: boolean isDeleted: boolean driveCapacityOverrideMb: number | null @@ -1044,32 +1044,32 @@ export interface User { } export interface UserGroup { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone name: string userId: string isPrivate: boolean } export interface UserGroupInvitation { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string userGroupId: string } export interface UserGroupInvite { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string userGroupId: string } export interface UserGroupJoining { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string userGroupId: string } export interface UserIp { id: number - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string ip: string } @@ -1080,25 +1080,25 @@ export interface UserKeypair { } export interface UserList { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string name: string } export interface UserListJoining { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string userListId: string } export interface UserNotePining { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string noteId: string } export interface UserPending { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone code: string username: string email: string @@ -1150,19 +1150,19 @@ export interface UserSecurityKey { id: string userId: string publicKey: string - lastUsed: Date + lastUsed: DateTimeWithTimeZone name: string } export interface Webhook { id: string - createdAt: Date + createdAt: DateTimeWithTimeZone userId: string name: string on: Array url: string secret: string active: boolean - latestSentAt: Date | null + latestSentAt: DateTimeWithTimeZone | null latestStatus: number | null } export function updateAntennasOnNewNote(note: Note, noteAuthor: Acct, noteMutedUsers: Array): Promise diff --git a/packages/backend-rs/src/model/entity/abuse_user_report.rs b/packages/backend-rs/src/model/entity/abuse_user_report.rs index e12b2f4d31..3846b0f2ec 100644 --- a/packages/backend-rs/src/model/entity/abuse_user_report.rs +++ b/packages/backend-rs/src/model/entity/abuse_user_report.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "targetUserId")] pub target_user_id: String, #[sea_orm(column_name = "reporterId")] diff --git a/packages/backend-rs/src/model/entity/access_token.rs b/packages/backend-rs/src/model/entity/access_token.rs index 8b79877b8b..beebdb2d2c 100644 --- a/packages/backend-rs/src/model/entity/access_token.rs +++ b/packages/backend-rs/src/model/entity/access_token.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, pub token: String, pub hash: String, #[sea_orm(column_name = "userId")] @@ -21,7 +21,7 @@ pub struct Model { #[sea_orm(column_name = "appId")] pub app_id: Option, #[sea_orm(column_name = "lastUsedAt")] - pub last_used_at: Option, + pub last_used_at: Option, pub session: Option, pub name: Option, pub description: Option, diff --git a/packages/backend-rs/src/model/entity/ad.rs b/packages/backend-rs/src/model/entity/ad.rs index 8a7b9abb86..ab8abcb9a8 100644 --- a/packages/backend-rs/src/model/entity/ad.rs +++ b/packages/backend-rs/src/model/entity/ad.rs @@ -13,9 +13,9 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "expiresAt")] - pub expires_at: DateTime, + pub expires_at: DateTimeWithTimeZone, pub place: String, pub priority: String, pub url: String, diff --git a/packages/backend-rs/src/model/entity/announcement.rs b/packages/backend-rs/src/model/entity/announcement.rs index 4532614a24..e6f3888fd5 100644 --- a/packages/backend-rs/src/model/entity/announcement.rs +++ b/packages/backend-rs/src/model/entity/announcement.rs @@ -13,13 +13,13 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, pub text: String, pub title: String, #[sea_orm(column_name = "imageUrl")] pub image_url: Option, #[sea_orm(column_name = "updatedAt")] - pub updated_at: Option, + pub updated_at: Option, #[sea_orm(column_name = "showPopup")] pub show_popup: bool, #[sea_orm(column_name = "isGoodNews")] diff --git a/packages/backend-rs/src/model/entity/announcement_read.rs b/packages/backend-rs/src/model/entity/announcement_read.rs index de54dae082..6ab2d2cb52 100644 --- a/packages/backend-rs/src/model/entity/announcement_read.rs +++ b/packages/backend-rs/src/model/entity/announcement_read.rs @@ -17,7 +17,7 @@ pub struct Model { #[sea_orm(column_name = "announcementId")] pub announcement_id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/packages/backend-rs/src/model/entity/antenna.rs b/packages/backend-rs/src/model/entity/antenna.rs index 39715a1d32..9d746dbf5f 100644 --- a/packages/backend-rs/src/model/entity/antenna.rs +++ b/packages/backend-rs/src/model/entity/antenna.rs @@ -14,7 +14,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub name: String, diff --git a/packages/backend-rs/src/model/entity/app.rs b/packages/backend-rs/src/model/entity/app.rs index 8d2aa5373a..9d75e4fb4c 100644 --- a/packages/backend-rs/src/model/entity/app.rs +++ b/packages/backend-rs/src/model/entity/app.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: Option, pub secret: String, diff --git a/packages/backend-rs/src/model/entity/attestation_challenge.rs b/packages/backend-rs/src/model/entity/attestation_challenge.rs index 999952943d..a64aabe619 100644 --- a/packages/backend-rs/src/model/entity/attestation_challenge.rs +++ b/packages/backend-rs/src/model/entity/attestation_challenge.rs @@ -16,7 +16,7 @@ pub struct Model { pub user_id: String, pub challenge: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "registrationChallenge")] pub registration_challenge: bool, } diff --git a/packages/backend-rs/src/model/entity/auth_session.rs b/packages/backend-rs/src/model/entity/auth_session.rs index fac397308d..30056374a3 100644 --- a/packages/backend-rs/src/model/entity/auth_session.rs +++ b/packages/backend-rs/src/model/entity/auth_session.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, pub token: String, #[sea_orm(column_name = "userId")] pub user_id: Option, diff --git a/packages/backend-rs/src/model/entity/blocking.rs b/packages/backend-rs/src/model/entity/blocking.rs index d7773108ab..9bd192dc0a 100644 --- a/packages/backend-rs/src/model/entity/blocking.rs +++ b/packages/backend-rs/src/model/entity/blocking.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "blockeeId")] pub blockee_id: String, #[sea_orm(column_name = "blockerId")] diff --git a/packages/backend-rs/src/model/entity/channel.rs b/packages/backend-rs/src/model/entity/channel.rs index 4f3ec777ee..ab4574de57 100644 --- a/packages/backend-rs/src/model/entity/channel.rs +++ b/packages/backend-rs/src/model/entity/channel.rs @@ -13,9 +13,9 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "lastNotedAt")] - pub last_noted_at: Option, + pub last_noted_at: Option, #[sea_orm(column_name = "userId")] pub user_id: Option, pub name: String, diff --git a/packages/backend-rs/src/model/entity/channel_following.rs b/packages/backend-rs/src/model/entity/channel_following.rs index d45b2c9706..29f0d46814 100644 --- a/packages/backend-rs/src/model/entity/channel_following.rs +++ b/packages/backend-rs/src/model/entity/channel_following.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "followeeId")] pub followee_id: String, #[sea_orm(column_name = "followerId")] diff --git a/packages/backend-rs/src/model/entity/channel_note_pining.rs b/packages/backend-rs/src/model/entity/channel_note_pining.rs index 9080c0181e..79f067d6cf 100644 --- a/packages/backend-rs/src/model/entity/channel_note_pining.rs +++ b/packages/backend-rs/src/model/entity/channel_note_pining.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "channelId")] pub channel_id: String, #[sea_orm(column_name = "noteId")] diff --git a/packages/backend-rs/src/model/entity/clip.rs b/packages/backend-rs/src/model/entity/clip.rs index 05dc66fa48..d1e1c18db2 100644 --- a/packages/backend-rs/src/model/entity/clip.rs +++ b/packages/backend-rs/src/model/entity/clip.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub name: String, diff --git a/packages/backend-rs/src/model/entity/drive_file.rs b/packages/backend-rs/src/model/entity/drive_file.rs index 699fa182a5..e44938dfc8 100644 --- a/packages/backend-rs/src/model/entity/drive_file.rs +++ b/packages/backend-rs/src/model/entity/drive_file.rs @@ -14,7 +14,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: Option, #[sea_orm(column_name = "userHost")] diff --git a/packages/backend-rs/src/model/entity/drive_folder.rs b/packages/backend-rs/src/model/entity/drive_folder.rs index e4f6fccb6f..972a65e173 100644 --- a/packages/backend-rs/src/model/entity/drive_folder.rs +++ b/packages/backend-rs/src/model/entity/drive_folder.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, pub name: String, #[sea_orm(column_name = "userId")] pub user_id: Option, diff --git a/packages/backend-rs/src/model/entity/emoji.rs b/packages/backend-rs/src/model/entity/emoji.rs index 374781c4d2..f1254dbcfe 100644 --- a/packages/backend-rs/src/model/entity/emoji.rs +++ b/packages/backend-rs/src/model/entity/emoji.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "updatedAt")] - pub updated_at: Option, + pub updated_at: Option, pub name: String, pub host: Option, #[sea_orm(column_name = "originalUrl")] diff --git a/packages/backend-rs/src/model/entity/follow_request.rs b/packages/backend-rs/src/model/entity/follow_request.rs index 332eeed204..e4629aeaf5 100644 --- a/packages/backend-rs/src/model/entity/follow_request.rs +++ b/packages/backend-rs/src/model/entity/follow_request.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "followeeId")] pub followee_id: String, #[sea_orm(column_name = "followerId")] diff --git a/packages/backend-rs/src/model/entity/following.rs b/packages/backend-rs/src/model/entity/following.rs index 6f3255ecc9..386a37e12f 100644 --- a/packages/backend-rs/src/model/entity/following.rs +++ b/packages/backend-rs/src/model/entity/following.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "followeeId")] pub followee_id: String, #[sea_orm(column_name = "followerId")] diff --git a/packages/backend-rs/src/model/entity/gallery_like.rs b/packages/backend-rs/src/model/entity/gallery_like.rs index db519bc91b..faff8906aa 100644 --- a/packages/backend-rs/src/model/entity/gallery_like.rs +++ b/packages/backend-rs/src/model/entity/gallery_like.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "postId")] diff --git a/packages/backend-rs/src/model/entity/gallery_post.rs b/packages/backend-rs/src/model/entity/gallery_post.rs index 5492417911..e66a192ce6 100644 --- a/packages/backend-rs/src/model/entity/gallery_post.rs +++ b/packages/backend-rs/src/model/entity/gallery_post.rs @@ -13,9 +13,9 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "updatedAt")] - pub updated_at: DateTime, + pub updated_at: DateTimeWithTimeZone, pub title: String, pub description: Option, #[sea_orm(column_name = "userId")] diff --git a/packages/backend-rs/src/model/entity/instance.rs b/packages/backend-rs/src/model/entity/instance.rs index 839c6206df..3bc0a6e7c7 100644 --- a/packages/backend-rs/src/model/entity/instance.rs +++ b/packages/backend-rs/src/model/entity/instance.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "caughtAt")] - pub caught_at: DateTime, + pub caught_at: DateTimeWithTimeZone, pub host: String, #[sea_orm(column_name = "usersCount")] pub users_count: i32, @@ -24,13 +24,13 @@ pub struct Model { #[sea_orm(column_name = "followersCount")] pub followers_count: i32, #[sea_orm(column_name = "latestRequestSentAt")] - pub latest_request_sent_at: Option, + pub latest_request_sent_at: Option, #[sea_orm(column_name = "latestStatus")] pub latest_status: Option, #[sea_orm(column_name = "latestRequestReceivedAt")] - pub latest_request_received_at: Option, + pub latest_request_received_at: Option, #[sea_orm(column_name = "lastCommunicatedAt")] - pub last_communicated_at: DateTime, + pub last_communicated_at: DateTimeWithTimeZone, #[sea_orm(column_name = "isNotResponding")] pub is_not_responding: bool, #[sea_orm(column_name = "softwareName")] @@ -46,7 +46,7 @@ pub struct Model { #[sea_orm(column_name = "maintainerEmail")] pub maintainer_email: Option, #[sea_orm(column_name = "infoUpdatedAt")] - pub info_updated_at: Option, + pub info_updated_at: Option, #[sea_orm(column_name = "isSuspended")] pub is_suspended: bool, #[sea_orm(column_name = "iconUrl")] diff --git a/packages/backend-rs/src/model/entity/messaging_message.rs b/packages/backend-rs/src/model/entity/messaging_message.rs index b5f5d818a0..7665b58674 100644 --- a/packages/backend-rs/src/model/entity/messaging_message.rs +++ b/packages/backend-rs/src/model/entity/messaging_message.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "recipientId")] diff --git a/packages/backend-rs/src/model/entity/moderation_log.rs b/packages/backend-rs/src/model/entity/moderation_log.rs index e51ac4cc0d..5ede8bdaf4 100644 --- a/packages/backend-rs/src/model/entity/moderation_log.rs +++ b/packages/backend-rs/src/model/entity/moderation_log.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub r#type: String, diff --git a/packages/backend-rs/src/model/entity/muting.rs b/packages/backend-rs/src/model/entity/muting.rs index b9850b3a42..d323c5f4df 100644 --- a/packages/backend-rs/src/model/entity/muting.rs +++ b/packages/backend-rs/src/model/entity/muting.rs @@ -13,13 +13,13 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "muteeId")] pub mutee_id: String, #[sea_orm(column_name = "muterId")] pub muter_id: String, #[sea_orm(column_name = "expiresAt")] - pub expires_at: Option, + pub expires_at: Option, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/packages/backend-rs/src/model/entity/note.rs b/packages/backend-rs/src/model/entity/note.rs index 85947ea35d..55bda53353 100644 --- a/packages/backend-rs/src/model/entity/note.rs +++ b/packages/backend-rs/src/model/entity/note.rs @@ -14,7 +14,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "replyId")] pub reply_id: Option, #[sea_orm(column_name = "renoteId")] @@ -66,7 +66,7 @@ pub struct Model { #[sea_orm(column_name = "threadId")] pub thread_id: Option, #[sea_orm(column_name = "updatedAt")] - pub updated_at: Option, + pub updated_at: Option, pub lang: Option, } diff --git a/packages/backend-rs/src/model/entity/note_edit.rs b/packages/backend-rs/src/model/entity/note_edit.rs index 0fb10b82a8..1bdb186cc5 100644 --- a/packages/backend-rs/src/model/entity/note_edit.rs +++ b/packages/backend-rs/src/model/entity/note_edit.rs @@ -20,7 +20,7 @@ pub struct Model { #[sea_orm(column_name = "fileIds")] pub file_ids: Vec, #[sea_orm(column_name = "updatedAt")] - pub updated_at: DateTime, + pub updated_at: DateTimeWithTimeZone, pub emojis: Vec, } diff --git a/packages/backend-rs/src/model/entity/note_favorite.rs b/packages/backend-rs/src/model/entity/note_favorite.rs index 12e5c641b1..0083803024 100644 --- a/packages/backend-rs/src/model/entity/note_favorite.rs +++ b/packages/backend-rs/src/model/entity/note_favorite.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "noteId")] diff --git a/packages/backend-rs/src/model/entity/note_reaction.rs b/packages/backend-rs/src/model/entity/note_reaction.rs index 9d5de3fab4..4d2e0df11a 100644 --- a/packages/backend-rs/src/model/entity/note_reaction.rs +++ b/packages/backend-rs/src/model/entity/note_reaction.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "noteId")] diff --git a/packages/backend-rs/src/model/entity/note_thread_muting.rs b/packages/backend-rs/src/model/entity/note_thread_muting.rs index fbbb30e948..a90e4dba64 100644 --- a/packages/backend-rs/src/model/entity/note_thread_muting.rs +++ b/packages/backend-rs/src/model/entity/note_thread_muting.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "threadId")] diff --git a/packages/backend-rs/src/model/entity/note_watching.rs b/packages/backend-rs/src/model/entity/note_watching.rs index 817431daaa..8e0c831cdd 100644 --- a/packages/backend-rs/src/model/entity/note_watching.rs +++ b/packages/backend-rs/src/model/entity/note_watching.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "noteId")] diff --git a/packages/backend-rs/src/model/entity/notification.rs b/packages/backend-rs/src/model/entity/notification.rs index e2273017e5..4877ca6f66 100644 --- a/packages/backend-rs/src/model/entity/notification.rs +++ b/packages/backend-rs/src/model/entity/notification.rs @@ -14,7 +14,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "notifieeId")] pub notifiee_id: String, #[sea_orm(column_name = "notifierId")] diff --git a/packages/backend-rs/src/model/entity/page.rs b/packages/backend-rs/src/model/entity/page.rs index a88b53459d..fef5d5c54b 100644 --- a/packages/backend-rs/src/model/entity/page.rs +++ b/packages/backend-rs/src/model/entity/page.rs @@ -14,9 +14,9 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "updatedAt")] - pub updated_at: DateTime, + pub updated_at: DateTimeWithTimeZone, pub title: String, pub name: String, pub summary: Option, diff --git a/packages/backend-rs/src/model/entity/page_like.rs b/packages/backend-rs/src/model/entity/page_like.rs index 7f7caabde5..452f43fd26 100644 --- a/packages/backend-rs/src/model/entity/page_like.rs +++ b/packages/backend-rs/src/model/entity/page_like.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "pageId")] diff --git a/packages/backend-rs/src/model/entity/password_reset_request.rs b/packages/backend-rs/src/model/entity/password_reset_request.rs index de78019087..9a65693494 100644 --- a/packages/backend-rs/src/model/entity/password_reset_request.rs +++ b/packages/backend-rs/src/model/entity/password_reset_request.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, pub token: String, #[sea_orm(column_name = "userId")] pub user_id: String, diff --git a/packages/backend-rs/src/model/entity/poll.rs b/packages/backend-rs/src/model/entity/poll.rs index 2e65674b15..4cabf4cbaa 100644 --- a/packages/backend-rs/src/model/entity/poll.rs +++ b/packages/backend-rs/src/model/entity/poll.rs @@ -14,7 +14,7 @@ pub struct Model { #[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)] pub note_id: String, #[sea_orm(column_name = "expiresAt")] - pub expires_at: Option, + pub expires_at: Option, pub multiple: bool, pub choices: Vec, pub votes: Vec, diff --git a/packages/backend-rs/src/model/entity/poll_vote.rs b/packages/backend-rs/src/model/entity/poll_vote.rs index 47e68084cc..313618af16 100644 --- a/packages/backend-rs/src/model/entity/poll_vote.rs +++ b/packages/backend-rs/src/model/entity/poll_vote.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "noteId")] diff --git a/packages/backend-rs/src/model/entity/promo_note.rs b/packages/backend-rs/src/model/entity/promo_note.rs index 8b13b8987b..1c6e216991 100644 --- a/packages/backend-rs/src/model/entity/promo_note.rs +++ b/packages/backend-rs/src/model/entity/promo_note.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)] pub note_id: String, #[sea_orm(column_name = "expiresAt")] - pub expires_at: DateTime, + pub expires_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, } diff --git a/packages/backend-rs/src/model/entity/promo_read.rs b/packages/backend-rs/src/model/entity/promo_read.rs index 3e6d822d29..17c2433cd3 100644 --- a/packages/backend-rs/src/model/entity/promo_read.rs +++ b/packages/backend-rs/src/model/entity/promo_read.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "noteId")] diff --git a/packages/backend-rs/src/model/entity/registration_ticket.rs b/packages/backend-rs/src/model/entity/registration_ticket.rs index ab735b2422..9192ac32a6 100644 --- a/packages/backend-rs/src/model/entity/registration_ticket.rs +++ b/packages/backend-rs/src/model/entity/registration_ticket.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, pub code: String, } diff --git a/packages/backend-rs/src/model/entity/registry_item.rs b/packages/backend-rs/src/model/entity/registry_item.rs index cb129128b7..66f3115b7c 100644 --- a/packages/backend-rs/src/model/entity/registry_item.rs +++ b/packages/backend-rs/src/model/entity/registry_item.rs @@ -13,9 +13,9 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "updatedAt")] - pub updated_at: DateTime, + pub updated_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub key: String, diff --git a/packages/backend-rs/src/model/entity/renote_muting.rs b/packages/backend-rs/src/model/entity/renote_muting.rs index 308e4c1563..6315a17212 100644 --- a/packages/backend-rs/src/model/entity/renote_muting.rs +++ b/packages/backend-rs/src/model/entity/renote_muting.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "muteeId")] pub mutee_id: String, #[sea_orm(column_name = "muterId")] diff --git a/packages/backend-rs/src/model/entity/reply_muting.rs b/packages/backend-rs/src/model/entity/reply_muting.rs index 77891d1ee2..5f24dcad52 100644 --- a/packages/backend-rs/src/model/entity/reply_muting.rs +++ b/packages/backend-rs/src/model/entity/reply_muting.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "muteeId")] pub mutee_id: String, #[sea_orm(column_name = "muterId")] diff --git a/packages/backend-rs/src/model/entity/signin.rs b/packages/backend-rs/src/model/entity/signin.rs index d5584f9d84..df5590a530 100644 --- a/packages/backend-rs/src/model/entity/signin.rs +++ b/packages/backend-rs/src/model/entity/signin.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub ip: String, diff --git a/packages/backend-rs/src/model/entity/sw_subscription.rs b/packages/backend-rs/src/model/entity/sw_subscription.rs index fe694177f3..bedb091701 100644 --- a/packages/backend-rs/src/model/entity/sw_subscription.rs +++ b/packages/backend-rs/src/model/entity/sw_subscription.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub endpoint: String, diff --git a/packages/backend-rs/src/model/entity/used_username.rs b/packages/backend-rs/src/model/entity/used_username.rs index 8557955034..c9bec5bd96 100644 --- a/packages/backend-rs/src/model/entity/used_username.rs +++ b/packages/backend-rs/src/model/entity/used_username.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub username: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, } #[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)] diff --git a/packages/backend-rs/src/model/entity/user.rs b/packages/backend-rs/src/model/entity/user.rs index 3ceac93fb5..6329cada0a 100644 --- a/packages/backend-rs/src/model/entity/user.rs +++ b/packages/backend-rs/src/model/entity/user.rs @@ -14,11 +14,11 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "updatedAt")] - pub updated_at: Option, + pub updated_at: Option, #[sea_orm(column_name = "lastFetchedAt")] - pub last_fetched_at: Option, + pub last_fetched_at: Option, pub username: String, #[sea_orm(column_name = "usernameLower")] pub username_lower: String, @@ -62,7 +62,7 @@ pub struct Model { #[sea_orm(column_name = "followersUri")] pub followers_uri: Option, #[sea_orm(column_name = "lastActiveDate")] - pub last_active_date: Option, + pub last_active_date: Option, #[sea_orm(column_name = "hideOnlineStatus")] pub hide_online_status: bool, #[sea_orm(column_name = "isDeleted")] diff --git a/packages/backend-rs/src/model/entity/user_group.rs b/packages/backend-rs/src/model/entity/user_group.rs index 387c50d422..d57a730a48 100644 --- a/packages/backend-rs/src/model/entity/user_group.rs +++ b/packages/backend-rs/src/model/entity/user_group.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, pub name: String, #[sea_orm(column_name = "userId")] pub user_id: String, diff --git a/packages/backend-rs/src/model/entity/user_group_invitation.rs b/packages/backend-rs/src/model/entity/user_group_invitation.rs index 289acf89df..852638b0e4 100644 --- a/packages/backend-rs/src/model/entity/user_group_invitation.rs +++ b/packages/backend-rs/src/model/entity/user_group_invitation.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "userGroupId")] diff --git a/packages/backend-rs/src/model/entity/user_group_invite.rs b/packages/backend-rs/src/model/entity/user_group_invite.rs index 62fcf0c524..14f01486f6 100644 --- a/packages/backend-rs/src/model/entity/user_group_invite.rs +++ b/packages/backend-rs/src/model/entity/user_group_invite.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "userGroupId")] diff --git a/packages/backend-rs/src/model/entity/user_group_joining.rs b/packages/backend-rs/src/model/entity/user_group_joining.rs index b29bdd11eb..fabd7eccbd 100644 --- a/packages/backend-rs/src/model/entity/user_group_joining.rs +++ b/packages/backend-rs/src/model/entity/user_group_joining.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "userGroupId")] diff --git a/packages/backend-rs/src/model/entity/user_ip.rs b/packages/backend-rs/src/model/entity/user_ip.rs index 9847fb8d65..77a9af9987 100644 --- a/packages/backend-rs/src/model/entity/user_ip.rs +++ b/packages/backend-rs/src/model/entity/user_ip.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key)] pub id: i32, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub ip: String, diff --git a/packages/backend-rs/src/model/entity/user_list.rs b/packages/backend-rs/src/model/entity/user_list.rs index 30dc6db715..ce6f3f0095 100644 --- a/packages/backend-rs/src/model/entity/user_list.rs +++ b/packages/backend-rs/src/model/entity/user_list.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub name: String, diff --git a/packages/backend-rs/src/model/entity/user_list_joining.rs b/packages/backend-rs/src/model/entity/user_list_joining.rs index 972cc34bb6..ae1c2ad429 100644 --- a/packages/backend-rs/src/model/entity/user_list_joining.rs +++ b/packages/backend-rs/src/model/entity/user_list_joining.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "userListId")] diff --git a/packages/backend-rs/src/model/entity/user_note_pining.rs b/packages/backend-rs/src/model/entity/user_note_pining.rs index 26f05274fd..fcdc3d9d52 100644 --- a/packages/backend-rs/src/model/entity/user_note_pining.rs +++ b/packages/backend-rs/src/model/entity/user_note_pining.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, #[sea_orm(column_name = "noteId")] diff --git a/packages/backend-rs/src/model/entity/user_pending.rs b/packages/backend-rs/src/model/entity/user_pending.rs index 43a5c2f1e2..9b13a2f655 100644 --- a/packages/backend-rs/src/model/entity/user_pending.rs +++ b/packages/backend-rs/src/model/entity/user_pending.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, pub code: String, pub username: String, pub email: String, diff --git a/packages/backend-rs/src/model/entity/user_security_key.rs b/packages/backend-rs/src/model/entity/user_security_key.rs index a4694cf177..0aba2916f0 100644 --- a/packages/backend-rs/src/model/entity/user_security_key.rs +++ b/packages/backend-rs/src/model/entity/user_security_key.rs @@ -17,7 +17,7 @@ pub struct Model { #[sea_orm(column_name = "publicKey")] pub public_key: String, #[sea_orm(column_name = "lastUsed")] - pub last_used: DateTime, + pub last_used: DateTimeWithTimeZone, pub name: String, } diff --git a/packages/backend-rs/src/model/entity/webhook.rs b/packages/backend-rs/src/model/entity/webhook.rs index 430cf9fcc0..5795550630 100644 --- a/packages/backend-rs/src/model/entity/webhook.rs +++ b/packages/backend-rs/src/model/entity/webhook.rs @@ -13,7 +13,7 @@ pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: String, #[sea_orm(column_name = "createdAt")] - pub created_at: DateTime, + pub created_at: DateTimeWithTimeZone, #[sea_orm(column_name = "userId")] pub user_id: String, pub name: String, @@ -22,7 +22,7 @@ pub struct Model { pub secret: String, pub active: bool, #[sea_orm(column_name = "latestSentAt")] - pub latest_sent_at: Option, + pub latest_sent_at: Option, #[sea_orm(column_name = "latestStatus")] pub latest_status: Option, } diff --git a/packages/backend-rs/src/service/note/watch.rs b/packages/backend-rs/src/service/note/watch.rs index f740ec6ce4..69e30c0f9b 100644 --- a/packages/backend-rs/src/service/note/watch.rs +++ b/packages/backend-rs/src/service/note/watch.rs @@ -12,7 +12,7 @@ pub async fn watch_note( if watcher_id != note_author_id { note_watching::Entity::insert(note_watching::ActiveModel { id: ActiveValue::set(gen_id()), - created_at: ActiveValue::set(chrono::Local::now().naive_local()), + created_at: ActiveValue::set(chrono::Utc::now().into()), user_id: ActiveValue::Set(watcher_id.to_string()), note_user_id: ActiveValue::Set(note_author_id.to_string()), note_id: ActiveValue::Set(note_id.to_string()), diff --git a/packages/backend/src/@types/backend-rs.d.ts b/packages/backend/src/@types/backend-rs.d.ts new file mode 100644 index 0000000000..c1a6cc71be --- /dev/null +++ b/packages/backend/src/@types/backend-rs.d.ts @@ -0,0 +1 @@ +type DateTimeWithTimeZone = Date; diff --git a/packages/backend/src/migration/1715351290096-add-back-timezone.ts b/packages/backend/src/migration/1715351290096-add-back-timezone.ts new file mode 100644 index 0000000000..51b6f2d842 --- /dev/null +++ b/packages/backend/src/migration/1715351290096-add-back-timezone.ts @@ -0,0 +1,459 @@ +import type { MigrationInterface, QueryRunner } from "typeorm"; + +export class AddBackTimezone1715351290096 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "app" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "following" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "page" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp with time zone`, + ); + await queryRunner.query( + `ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp with time zone`, + ); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "app" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "following" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "page" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp without time zone`, + ); + await queryRunner.query( + `ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp without time zone`, + ); + } +} diff --git a/packages/backend/src/models/entities/abuse-user-report.ts b/packages/backend/src/models/entities/abuse-user-report.ts index 88f24d130d..37789c91e7 100644 --- a/packages/backend/src/models/entities/abuse-user-report.ts +++ b/packages/backend/src/models/entities/abuse-user-report.ts @@ -16,7 +16,7 @@ export class AbuseUserReport { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the AbuseUserReport.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/access-token.ts b/packages/backend/src/models/entities/access-token.ts index a10cf7a907..e8725b14c3 100644 --- a/packages/backend/src/models/entities/access-token.ts +++ b/packages/backend/src/models/entities/access-token.ts @@ -16,12 +16,12 @@ export class AccessToken { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the AccessToken.", }) public createdAt: Date; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public lastUsedAt: Date | null; diff --git a/packages/backend/src/models/entities/ad.ts b/packages/backend/src/models/entities/ad.ts index a7a630d425..80d54ddd52 100644 --- a/packages/backend/src/models/entities/ad.ts +++ b/packages/backend/src/models/entities/ad.ts @@ -7,13 +7,13 @@ export class Ad { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Ad.", }) public createdAt: Date; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The expired date of the Ad.", }) public expiresAt: Date; diff --git a/packages/backend/src/models/entities/announcement-read.ts b/packages/backend/src/models/entities/announcement-read.ts index 3adff38dab..c32c08c305 100644 --- a/packages/backend/src/models/entities/announcement-read.ts +++ b/packages/backend/src/models/entities/announcement-read.ts @@ -17,7 +17,7 @@ export class AnnouncementRead { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the AnnouncementRead.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/announcement.ts b/packages/backend/src/models/entities/announcement.ts index cd6ae77bc4..7872c0fe1c 100644 --- a/packages/backend/src/models/entities/announcement.ts +++ b/packages/backend/src/models/entities/announcement.ts @@ -7,12 +7,12 @@ export class Announcement { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Announcement.", }) public createdAt: Date; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The updated date of the Announcement.", nullable: true, }) diff --git a/packages/backend/src/models/entities/antenna.ts b/packages/backend/src/models/entities/antenna.ts index 7b514cb010..741a8f18a3 100644 --- a/packages/backend/src/models/entities/antenna.ts +++ b/packages/backend/src/models/entities/antenna.ts @@ -17,7 +17,7 @@ export class Antenna { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Antenna.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/app.ts b/packages/backend/src/models/entities/app.ts index cddfb18ee3..f155e187fa 100644 --- a/packages/backend/src/models/entities/app.ts +++ b/packages/backend/src/models/entities/app.ts @@ -15,7 +15,7 @@ export class App { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the App.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/attestation-challenge.ts b/packages/backend/src/models/entities/attestation-challenge.ts index 9121ef5368..5c91e6dc1d 100644 --- a/packages/backend/src/models/entities/attestation-challenge.ts +++ b/packages/backend/src/models/entities/attestation-challenge.ts @@ -26,7 +26,7 @@ export class AttestationChallenge { }) public challenge: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The date challenge was created for expiry purposes.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/auth-session.ts b/packages/backend/src/models/entities/auth-session.ts index 9f86709889..f2ec7a402c 100644 --- a/packages/backend/src/models/entities/auth-session.ts +++ b/packages/backend/src/models/entities/auth-session.ts @@ -16,7 +16,7 @@ export class AuthSession { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the AuthSession.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/blocking.ts b/packages/backend/src/models/entities/blocking.ts index b530834075..828a5550f7 100644 --- a/packages/backend/src/models/entities/blocking.ts +++ b/packages/backend/src/models/entities/blocking.ts @@ -17,7 +17,7 @@ export class Blocking { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Blocking.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/channel-following.ts b/packages/backend/src/models/entities/channel-following.ts index 7314366636..b1727ecc9c 100644 --- a/packages/backend/src/models/entities/channel-following.ts +++ b/packages/backend/src/models/entities/channel-following.ts @@ -18,7 +18,7 @@ export class ChannelFollowing { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the ChannelFollowing.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/channel-note-pining.ts b/packages/backend/src/models/entities/channel-note-pining.ts index 7061b83504..ea3bcf67e5 100644 --- a/packages/backend/src/models/entities/channel-note-pining.ts +++ b/packages/backend/src/models/entities/channel-note-pining.ts @@ -17,7 +17,7 @@ export class ChannelNotePining { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the ChannelNotePining.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/channel.ts b/packages/backend/src/models/entities/channel.ts index 99cd3d283f..425398d446 100644 --- a/packages/backend/src/models/entities/channel.ts +++ b/packages/backend/src/models/entities/channel.ts @@ -17,13 +17,13 @@ export class Channel { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Channel.", }) public createdAt: Date; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public lastNotedAt: Date | null; diff --git a/packages/backend/src/models/entities/clip.ts b/packages/backend/src/models/entities/clip.ts index 389d008f74..90388ac087 100644 --- a/packages/backend/src/models/entities/clip.ts +++ b/packages/backend/src/models/entities/clip.ts @@ -15,7 +15,7 @@ export class Clip { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Clip.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/drive-file.ts b/packages/backend/src/models/entities/drive-file.ts index e3a7d1c370..b5fc632be1 100644 --- a/packages/backend/src/models/entities/drive-file.ts +++ b/packages/backend/src/models/entities/drive-file.ts @@ -23,7 +23,7 @@ export class DriveFile { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the DriveFile.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/drive-folder.ts b/packages/backend/src/models/entities/drive-folder.ts index 17580f3c8d..1d6b24044d 100644 --- a/packages/backend/src/models/entities/drive-folder.ts +++ b/packages/backend/src/models/entities/drive-folder.ts @@ -16,7 +16,7 @@ export class DriveFolder { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the DriveFolder.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/emoji.ts b/packages/backend/src/models/entities/emoji.ts index 1f40052389..87b525dc59 100644 --- a/packages/backend/src/models/entities/emoji.ts +++ b/packages/backend/src/models/entities/emoji.ts @@ -7,7 +7,7 @@ export class Emoji { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public updatedAt: Date | null; diff --git a/packages/backend/src/models/entities/follow-request.ts b/packages/backend/src/models/entities/follow-request.ts index 1631d8c965..615de69b21 100644 --- a/packages/backend/src/models/entities/follow-request.ts +++ b/packages/backend/src/models/entities/follow-request.ts @@ -16,7 +16,7 @@ export class FollowRequest { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the FollowRequest.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/following.ts b/packages/backend/src/models/entities/following.ts index 855b9f1745..350980b550 100644 --- a/packages/backend/src/models/entities/following.ts +++ b/packages/backend/src/models/entities/following.ts @@ -17,7 +17,7 @@ export class Following { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Following.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/gallery-like.ts b/packages/backend/src/models/entities/gallery-like.ts index f8ec098f68..80bac095d8 100644 --- a/packages/backend/src/models/entities/gallery-like.ts +++ b/packages/backend/src/models/entities/gallery-like.ts @@ -17,7 +17,7 @@ export class GalleryLike { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone") + @Column("timestamp with time zone") public createdAt: Date; @Index() diff --git a/packages/backend/src/models/entities/gallery-post.ts b/packages/backend/src/models/entities/gallery-post.ts index 711e7a7860..5152f75717 100644 --- a/packages/backend/src/models/entities/gallery-post.ts +++ b/packages/backend/src/models/entities/gallery-post.ts @@ -17,13 +17,13 @@ export class GalleryPost { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the GalleryPost.", }) public createdAt: Date; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The updated date of the GalleryPost.", }) public updatedAt: Date; diff --git a/packages/backend/src/models/entities/instance.ts b/packages/backend/src/models/entities/instance.ts index afdedd2d3f..daeadaec8f 100644 --- a/packages/backend/src/models/entities/instance.ts +++ b/packages/backend/src/models/entities/instance.ts @@ -23,7 +23,7 @@ export class Instance { * このインスタンスを捕捉した日時 */ @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The caught date of the Instance.", }) public caughtAt: Date; @@ -75,7 +75,7 @@ export class Instance { /** * 直近のリクエスト送信日時 */ - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public latestRequestSentAt: Date | null; @@ -91,7 +91,7 @@ export class Instance { /** * 直近のリクエスト受信日時 */ - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public latestRequestReceivedAt: Date | null; @@ -99,7 +99,7 @@ export class Instance { /** * このインスタンスと最後にやり取りした日時 */ - @Column("timestamp without time zone") + @Column("timestamp with time zone") public lastCommunicatedAt: Date; /** @@ -179,7 +179,7 @@ export class Instance { }) public themeColor: string | null; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public infoUpdatedAt: Date | null; diff --git a/packages/backend/src/models/entities/messaging-message.ts b/packages/backend/src/models/entities/messaging-message.ts index 5c9c17a027..039811887c 100644 --- a/packages/backend/src/models/entities/messaging-message.ts +++ b/packages/backend/src/models/entities/messaging-message.ts @@ -18,7 +18,7 @@ export class MessagingMessage { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the MessagingMessage.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/moderation-log.ts b/packages/backend/src/models/entities/moderation-log.ts index 6eb3ec27ff..a2081d2f5e 100644 --- a/packages/backend/src/models/entities/moderation-log.ts +++ b/packages/backend/src/models/entities/moderation-log.ts @@ -15,7 +15,7 @@ export class ModerationLog { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the ModerationLog.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/muting.ts b/packages/backend/src/models/entities/muting.ts index dd6ee0bf44..fac613d790 100644 --- a/packages/backend/src/models/entities/muting.ts +++ b/packages/backend/src/models/entities/muting.ts @@ -17,13 +17,13 @@ export class Muting { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Muting.", }) public createdAt: Date; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public expiresAt: Date | null; diff --git a/packages/backend/src/models/entities/note-edit.ts b/packages/backend/src/models/entities/note-edit.ts index aed85c7614..18d0e19003 100644 --- a/packages/backend/src/models/entities/note-edit.ts +++ b/packages/backend/src/models/entities/note-edit.ts @@ -40,7 +40,7 @@ export class NoteEdit { }) public fileIds: DriveFile["id"][]; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The updated date of the Note.", }) public updatedAt: Date; diff --git a/packages/backend/src/models/entities/note-favorite.ts b/packages/backend/src/models/entities/note-favorite.ts index 200655e929..5915af842d 100644 --- a/packages/backend/src/models/entities/note-favorite.ts +++ b/packages/backend/src/models/entities/note-favorite.ts @@ -17,7 +17,7 @@ export class NoteFavorite { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the NoteFavorite.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/note-reaction.ts b/packages/backend/src/models/entities/note-reaction.ts index 1d2fc567b5..8dfa6ad28e 100644 --- a/packages/backend/src/models/entities/note-reaction.ts +++ b/packages/backend/src/models/entities/note-reaction.ts @@ -17,7 +17,7 @@ export class NoteReaction { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the NoteReaction.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/note-thread-muting.ts b/packages/backend/src/models/entities/note-thread-muting.ts index 9566d6d89f..c20d0f41e3 100644 --- a/packages/backend/src/models/entities/note-thread-muting.ts +++ b/packages/backend/src/models/entities/note-thread-muting.ts @@ -16,7 +16,7 @@ export class NoteThreadMuting { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", {}) + @Column("timestamp with time zone", {}) public createdAt: Date; @Index() diff --git a/packages/backend/src/models/entities/note-watching.ts b/packages/backend/src/models/entities/note-watching.ts index 37b48b75b8..b7473c9135 100644 --- a/packages/backend/src/models/entities/note-watching.ts +++ b/packages/backend/src/models/entities/note-watching.ts @@ -18,7 +18,7 @@ export class NoteWatching { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the NoteWatching.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/note.ts b/packages/backend/src/models/entities/note.ts index 3b7315288e..1c9d3570a3 100644 --- a/packages/backend/src/models/entities/note.ts +++ b/packages/backend/src/models/entities/note.ts @@ -26,7 +26,7 @@ export class Note { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Note.", }) public createdAt: Date; @@ -238,7 +238,7 @@ export class Note { }) public renoteUserHost: string | null; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, comment: "The updated date of the Note.", }) diff --git a/packages/backend/src/models/entities/notification.ts b/packages/backend/src/models/entities/notification.ts index 57a2a59158..6c3ec5bbd2 100644 --- a/packages/backend/src/models/entities/notification.ts +++ b/packages/backend/src/models/entities/notification.ts @@ -20,7 +20,7 @@ export class Notification { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Notification.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/page-like.ts b/packages/backend/src/models/entities/page-like.ts index fba142375d..0ec17e34e0 100644 --- a/packages/backend/src/models/entities/page-like.ts +++ b/packages/backend/src/models/entities/page-like.ts @@ -17,7 +17,7 @@ export class PageLike { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone") + @Column("timestamp with time zone") public createdAt: Date; @Index() diff --git a/packages/backend/src/models/entities/page.ts b/packages/backend/src/models/entities/page.ts index af8e095dd5..7120b289c1 100644 --- a/packages/backend/src/models/entities/page.ts +++ b/packages/backend/src/models/entities/page.ts @@ -18,13 +18,13 @@ export class Page { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Page.", }) public createdAt: Date; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The updated date of the Page.", }) public updatedAt: Date; diff --git a/packages/backend/src/models/entities/password-reset-request.ts b/packages/backend/src/models/entities/password-reset-request.ts index 23ec16e38b..048c45b0c8 100644 --- a/packages/backend/src/models/entities/password-reset-request.ts +++ b/packages/backend/src/models/entities/password-reset-request.ts @@ -15,7 +15,7 @@ export class PasswordResetRequest { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone") + @Column("timestamp with time zone") public createdAt: Date; @Index({ unique: true }) diff --git a/packages/backend/src/models/entities/poll-vote.ts b/packages/backend/src/models/entities/poll-vote.ts index 7b9cc19c3c..40a0d9ae07 100644 --- a/packages/backend/src/models/entities/poll-vote.ts +++ b/packages/backend/src/models/entities/poll-vote.ts @@ -18,7 +18,7 @@ export class PollVote { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the PollVote.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/poll.ts b/packages/backend/src/models/entities/poll.ts index 9ef2091566..2c5f556b4d 100644 --- a/packages/backend/src/models/entities/poll.ts +++ b/packages/backend/src/models/entities/poll.ts @@ -17,7 +17,7 @@ export class Poll { @PrimaryColumn(id()) public noteId: Note["id"]; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public expiresAt: Date | null; diff --git a/packages/backend/src/models/entities/promo-note.ts b/packages/backend/src/models/entities/promo-note.ts index 18ff3ac63c..54424f4339 100644 --- a/packages/backend/src/models/entities/promo-note.ts +++ b/packages/backend/src/models/entities/promo-note.ts @@ -16,7 +16,7 @@ export class PromoNote { @PrimaryColumn(id()) public noteId: Note["id"]; - @Column("timestamp without time zone") + @Column("timestamp with time zone") public expiresAt: Date; //#region Denormalized fields diff --git a/packages/backend/src/models/entities/promo-read.ts b/packages/backend/src/models/entities/promo-read.ts index efda0757c6..a28c22f8f1 100644 --- a/packages/backend/src/models/entities/promo-read.ts +++ b/packages/backend/src/models/entities/promo-read.ts @@ -17,7 +17,7 @@ export class PromoRead { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the PromoRead.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/registration-tickets.ts b/packages/backend/src/models/entities/registration-tickets.ts index db0a416550..549f05d07a 100644 --- a/packages/backend/src/models/entities/registration-tickets.ts +++ b/packages/backend/src/models/entities/registration-tickets.ts @@ -6,7 +6,7 @@ export class RegistrationTicket { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone") + @Column("timestamp with time zone") public createdAt: Date; @Index({ unique: true }) diff --git a/packages/backend/src/models/entities/registry-item.ts b/packages/backend/src/models/entities/registry-item.ts index e9e54b7122..d143ba1df8 100644 --- a/packages/backend/src/models/entities/registry-item.ts +++ b/packages/backend/src/models/entities/registry-item.ts @@ -16,12 +16,12 @@ export class RegistryItem { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the RegistryItem.", }) public createdAt: Date; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The updated date of the RegistryItem.", }) public updatedAt: Date; diff --git a/packages/backend/src/models/entities/renote-muting.ts b/packages/backend/src/models/entities/renote-muting.ts index 42cb14127b..86c560d32d 100644 --- a/packages/backend/src/models/entities/renote-muting.ts +++ b/packages/backend/src/models/entities/renote-muting.ts @@ -17,7 +17,7 @@ export class RenoteMuting { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Muting.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/reply-muting.ts b/packages/backend/src/models/entities/reply-muting.ts index e48463e683..22cfea4e7d 100644 --- a/packages/backend/src/models/entities/reply-muting.ts +++ b/packages/backend/src/models/entities/reply-muting.ts @@ -17,7 +17,7 @@ export class ReplyMuting { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Muting.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/signin.ts b/packages/backend/src/models/entities/signin.ts index 89d50a6b5f..7137cdb946 100644 --- a/packages/backend/src/models/entities/signin.ts +++ b/packages/backend/src/models/entities/signin.ts @@ -15,7 +15,7 @@ export class Signin { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Signin.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/sw-subscription.ts b/packages/backend/src/models/entities/sw-subscription.ts index a4a6ae7711..c1837e329e 100644 --- a/packages/backend/src/models/entities/sw-subscription.ts +++ b/packages/backend/src/models/entities/sw-subscription.ts @@ -15,7 +15,7 @@ export class SwSubscription { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone") + @Column("timestamp with time zone") public createdAt: Date; @Index() diff --git a/packages/backend/src/models/entities/used-username.ts b/packages/backend/src/models/entities/used-username.ts index 4504301b14..d00a25991e 100644 --- a/packages/backend/src/models/entities/used-username.ts +++ b/packages/backend/src/models/entities/used-username.ts @@ -7,7 +7,7 @@ export class UsedUsername { }) public username: string; - @Column("timestamp without time zone") + @Column("timestamp with time zone") public createdAt: Date; constructor(data: Partial) { diff --git a/packages/backend/src/models/entities/user-group-invitation.ts b/packages/backend/src/models/entities/user-group-invitation.ts index be34fdc757..1fdfb96b5c 100644 --- a/packages/backend/src/models/entities/user-group-invitation.ts +++ b/packages/backend/src/models/entities/user-group-invitation.ts @@ -17,7 +17,7 @@ export class UserGroupInvitation { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the UserGroupInvitation.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/user-group-joining.ts b/packages/backend/src/models/entities/user-group-joining.ts index d7af03bf8f..598d6ebf4a 100644 --- a/packages/backend/src/models/entities/user-group-joining.ts +++ b/packages/backend/src/models/entities/user-group-joining.ts @@ -17,7 +17,7 @@ export class UserGroupJoining { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the UserGroupJoining.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/user-group.ts b/packages/backend/src/models/entities/user-group.ts index 801b4e619f..379af8be05 100644 --- a/packages/backend/src/models/entities/user-group.ts +++ b/packages/backend/src/models/entities/user-group.ts @@ -16,7 +16,7 @@ export class UserGroup { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the UserGroup.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/user-ip.ts b/packages/backend/src/models/entities/user-ip.ts index 7c43816b66..adef48e4c4 100644 --- a/packages/backend/src/models/entities/user-ip.ts +++ b/packages/backend/src/models/entities/user-ip.ts @@ -8,7 +8,7 @@ export class UserIp { @PrimaryGeneratedColumn() public id: string; - @Column("timestamp without time zone", {}) + @Column("timestamp with time zone", {}) public createdAt: Date; @Index() diff --git a/packages/backend/src/models/entities/user-list-joining.ts b/packages/backend/src/models/entities/user-list-joining.ts index bd3ef8bde1..2089a072cc 100644 --- a/packages/backend/src/models/entities/user-list-joining.ts +++ b/packages/backend/src/models/entities/user-list-joining.ts @@ -17,7 +17,7 @@ export class UserListJoining { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the UserListJoining.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/user-list.ts b/packages/backend/src/models/entities/user-list.ts index 6f192c6bab..a1496bfde2 100644 --- a/packages/backend/src/models/entities/user-list.ts +++ b/packages/backend/src/models/entities/user-list.ts @@ -15,7 +15,7 @@ export class UserList { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the UserList.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/user-note-pining.ts b/packages/backend/src/models/entities/user-note-pining.ts index d262c3f5b3..053abde91c 100644 --- a/packages/backend/src/models/entities/user-note-pining.ts +++ b/packages/backend/src/models/entities/user-note-pining.ts @@ -17,7 +17,7 @@ export class UserNotePining { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the UserNotePinings.", }) public createdAt: Date; diff --git a/packages/backend/src/models/entities/user-pending.ts b/packages/backend/src/models/entities/user-pending.ts index 1383c4d4da..18ae5ad993 100644 --- a/packages/backend/src/models/entities/user-pending.ts +++ b/packages/backend/src/models/entities/user-pending.ts @@ -6,7 +6,7 @@ export class UserPending { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone") + @Column("timestamp with time zone") public createdAt: Date; @Index({ unique: true }) diff --git a/packages/backend/src/models/entities/user-security-key.ts b/packages/backend/src/models/entities/user-security-key.ts index b2853f0aa9..ead900be06 100644 --- a/packages/backend/src/models/entities/user-security-key.ts +++ b/packages/backend/src/models/entities/user-security-key.ts @@ -28,7 +28,7 @@ export class UserSecurityKey { }) public publicKey: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The date of the last time the UserSecurityKey was successfully validated.", }) diff --git a/packages/backend/src/models/entities/user.ts b/packages/backend/src/models/entities/user.ts index ad86e72422..65780eb44d 100644 --- a/packages/backend/src/models/entities/user.ts +++ b/packages/backend/src/models/entities/user.ts @@ -19,25 +19,25 @@ export class User { public id: string; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the User.", }) public createdAt: Date; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, comment: "The updated date of the User.", }) public updatedAt: Date | null; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public lastFetchedAt: Date | null; @Index() - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public lastActiveDate: Date | null; diff --git a/packages/backend/src/models/entities/webhook.ts b/packages/backend/src/models/entities/webhook.ts index bc48e537ae..8f3fa1d82c 100644 --- a/packages/backend/src/models/entities/webhook.ts +++ b/packages/backend/src/models/entities/webhook.ts @@ -26,7 +26,7 @@ export class Webhook { @PrimaryColumn(id()) public id: string; - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { comment: "The created date of the Antenna.", }) public createdAt: Date; @@ -71,7 +71,7 @@ export class Webhook { /** * 直近のリクエスト送信日時 */ - @Column("timestamp without time zone", { + @Column("timestamp with time zone", { nullable: true, }) public latestSentAt: Date | null;