refactor (backend): drop timezone data (which is not used at all)

Co-authored-by: sup39 <dev@sup39.dev>
This commit is contained in:
naskya 2024-04-07 04:50:21 +09:00
parent 3c469ccf43
commit 91ccce4307
No known key found for this signature in database
GPG Key ID: 712D413B3A9FED5C
59 changed files with 311 additions and 74 deletions

View File

@ -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";

View File

@ -0,0 +1,159 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class DropTimeZone1712425488543 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
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<void> {
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`);
}
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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,
})

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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()

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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()

View File

@ -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;

View File

@ -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.",
})

View File

@ -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;

View File

@ -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()

View File

@ -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;

View File

@ -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 })

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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 })

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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()

View File

@ -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<UsedUsername>) {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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()

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 })

View File

@ -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.",
})

View File

@ -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;

View File

@ -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;