From 91ccce43078630ad96b7a02af7dcbef0d8a93ff3 Mon Sep 17 00:00:00 2001 From: naskya Date: Sun, 7 Apr 2024 04:50:21 +0900 Subject: [PATCH] refactor (backend): drop timezone data (which is not used at all) Co-authored-by: sup39 --- docs/downgrade.sql | 78 +++++++++ .../migration/1712425488543-drop-time-zone.ts | 159 ++++++++++++++++++ .../src/models/entities/abuse-user-report.ts | 2 +- .../src/models/entities/access-token.ts | 4 +- packages/backend/src/models/entities/ad.ts | 4 +- .../src/models/entities/announcement-read.ts | 2 +- .../src/models/entities/announcement.ts | 4 +- .../backend/src/models/entities/antenna.ts | 2 +- packages/backend/src/models/entities/app.ts | 2 +- .../models/entities/attestation-challenge.ts | 2 +- .../src/models/entities/auth-session.ts | 2 +- .../backend/src/models/entities/blocking.ts | 2 +- .../src/models/entities/channel-following.ts | 2 +- .../models/entities/channel-note-pining.ts | 2 +- .../backend/src/models/entities/channel.ts | 4 +- packages/backend/src/models/entities/clip.ts | 2 +- .../backend/src/models/entities/drive-file.ts | 2 +- .../src/models/entities/drive-folder.ts | 2 +- packages/backend/src/models/entities/emoji.ts | 2 +- .../src/models/entities/follow-request.ts | 2 +- .../backend/src/models/entities/following.ts | 2 +- .../src/models/entities/gallery-like.ts | 2 +- .../src/models/entities/gallery-post.ts | 4 +- .../backend/src/models/entities/instance.ts | 10 +- .../src/models/entities/messaging-message.ts | 2 +- .../src/models/entities/moderation-log.ts | 2 +- .../backend/src/models/entities/muting.ts | 4 +- .../backend/src/models/entities/note-edit.ts | 2 +- .../src/models/entities/note-favorite.ts | 2 +- .../src/models/entities/note-reaction.ts | 2 +- .../src/models/entities/note-thread-muting.ts | 2 +- .../src/models/entities/note-watching.ts | 2 +- packages/backend/src/models/entities/note.ts | 4 +- .../src/models/entities/notification.ts | 2 +- .../backend/src/models/entities/page-like.ts | 2 +- packages/backend/src/models/entities/page.ts | 4 +- .../models/entities/password-reset-request.ts | 2 +- .../backend/src/models/entities/poll-vote.ts | 2 +- packages/backend/src/models/entities/poll.ts | 2 +- .../backend/src/models/entities/promo-note.ts | 2 +- .../backend/src/models/entities/promo-read.ts | 2 +- .../models/entities/registration-tickets.ts | 2 +- .../src/models/entities/registry-item.ts | 4 +- .../src/models/entities/renote-muting.ts | 2 +- .../src/models/entities/reply-muting.ts | 2 +- .../backend/src/models/entities/signin.ts | 2 +- .../src/models/entities/sw-subscription.ts | 2 +- .../src/models/entities/used-username.ts | 2 +- .../models/entities/user-group-invitation.ts | 2 +- .../src/models/entities/user-group-joining.ts | 2 +- .../backend/src/models/entities/user-group.ts | 2 +- .../backend/src/models/entities/user-ip.ts | 2 +- .../src/models/entities/user-list-joining.ts | 2 +- .../backend/src/models/entities/user-list.ts | 2 +- .../src/models/entities/user-note-pining.ts | 2 +- .../src/models/entities/user-pending.ts | 2 +- .../src/models/entities/user-security-key.ts | 2 +- packages/backend/src/models/entities/user.ts | 8 +- .../backend/src/models/entities/webhook.ts | 4 +- 59 files changed, 311 insertions(+), 74 deletions(-) create mode 100644 packages/backend/src/migration/1712425488543-drop-time-zone.ts diff --git a/docs/downgrade.sql b/docs/downgrade.sql index 62cefb8132..af95163abc 100644 --- a/docs/downgrade.sql +++ b/docs/downgrade.sql @@ -1,6 +1,7 @@ BEGIN; DELETE FROM "migrations" WHERE name IN ( + 'DropTimeZone1712425488543', 'ExpandNoteEdit1711936358554', 'markLocalFilesNsfwByDefault1709305200000', 'FixMutingIndices1710690239308', @@ -20,6 +21,83 @@ DELETE FROM "migrations" WHERE name IN ( 'RemoveNativeUtilsMigration1705877093218' ); +-- 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/src/migration/1712425488543-drop-time-zone.ts b/packages/backend/src/migration/1712425488543-drop-time-zone.ts new file mode 100644 index 0000000000..d1a275080c --- /dev/null +++ b/packages/backend/src/migration/1712425488543-drop-time-zone.ts @@ -0,0 +1,159 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class DropTimeZone1712425488543 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + queryRunner.query(`ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "app" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "following" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "note" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "page" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp without time zone`); + queryRunner.query(`ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp without time zone`); + } + + public async down(queryRunner: QueryRunner): Promise { + queryRunner.query(`ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "app" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "following" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "note" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "page" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp with time zone`); + queryRunner.query(`ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp with 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 cb4d55851d..015b74fc6f 100644 --- a/packages/backend/src/models/entities/abuse-user-report.ts +++ b/packages/backend/src/models/entities/abuse-user-report.ts @@ -15,7 +15,7 @@ export class AbuseUserReport { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 8b950b171b..82eb6516b5 100644 --- a/packages/backend/src/models/entities/access-token.ts +++ b/packages/backend/src/models/entities/access-token.ts @@ -15,12 +15,12 @@ export class AccessToken { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the AccessToken.", }) public createdAt: Date; - @Column("timestamp with time zone", { + @Column("timestamp without 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 80d54ddd52..a7a630d425 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 with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the Ad.", }) public createdAt: Date; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 79af9e48e3..c636834bc0 100644 --- a/packages/backend/src/models/entities/announcement-read.ts +++ b/packages/backend/src/models/entities/announcement-read.ts @@ -16,7 +16,7 @@ export class AnnouncementRead { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 7872c0fe1c..cd6ae77bc4 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 with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the Announcement.", }) public createdAt: Date; - @Column("timestamp with time zone", { + @Column("timestamp without 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 633dcc1d27..33d5668b80 100644 --- a/packages/backend/src/models/entities/antenna.ts +++ b/packages/backend/src/models/entities/antenna.ts @@ -16,7 +16,7 @@ export class Antenna { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 a41e35aa91..48e145343b 100644 --- a/packages/backend/src/models/entities/app.ts +++ b/packages/backend/src/models/entities/app.ts @@ -8,7 +8,7 @@ export class App { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 6a3a9c8ed7..c46dfcf227 100644 --- a/packages/backend/src/models/entities/attestation-challenge.ts +++ b/packages/backend/src/models/entities/attestation-challenge.ts @@ -31,7 +31,7 @@ export class AttestationChallenge { }) public challenge: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 b31dca56cf..f10e7133dc 100644 --- a/packages/backend/src/models/entities/auth-session.ts +++ b/packages/backend/src/models/entities/auth-session.ts @@ -15,7 +15,7 @@ export class AuthSession { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 55f677a981..414db10831 100644 --- a/packages/backend/src/models/entities/blocking.ts +++ b/packages/backend/src/models/entities/blocking.ts @@ -16,7 +16,7 @@ export class Blocking { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 ee329fa50f..22a268d133 100644 --- a/packages/backend/src/models/entities/channel-following.ts +++ b/packages/backend/src/models/entities/channel-following.ts @@ -17,7 +17,7 @@ export class ChannelFollowing { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 67d1d48ccd..22c8f02419 100644 --- a/packages/backend/src/models/entities/channel-note-pining.ts +++ b/packages/backend/src/models/entities/channel-note-pining.ts @@ -16,7 +16,7 @@ export class ChannelNotePining { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 ea22fed50b..cc4ba2177f 100644 --- a/packages/backend/src/models/entities/channel.ts +++ b/packages/backend/src/models/entities/channel.ts @@ -16,13 +16,13 @@ export class Channel { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the Channel.", }) public createdAt: Date; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 9554703a4c..f14d297f0f 100644 --- a/packages/backend/src/models/entities/clip.ts +++ b/packages/backend/src/models/entities/clip.ts @@ -14,7 +14,7 @@ export class Clip { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 3c4510b533..2832de1ce7 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 { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 0bb2c7a3d2..6b624f6220 100644 --- a/packages/backend/src/models/entities/drive-folder.ts +++ b/packages/backend/src/models/entities/drive-folder.ts @@ -15,7 +15,7 @@ export class DriveFolder { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 87b525dc59..1f40052389 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 with time zone", { + @Column("timestamp without 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 281eab9174..0a79bc2a53 100644 --- a/packages/backend/src/models/entities/follow-request.ts +++ b/packages/backend/src/models/entities/follow-request.ts @@ -15,7 +15,7 @@ export class FollowRequest { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 ea8f325650..339fe5d5f6 100644 --- a/packages/backend/src/models/entities/following.ts +++ b/packages/backend/src/models/entities/following.ts @@ -16,7 +16,7 @@ export class Following { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 259feb8bbb..975246ae9f 100644 --- a/packages/backend/src/models/entities/gallery-like.ts +++ b/packages/backend/src/models/entities/gallery-like.ts @@ -16,7 +16,7 @@ export class GalleryLike { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone") + @Column("timestamp without 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 938348659d..1e93a01f07 100644 --- a/packages/backend/src/models/entities/gallery-post.ts +++ b/packages/backend/src/models/entities/gallery-post.ts @@ -16,13 +16,13 @@ export class GalleryPost { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the GalleryPost.", }) public createdAt: Date; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 7b7701d07d..ab7b2fa456 100644 --- a/packages/backend/src/models/entities/instance.ts +++ b/packages/backend/src/models/entities/instance.ts @@ -10,7 +10,7 @@ export class Instance { * このインスタンスを捕捉した日時 */ @Index() - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The caught date of the Instance.", }) public caughtAt: Date; @@ -62,7 +62,7 @@ export class Instance { /** * 直近のリクエスト送信日時 */ - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { nullable: true, }) public latestRequestSentAt: Date | null; @@ -78,7 +78,7 @@ export class Instance { /** * 直近のリクエスト受信日時 */ - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { nullable: true, }) public latestRequestReceivedAt: Date | null; @@ -86,7 +86,7 @@ export class Instance { /** * このインスタンスと最後にやり取りした日時 */ - @Column("timestamp with time zone") + @Column("timestamp without time zone") public lastCommunicatedAt: Date; /** @@ -166,7 +166,7 @@ export class Instance { }) public themeColor: string | null; - @Column("timestamp with time zone", { + @Column("timestamp without 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 d1da00eaef..0f86d0ba02 100644 --- a/packages/backend/src/models/entities/messaging-message.ts +++ b/packages/backend/src/models/entities/messaging-message.ts @@ -17,7 +17,7 @@ export class MessagingMessage { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 26bf1cdfa4..00b716b890 100644 --- a/packages/backend/src/models/entities/moderation-log.ts +++ b/packages/backend/src/models/entities/moderation-log.ts @@ -14,7 +14,7 @@ export class ModerationLog { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 603619b468..1f9ff79992 100644 --- a/packages/backend/src/models/entities/muting.ts +++ b/packages/backend/src/models/entities/muting.ts @@ -16,13 +16,13 @@ export class Muting { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the Muting.", }) public createdAt: Date; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 ceb423411d..91e7b7d796 100644 --- a/packages/backend/src/models/entities/note-edit.ts +++ b/packages/backend/src/models/entities/note-edit.ts @@ -46,7 +46,7 @@ export class NoteEdit { }) public fileIds: DriveFile["id"][]; - @Column("timestamp with time zone", { + @Column("timestamp without 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 19641ecf45..a4caeea4a3 100644 --- a/packages/backend/src/models/entities/note-favorite.ts +++ b/packages/backend/src/models/entities/note-favorite.ts @@ -16,7 +16,7 @@ export class NoteFavorite { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 5e2a8d3e89..019edb19c6 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 { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 7e5fad59a4..a4760301b0 100644 --- a/packages/backend/src/models/entities/note-thread-muting.ts +++ b/packages/backend/src/models/entities/note-thread-muting.ts @@ -15,7 +15,7 @@ export class NoteThreadMuting { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", {}) + @Column("timestamp without 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 724b084af2..5848af9d00 100644 --- a/packages/backend/src/models/entities/note-watching.ts +++ b/packages/backend/src/models/entities/note-watching.ts @@ -17,7 +17,7 @@ export class NoteWatching { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 613fb7b11a..b71f6c0f2a 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 with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the Note.", }) public createdAt: Date; @@ -292,7 +292,7 @@ export class Note { }) public renoteUserHost: string | null; - @Column("timestamp with time zone", { + @Column("timestamp without 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 425cd55700..1e15649fd9 100644 --- a/packages/backend/src/models/entities/notification.ts +++ b/packages/backend/src/models/entities/notification.ts @@ -20,7 +20,7 @@ export class Notification { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 6304e0b24c..d4b82c6e13 100644 --- a/packages/backend/src/models/entities/page-like.ts +++ b/packages/backend/src/models/entities/page-like.ts @@ -16,7 +16,7 @@ export class PageLike { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone") + @Column("timestamp without 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 d0733c8ce4..7043932b89 100644 --- a/packages/backend/src/models/entities/page.ts +++ b/packages/backend/src/models/entities/page.ts @@ -17,13 +17,13 @@ export class Page { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the Page.", }) public createdAt: Date; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 ab0bccbbef..9e6a8f02cd 100644 --- a/packages/backend/src/models/entities/password-reset-request.ts +++ b/packages/backend/src/models/entities/password-reset-request.ts @@ -14,7 +14,7 @@ export class PasswordResetRequest { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone") + @Column("timestamp without 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 d59a720c37..f45812a007 100644 --- a/packages/backend/src/models/entities/poll-vote.ts +++ b/packages/backend/src/models/entities/poll-vote.ts @@ -17,7 +17,7 @@ export class PollVote { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 f84e5fb8f6..59d669782d 100644 --- a/packages/backend/src/models/entities/poll.ts +++ b/packages/backend/src/models/entities/poll.ts @@ -22,7 +22,7 @@ export class Poll { @JoinColumn() public note: Note | null; - @Column("timestamp with time zone", { + @Column("timestamp without 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 caa64927e9..d4e7ac0b86 100644 --- a/packages/backend/src/models/entities/promo-note.ts +++ b/packages/backend/src/models/entities/promo-note.ts @@ -21,7 +21,7 @@ export class PromoNote { @JoinColumn() public note: Note | null; - @Column("timestamp with time zone") + @Column("timestamp without 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 b31877dc34..f7c3bcd73d 100644 --- a/packages/backend/src/models/entities/promo-read.ts +++ b/packages/backend/src/models/entities/promo-read.ts @@ -16,7 +16,7 @@ export class PromoRead { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 549f05d07a..db0a416550 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 with time zone") + @Column("timestamp without 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 d044222e6e..73b1972411 100644 --- a/packages/backend/src/models/entities/registry-item.ts +++ b/packages/backend/src/models/entities/registry-item.ts @@ -15,12 +15,12 @@ export class RegistryItem { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the RegistryItem.", }) public createdAt: Date; - @Column("timestamp with time zone", { + @Column("timestamp without 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 e8856492f1..0bb4d7fd10 100644 --- a/packages/backend/src/models/entities/renote-muting.ts +++ b/packages/backend/src/models/entities/renote-muting.ts @@ -16,7 +16,7 @@ export class RenoteMuting { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 19c2418fae..d55a362c2f 100644 --- a/packages/backend/src/models/entities/reply-muting.ts +++ b/packages/backend/src/models/entities/reply-muting.ts @@ -16,7 +16,7 @@ export class ReplyMuting { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 517e71c8fd..5db5526e0a 100644 --- a/packages/backend/src/models/entities/signin.ts +++ b/packages/backend/src/models/entities/signin.ts @@ -14,7 +14,7 @@ export class Signin { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 f7823fbaaa..69138f21fe 100644 --- a/packages/backend/src/models/entities/sw-subscription.ts +++ b/packages/backend/src/models/entities/sw-subscription.ts @@ -14,7 +14,7 @@ export class SwSubscription { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone") + @Column("timestamp without 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 d00a25991e..4504301b14 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 with time zone") + @Column("timestamp without 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 fa2655ab67..0a38ac4dfa 100644 --- a/packages/backend/src/models/entities/user-group-invitation.ts +++ b/packages/backend/src/models/entities/user-group-invitation.ts @@ -16,7 +16,7 @@ export class UserGroupInvitation { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 78f820d0e8..6bbae5ae39 100644 --- a/packages/backend/src/models/entities/user-group-joining.ts +++ b/packages/backend/src/models/entities/user-group-joining.ts @@ -16,7 +16,7 @@ export class UserGroupJoining { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 23876ec8b8..7c62ccc593 100644 --- a/packages/backend/src/models/entities/user-group.ts +++ b/packages/backend/src/models/entities/user-group.ts @@ -15,7 +15,7 @@ export class UserGroup { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 adef48e4c4..7c43816b66 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 with time zone", {}) + @Column("timestamp without 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 4caa71ad32..43c485f6fa 100644 --- a/packages/backend/src/models/entities/user-list-joining.ts +++ b/packages/backend/src/models/entities/user-list-joining.ts @@ -16,7 +16,7 @@ export class UserListJoining { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 3c95d44d6b..bbc40240fc 100644 --- a/packages/backend/src/models/entities/user-list.ts +++ b/packages/backend/src/models/entities/user-list.ts @@ -14,7 +14,7 @@ export class UserList { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 c30fe1e028..af91908dfe 100644 --- a/packages/backend/src/models/entities/user-note-pining.ts +++ b/packages/backend/src/models/entities/user-note-pining.ts @@ -16,7 +16,7 @@ export class UserNotePining { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 18ae5ad993..1383c4d4da 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 with time zone") + @Column("timestamp without 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 511cab4ae4..6ac2070ee9 100644 --- a/packages/backend/src/models/entities/user-security-key.ts +++ b/packages/backend/src/models/entities/user-security-key.ts @@ -33,7 +33,7 @@ export class UserSecurityKey { }) public publicKey: string; - @Column("timestamp with time zone", { + @Column("timestamp without 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 6a2d3ee017..cf757d43e5 100644 --- a/packages/backend/src/models/entities/user.ts +++ b/packages/backend/src/models/entities/user.ts @@ -18,25 +18,25 @@ export class User { public id: string; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the User.", }) public createdAt: Date; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { nullable: true, comment: "The updated date of the User.", }) public updatedAt: Date | null; - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { nullable: true, }) public lastFetchedAt: Date | null; @Index() - @Column("timestamp with time zone", { + @Column("timestamp without 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 9573390b36..3d3a242906 100644 --- a/packages/backend/src/models/entities/webhook.ts +++ b/packages/backend/src/models/entities/webhook.ts @@ -25,7 +25,7 @@ export class Webhook { @PrimaryColumn(id()) public id: string; - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { comment: "The created date of the Antenna.", }) public createdAt: Date; @@ -76,7 +76,7 @@ export class Webhook { /** * 直近のリクエスト送信日時 */ - @Column("timestamp with time zone", { + @Column("timestamp without time zone", { nullable: true, }) public latestSentAt: Date | null;