Compare commits

...

13 Commits

Author SHA1 Message Date
laozhoubuluo 2a489f1ee0 Merge branch 'refactor/dont_federate_initially_flag' into 'develop'
refactor: use dont federate initially flag instead of visibility hack


See merge request firefish/firefish!10738
2024-05-19 15:27:55 +00:00
naskya 4005307cbe Merge branch 'renovate/lock-file-maintenance' into 'develop'
chore(deps): lock file maintenance

Co-authored-by: CI <project_7_bot_1bfaee5701aed20091a86249a967a6c1@noreply.firefish.dev>

See merge request firefish/firefish!10874
2024-05-19 12:25:27 +00:00
naskya 2535fed09a Merge branch 'renovate/fluent-ffmpeg-2.x' into 'develop'
fix(deps): update dependency fluent-ffmpeg to v2.1.3

Co-authored-by: CI <project_7_bot_1bfaee5701aed20091a86249a967a6c1@noreply.firefish.dev>

See merge request firefish/firefish!10873
2024-05-19 12:10:36 +00:00
CI 7e3b46f504 chore(deps): lock file maintenance 2024-05-19 12:06:46 +00:00
CI 32c00d3014 fix(deps): update dependency fluent-ffmpeg to v2.1.3 2024-05-19 12:05:27 +00:00
naskya aa78efd20e
docs: update changelog 2024-05-19 19:42:30 +09:00
naskya dbcecf6966
docs (minor): update notice-for-admins.md 2024-05-19 19:41:55 +09:00
naskya 3f22cdbf09 Merge branch 'fix/use-timestamptz' into 'develop'
fix: store timezone agnostic datetime in database


See merge request firefish/firefish!10872
2024-05-19 10:37:24 +00:00
naskya 134bbb48ab
docs: update notice-for-admins.md 2024-05-19 19:23:28 +09:00
naskya 8174d646f9
fix (backend): add back timezone 2024-05-19 19:15:58 +09:00
naskya 84596c8313
chore (deps): use unreleased napi crate for now 2024-05-19 19:12:20 +09:00
naskya 9dbf6d07c4
fix (backend): pug config loading 2024-05-19 19:11:13 +09:00
老周部落 04ceeed720
refactor: use dont federate initially flag instead of visibility hack 2024-05-16 21:33:47 +08:00
133 changed files with 810 additions and 392 deletions

4
.gitignore vendored
View File

@ -56,10 +56,6 @@ packages/backend/assets/instance.css
packages/backend/assets/sounds/None.mp3
packages/backend/assets/LICENSE
!/packages/backend/queue/processors/db
!/packages/backend/src/db
!/packages/backend/src/server/api/endpoints/drive/files
packages/megalodon/lib
packages/megalodon/.idea

25
Cargo.lock generated
View File

@ -85,9 +85,9 @@ dependencies = [
[[package]]
name = "anyhow"
version = "1.0.84"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18b8795de6d09abb2b178fa5a9e3bb10da935750f33449a132b328b9391b2c6a"
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
[[package]]
name = "arbitrary"
@ -500,9 +500,9 @@ checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6"
[[package]]
name = "cc"
version = "1.0.97"
version = "1.0.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4"
checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f"
dependencies = [
"jobserver",
"libc",
@ -1223,9 +1223,9 @@ dependencies = [
[[package]]
name = "getrandom"
version = "0.2.14"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c"
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
dependencies = [
"cfg-if",
"js-sys",
@ -1642,9 +1642,9 @@ checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
[[package]]
name = "libc"
version = "0.2.153"
version = "0.2.155"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
[[package]]
name = "libfuzzer-sys"
@ -1812,14 +1812,12 @@ dependencies = [
[[package]]
name = "napi"
version = "2.16.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfc300228808a0e6aea5a58115c82889240bcf8dab16fc25ad675b33e454b368"
version = "3.0.0-alpha.2"
source = "git+https://github.com/napi-rs/napi-rs.git?rev=ca2cd5c35a0c39ec4a94e93c6c5695b681046df2#ca2cd5c35a0c39ec4a94e93c6c5695b681046df2"
dependencies = [
"bitflags 2.5.0",
"chrono",
"ctor",
"napi-derive",
"napi-sys",
"once_cell",
"serde",
@ -1865,8 +1863,7 @@ dependencies = [
[[package]]
name = "napi-sys"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "427802e8ec3a734331fec1035594a210ce1ff4dc5bc1950530920ab717964ea3"
source = "git+https://github.com/napi-rs/napi-rs.git?rev=ca2cd5c35a0c39ec4a94e93c6c5695b681046df2#ca2cd5c35a0c39ec4a94e93c6c5695b681046df2"
dependencies = [
"libloading",
]

View File

@ -5,7 +5,7 @@ resolver = "2"
[workspace.dependencies]
macro-rs = { path = "packages/macro-rs" }
napi = { version = "2.16.6", default-features = false }
napi = { git = "https://github.com/napi-rs/napi-rs.git", rev = "ca2cd5c35a0c39ec4a94e93c6c5695b681046df2", default-features = false }
napi-derive = "2.16.5"
napi-build = "2.1.3"

View File

@ -5,6 +5,10 @@ Critical security updates are indicated by the :warning: icon.
- Server administrators should check [notice-for-admins.md](./notice-for-admins.md) as well.
- Third-party client/bot developers may want to check [api-change.md](./api-change.md) as well.
## Unreleased
- Fix bugs
## [v20240516](https://firefish.dev/firefish/firefish/-/merge_requests/10854/commits)
- Improve timeline UX (you can restore the original appearance by settings)

View File

@ -1,6 +1,7 @@
BEGIN;
DELETE FROM "migrations" WHERE name IN (
'AddBackTimezone1715351290096',
'UserprofileJsonbToArray1714270605574',
'DropUnusedUserprofileColumns1714259023878',
'AntennaJsonbToArray1714192520471',
@ -105,83 +106,6 @@ CREATE INDEX "IDX_8e3bbbeb3df04d1a8105da4c8f" ON "note" USING "pgroonga" ("cw" p
ALTER TABLE "messaging_message" DROP CONSTRAINT "FK_535def119223ac05ad3fa9ef64b";
ALTER TABLE "messaging_message" ADD CONSTRAINT "FK_535def119223ac05ad3fa9ef64b" FOREIGN KEY ("fileId") REFERENCES "drive_file"("id") ON DELETE CASCADE ON UPDATE NO ACTION;
-- drop-time-zone
ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp with time zone;
ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp with time zone;
ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp with time zone;
ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "app" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp with time zone;
ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp with time zone;
ALTER TABLE "following" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp with time zone;
ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp with time zone;
ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp with time zone;
ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp with time zone;
ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp with time zone;
ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp with time zone;
ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp with time zone;
ALTER TABLE "note" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp with time zone;
ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp with time zone;
ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "page" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp with time zone;
ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp with time zone;
ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp with time zone;
ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp with time zone;
ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp with time zone;
ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp with time zone;
ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp with time zone;
ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp with time zone;
ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp with time zone;
ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp with time zone;
-- expand-note-edit
ALTER TABLE "note_edit" DROP COLUMN "emojis";

View File

@ -2,6 +2,28 @@
You can skip intermediate versions when upgrading from an old version, but please read the notices and follow the instructions for each intermediate version before [upgrading](./upgrade.md).
## Unreleased
### For all users
We regret to inform you that the upgrade may take a long time to fix a regression we have introduced. The time required to upgrade should be the same as [v20240413](<https://firefish.dev/firefish/firefish/-/blob/main/docs/notice-for-admins.md#v20240413>). This is not a security fix, so please upgrade your server when you have enough time. We are sorry for the inconvenience.
<details>
There are two data types in PostgreSQL to store time: `timestamptz` (`timestamp with time zone`) and `timestamp` (`timestamp without time zone`) [[ref]](<https://www.postgresql.org/docs/current/datatype-datetime.html>).
In Node.js, we manipulate the database using [TypeORM](<https://typeorm.io/>). TypeORM handles time data as a JavaScript `Date` object. Since `Date` doesn't have timezone information [[ref]](<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_components_and_time_zones>), we don't use the timezone information in the Node.js backend, and both `timestamptz` and `timestamp` behave in the same way. (Technically, the type names are a little confusing, and `timestamptz` (`timestamp with time zone`) doesn't store the timezone data. Please read PostgreSQL documentation for more information.)
In Rust, we manipulate the database using [SeaORM](<https://www.sea-ql.org/SeaORM/>), which does distinguish between `timestamptz` and `timestamp`. `timestamptz` is converted to [`DateTime<FixedOffset>`](<https://docs.rs/chrono/latest/chrono/struct.DateTime.html>) type, whereas `timestamp` is converted to [`NaiveDateTime`](<https://docs.rs/chrono/latest/chrono/struct.NaiveDateTime.html>).
We are using [napi-rs](<https://napi.rs/>) to implement some of the backend features in Rust, which did not support `DateTime<FixedOffset>`. We used to store time data as `timestamptz`, but we converted them to `timestamp` for this reason. As we don't use timezone data, we thought this was okay, and indeed it worked fine.
However, we did not consider the case of migrating a server (hardware) to another timezone. With `timestamp`, there may be inconsistencies in the time data if you migrate your server to another system with a different timezone setting (Docker/Podman users should not be affected by this, as UTC is always used in containers unless you explicitly set one).
Therefore, we have contributed to napi-rs to add support for `DateTime<FixedOffset>` (<https://github.com/napi-rs/napi-rs/pull/2074>) and decided to migrate back from `timestamp` to `timestamptz` to properly address this problem. The migration process takes time roughly proportional to the number of stored posts.
</details>
## v20240516
### For all users

View File

@ -312,7 +312,7 @@ export function memoryUsage(): Memory
export function storageUsage(): Storage | null
export interface AbuseUserReport {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
targetUserId: string
reporterId: string
assigneeId: string | null
@ -324,12 +324,12 @@ export interface AbuseUserReport {
}
export interface AccessToken {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
token: string
hash: string
userId: string
appId: string | null
lastUsedAt: Date | null
lastUsedAt: DateTimeWithTimeZone | null
session: string | null
name: string | null
description: string | null
@ -339,8 +339,8 @@ export interface AccessToken {
}
export interface Ad {
id: string
createdAt: Date
expiresAt: Date
createdAt: DateTimeWithTimeZone
expiresAt: DateTimeWithTimeZone
place: string
priority: string
url: string
@ -350,11 +350,11 @@ export interface Ad {
}
export interface Announcement {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
text: string
title: string
imageUrl: string | null
updatedAt: Date | null
updatedAt: DateTimeWithTimeZone | null
showPopup: boolean
isGoodNews: boolean
}
@ -362,11 +362,11 @@ export interface AnnouncementRead {
id: string
userId: string
announcementId: string
createdAt: Date
createdAt: DateTimeWithTimeZone
}
export interface Antenna {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
name: string
src: AntennaSrcEnum
@ -384,7 +384,7 @@ export interface Antenna {
}
export interface App {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string | null
secret: string
name: string
@ -396,26 +396,26 @@ export interface AttestationChallenge {
id: string
userId: string
challenge: string
createdAt: Date
createdAt: DateTimeWithTimeZone
registrationChallenge: boolean
}
export interface AuthSession {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
token: string
userId: string | null
appId: string
}
export interface Blocking {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
blockeeId: string
blockerId: string
}
export interface Channel {
id: string
createdAt: Date
lastNotedAt: Date | null
createdAt: DateTimeWithTimeZone
lastNotedAt: DateTimeWithTimeZone | null
userId: string | null
name: string
description: string | null
@ -425,19 +425,19 @@ export interface Channel {
}
export interface ChannelFollowing {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
followeeId: string
followerId: string
}
export interface ChannelNotePining {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
channelId: string
noteId: string
}
export interface Clip {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
name: string
isPublic: boolean
@ -450,7 +450,7 @@ export interface ClipNote {
}
export interface DriveFile {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string | null
userHost: string | null
md5: string
@ -479,14 +479,14 @@ export interface DriveFile {
}
export interface DriveFolder {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
name: string
userId: string | null
parentId: string | null
}
export interface Emoji {
id: string
updatedAt: Date | null
updatedAt: DateTimeWithTimeZone | null
name: string
host: string | null
originalUrl: string
@ -501,7 +501,7 @@ export interface Emoji {
}
export interface FollowRequest {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
followeeId: string
followerId: string
requestId: string | null
@ -514,7 +514,7 @@ export interface FollowRequest {
}
export interface Following {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
followeeId: string
followerId: string
followerHost: string | null
@ -526,14 +526,14 @@ export interface Following {
}
export interface GalleryLike {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
postId: string
}
export interface GalleryPost {
id: string
createdAt: Date
updatedAt: Date
createdAt: DateTimeWithTimeZone
updatedAt: DateTimeWithTimeZone
title: string
description: string | null
userId: string
@ -560,16 +560,16 @@ export interface Hashtag {
}
export interface Instance {
id: string
caughtAt: Date
caughtAt: DateTimeWithTimeZone
host: string
usersCount: number
notesCount: number
followingCount: number
followersCount: number
latestRequestSentAt: Date | null
latestRequestSentAt: DateTimeWithTimeZone | null
latestStatus: number | null
latestRequestReceivedAt: Date | null
lastCommunicatedAt: Date
latestRequestReceivedAt: DateTimeWithTimeZone | null
lastCommunicatedAt: DateTimeWithTimeZone
isNotResponding: boolean
softwareName: string | null
softwareVersion: string | null
@ -578,7 +578,7 @@ export interface Instance {
description: string | null
maintainerName: string | null
maintainerEmail: string | null
infoUpdatedAt: Date | null
infoUpdatedAt: DateTimeWithTimeZone | null
isSuspended: boolean
iconUrl: string | null
themeColor: string | null
@ -586,7 +586,7 @@ export interface Instance {
}
export interface MessagingMessage {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
recipientId: string | null
text: string | null
@ -690,7 +690,7 @@ export interface Migrations {
}
export interface ModerationLog {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
type: string
info: Json
@ -703,14 +703,14 @@ export interface MutedNote {
}
export interface Muting {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
muteeId: string
muterId: string
expiresAt: Date | null
expiresAt: DateTimeWithTimeZone | null
}
export interface Note {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
replyId: string | null
renoteId: string | null
text: string | null
@ -740,7 +740,7 @@ export interface Note {
url: string | null
channelId: string | null
threadId: string | null
updatedAt: Date | null
updatedAt: DateTimeWithTimeZone | null
lang: string | null
}
export interface NoteEdit {
@ -749,12 +749,12 @@ export interface NoteEdit {
text: string | null
cw: string | null
fileIds: Array<string>
updatedAt: Date
updatedAt: DateTimeWithTimeZone
emojis: Array<string>
}
export interface NoteFavorite {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
noteId: string
}
@ -765,14 +765,14 @@ export interface NoteFile {
}
export interface NoteReaction {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
noteId: string
reaction: string
}
export interface NoteThreadMuting {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
threadId: string
}
@ -787,14 +787,14 @@ export interface NoteUnread {
}
export interface NoteWatching {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
noteId: string
noteUserId: string
}
export interface Notification {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
notifieeId: string
notifierId: string | null
isRead: boolean
@ -811,8 +811,8 @@ export interface Notification {
}
export interface Page {
id: string
createdAt: Date
updatedAt: Date
createdAt: DateTimeWithTimeZone
updatedAt: DateTimeWithTimeZone
title: string
name: string
summary: string | null
@ -831,19 +831,19 @@ export interface Page {
}
export interface PageLike {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
pageId: string
}
export interface PasswordResetRequest {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
token: string
userId: string
}
export interface Poll {
noteId: string
expiresAt: Date | null
expiresAt: DateTimeWithTimeZone | null
multiple: boolean
choices: Array<string>
votes: Array<number>
@ -853,31 +853,31 @@ export interface Poll {
}
export interface PollVote {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
noteId: string
choice: number
}
export interface PromoNote {
noteId: string
expiresAt: Date
expiresAt: DateTimeWithTimeZone
userId: string
}
export interface PromoRead {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
noteId: string
}
export interface RegistrationTicket {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
code: string
}
export interface RegistryItem {
id: string
createdAt: Date
updatedAt: Date
createdAt: DateTimeWithTimeZone
updatedAt: DateTimeWithTimeZone
userId: string
key: string
scope: Array<string>
@ -891,13 +891,13 @@ export interface Relay {
}
export interface RenoteMuting {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
muteeId: string
muterId: string
}
export interface ReplyMuting {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
muteeId: string
muterId: string
}
@ -983,7 +983,7 @@ export enum UserProfileMutingnotificationtypesEnum {
}
export interface Signin {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
ip: string
headers: Json
@ -991,7 +991,7 @@ export interface Signin {
}
export interface SwSubscription {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
endpoint: string
auth: string
@ -1000,13 +1000,13 @@ export interface SwSubscription {
}
export interface UsedUsername {
username: string
createdAt: Date
createdAt: DateTimeWithTimeZone
}
export interface User {
id: string
createdAt: Date
updatedAt: Date | null
lastFetchedAt: Date | null
createdAt: DateTimeWithTimeZone
updatedAt: DateTimeWithTimeZone | null
lastFetchedAt: DateTimeWithTimeZone | null
username: string
usernameLower: string
name: string | null
@ -1032,7 +1032,7 @@ export interface User {
token: string | null
isExplorable: boolean
followersUri: string | null
lastActiveDate: Date | null
lastActiveDate: DateTimeWithTimeZone | null
hideOnlineStatus: boolean
isDeleted: boolean
driveCapacityOverrideMb: number | null
@ -1044,32 +1044,32 @@ export interface User {
}
export interface UserGroup {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
name: string
userId: string
isPrivate: boolean
}
export interface UserGroupInvitation {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
userGroupId: string
}
export interface UserGroupInvite {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
userGroupId: string
}
export interface UserGroupJoining {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
userGroupId: string
}
export interface UserIp {
id: number
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
ip: string
}
@ -1080,25 +1080,25 @@ export interface UserKeypair {
}
export interface UserList {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
name: string
}
export interface UserListJoining {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
userListId: string
}
export interface UserNotePining {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
noteId: string
}
export interface UserPending {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
code: string
username: string
email: string
@ -1150,19 +1150,19 @@ export interface UserSecurityKey {
id: string
userId: string
publicKey: string
lastUsed: Date
lastUsed: DateTimeWithTimeZone
name: string
}
export interface Webhook {
id: string
createdAt: Date
createdAt: DateTimeWithTimeZone
userId: string
name: string
on: Array<string>
url: string
secret: string
active: boolean
latestSentAt: Date | null
latestSentAt: DateTimeWithTimeZone | null
latestStatus: number | null
}
export function updateAntennasOnNewNote(note: Note, noteAuthor: Acct, noteMutedUsers: Array<string>): Promise<void>

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "targetUserId")]
pub target_user_id: String,
#[sea_orm(column_name = "reporterId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
pub token: String,
pub hash: String,
#[sea_orm(column_name = "userId")]
@ -21,7 +21,7 @@ pub struct Model {
#[sea_orm(column_name = "appId")]
pub app_id: Option<String>,
#[sea_orm(column_name = "lastUsedAt")]
pub last_used_at: Option<DateTime>,
pub last_used_at: Option<DateTimeWithTimeZone>,
pub session: Option<String>,
pub name: Option<String>,
pub description: Option<String>,

View File

@ -13,9 +13,9 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "expiresAt")]
pub expires_at: DateTime,
pub expires_at: DateTimeWithTimeZone,
pub place: String,
pub priority: String,
pub url: String,

View File

@ -13,13 +13,13 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
pub text: String,
pub title: String,
#[sea_orm(column_name = "imageUrl")]
pub image_url: Option<String>,
#[sea_orm(column_name = "updatedAt")]
pub updated_at: Option<DateTime>,
pub updated_at: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "showPopup")]
pub show_popup: bool,
#[sea_orm(column_name = "isGoodNews")]

View File

@ -17,7 +17,7 @@ pub struct Model {
#[sea_orm(column_name = "announcementId")]
pub announcement_id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]

View File

@ -14,7 +14,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub name: String,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: Option<String>,
pub secret: String,

View File

@ -16,7 +16,7 @@ pub struct Model {
pub user_id: String,
pub challenge: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "registrationChallenge")]
pub registration_challenge: bool,
}

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
pub token: String,
#[sea_orm(column_name = "userId")]
pub user_id: Option<String>,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "blockeeId")]
pub blockee_id: String,
#[sea_orm(column_name = "blockerId")]

View File

@ -13,9 +13,9 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "lastNotedAt")]
pub last_noted_at: Option<DateTime>,
pub last_noted_at: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "userId")]
pub user_id: Option<String>,
pub name: String,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "followeeId")]
pub followee_id: String,
#[sea_orm(column_name = "followerId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "channelId")]
pub channel_id: String,
#[sea_orm(column_name = "noteId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub name: String,

View File

@ -14,7 +14,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: Option<String>,
#[sea_orm(column_name = "userHost")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
pub name: String,
#[sea_orm(column_name = "userId")]
pub user_id: Option<String>,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "updatedAt")]
pub updated_at: Option<DateTime>,
pub updated_at: Option<DateTimeWithTimeZone>,
pub name: String,
pub host: Option<String>,
#[sea_orm(column_name = "originalUrl")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "followeeId")]
pub followee_id: String,
#[sea_orm(column_name = "followerId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "followeeId")]
pub followee_id: String,
#[sea_orm(column_name = "followerId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "postId")]

View File

@ -13,9 +13,9 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "updatedAt")]
pub updated_at: DateTime,
pub updated_at: DateTimeWithTimeZone,
pub title: String,
pub description: Option<String>,
#[sea_orm(column_name = "userId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "caughtAt")]
pub caught_at: DateTime,
pub caught_at: DateTimeWithTimeZone,
pub host: String,
#[sea_orm(column_name = "usersCount")]
pub users_count: i32,
@ -24,13 +24,13 @@ pub struct Model {
#[sea_orm(column_name = "followersCount")]
pub followers_count: i32,
#[sea_orm(column_name = "latestRequestSentAt")]
pub latest_request_sent_at: Option<DateTime>,
pub latest_request_sent_at: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "latestStatus")]
pub latest_status: Option<i32>,
#[sea_orm(column_name = "latestRequestReceivedAt")]
pub latest_request_received_at: Option<DateTime>,
pub latest_request_received_at: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "lastCommunicatedAt")]
pub last_communicated_at: DateTime,
pub last_communicated_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "isNotResponding")]
pub is_not_responding: bool,
#[sea_orm(column_name = "softwareName")]
@ -46,7 +46,7 @@ pub struct Model {
#[sea_orm(column_name = "maintainerEmail")]
pub maintainer_email: Option<String>,
#[sea_orm(column_name = "infoUpdatedAt")]
pub info_updated_at: Option<DateTime>,
pub info_updated_at: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "isSuspended")]
pub is_suspended: bool,
#[sea_orm(column_name = "iconUrl")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "recipientId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub r#type: String,

View File

@ -13,13 +13,13 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "muteeId")]
pub mutee_id: String,
#[sea_orm(column_name = "muterId")]
pub muter_id: String,
#[sea_orm(column_name = "expiresAt")]
pub expires_at: Option<DateTime>,
pub expires_at: Option<DateTimeWithTimeZone>,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]

View File

@ -14,7 +14,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "replyId")]
pub reply_id: Option<String>,
#[sea_orm(column_name = "renoteId")]
@ -66,7 +66,7 @@ pub struct Model {
#[sea_orm(column_name = "threadId")]
pub thread_id: Option<String>,
#[sea_orm(column_name = "updatedAt")]
pub updated_at: Option<DateTime>,
pub updated_at: Option<DateTimeWithTimeZone>,
pub lang: Option<String>,
}

View File

@ -20,7 +20,7 @@ pub struct Model {
#[sea_orm(column_name = "fileIds")]
pub file_ids: Vec<String>,
#[sea_orm(column_name = "updatedAt")]
pub updated_at: DateTime,
pub updated_at: DateTimeWithTimeZone,
pub emojis: Vec<String>,
}

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "noteId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "noteId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "threadId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "noteId")]

View File

@ -14,7 +14,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "notifieeId")]
pub notifiee_id: String,
#[sea_orm(column_name = "notifierId")]

View File

@ -14,9 +14,9 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "updatedAt")]
pub updated_at: DateTime,
pub updated_at: DateTimeWithTimeZone,
pub title: String,
pub name: String,
pub summary: Option<String>,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "pageId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
pub token: String,
#[sea_orm(column_name = "userId")]
pub user_id: String,

View File

@ -14,7 +14,7 @@ pub struct Model {
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
pub note_id: String,
#[sea_orm(column_name = "expiresAt")]
pub expires_at: Option<DateTime>,
pub expires_at: Option<DateTimeWithTimeZone>,
pub multiple: bool,
pub choices: Vec<String>,
pub votes: Vec<i32>,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "noteId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(column_name = "noteId", primary_key, auto_increment = false, unique)]
pub note_id: String,
#[sea_orm(column_name = "expiresAt")]
pub expires_at: DateTime,
pub expires_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
}

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "noteId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
pub code: String,
}

View File

@ -13,9 +13,9 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "updatedAt")]
pub updated_at: DateTime,
pub updated_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub key: String,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "muteeId")]
pub mutee_id: String,
#[sea_orm(column_name = "muterId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "muteeId")]
pub mutee_id: String,
#[sea_orm(column_name = "muterId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub ip: String,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub endpoint: String,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub username: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]

View File

@ -14,11 +14,11 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "updatedAt")]
pub updated_at: Option<DateTime>,
pub updated_at: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "lastFetchedAt")]
pub last_fetched_at: Option<DateTime>,
pub last_fetched_at: Option<DateTimeWithTimeZone>,
pub username: String,
#[sea_orm(column_name = "usernameLower")]
pub username_lower: String,
@ -62,7 +62,7 @@ pub struct Model {
#[sea_orm(column_name = "followersUri")]
pub followers_uri: Option<String>,
#[sea_orm(column_name = "lastActiveDate")]
pub last_active_date: Option<DateTime>,
pub last_active_date: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "hideOnlineStatus")]
pub hide_online_status: bool,
#[sea_orm(column_name = "isDeleted")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
pub name: String,
#[sea_orm(column_name = "userId")]
pub user_id: String,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "userGroupId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "userGroupId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "userGroupId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key)]
pub id: i32,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub ip: String,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub name: String,

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "userListId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
#[sea_orm(column_name = "noteId")]

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
pub code: String,
pub username: String,
pub email: String,

View File

@ -17,7 +17,7 @@ pub struct Model {
#[sea_orm(column_name = "publicKey")]
pub public_key: String,
#[sea_orm(column_name = "lastUsed")]
pub last_used: DateTime,
pub last_used: DateTimeWithTimeZone,
pub name: String,
}

View File

@ -13,7 +13,7 @@ pub struct Model {
#[sea_orm(primary_key, auto_increment = false)]
pub id: String,
#[sea_orm(column_name = "createdAt")]
pub created_at: DateTime,
pub created_at: DateTimeWithTimeZone,
#[sea_orm(column_name = "userId")]
pub user_id: String,
pub name: String,
@ -22,7 +22,7 @@ pub struct Model {
pub secret: String,
pub active: bool,
#[sea_orm(column_name = "latestSentAt")]
pub latest_sent_at: Option<DateTime>,
pub latest_sent_at: Option<DateTimeWithTimeZone>,
#[sea_orm(column_name = "latestStatus")]
pub latest_status: Option<i32>,
}

View File

@ -12,7 +12,7 @@ pub async fn watch_note(
if watcher_id != note_author_id {
note_watching::Entity::insert(note_watching::ActiveModel {
id: ActiveValue::set(gen_id()),
created_at: ActiveValue::set(chrono::Local::now().naive_local()),
created_at: ActiveValue::set(chrono::Utc::now().into()),
user_id: ActiveValue::Set(watcher_id.to_string()),
note_user_id: ActiveValue::Set(note_author_id.to_string()),
note_id: ActiveValue::Set(note_id.to_string()),

View File

@ -55,7 +55,7 @@
"feed": "4.2.2",
"file-type": "19.0.0",
"firefish-js": "workspace:*",
"fluent-ffmpeg": "2.1.2",
"fluent-ffmpeg": "2.1.3",
"form-data": "4.0.0",
"got": "14.3.0",
"gunzip-maybe": "1.4.2",

View File

@ -0,0 +1 @@
type DateTimeWithTimeZone = Date;

View File

@ -0,0 +1,459 @@
import type { MigrationInterface, QueryRunner } from "typeorm";
export class AddBackTimezone1715351290096 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "app" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "following" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "note" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "page" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp with time zone`,
);
await queryRunner.query(
`ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp with time zone`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "abuse_user_report" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "access_token" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "access_token" ALTER "lastUsedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "ad" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "ad" ALTER "expiresAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "announcement" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "announcement" ALTER "updatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "announcement_read" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "antenna" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "app" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "attestation_challenge" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "auth_session" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "blocking" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "channel" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "channel" ALTER "lastNotedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "channel_following" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "channel_note_pining" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "clip" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "drive_file" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "drive_folder" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "emoji" ALTER "updatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "following" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "follow_request" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "gallery_like" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "gallery_post" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "gallery_post" ALTER "updatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "caughtAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "infoUpdatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "lastCommunicatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "latestRequestReceivedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "instance" ALTER "latestRequestSentAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "messaging_message" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "moderation_log" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "muting" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "muting" ALTER "expiresAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "note" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "note" ALTER "updatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_edit" ALTER "updatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_favorite" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_reaction" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_thread_muting" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "note_watching" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "notification" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "page" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "page" ALTER "updatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "page_like" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "password_reset_request" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "poll" ALTER "expiresAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "poll_vote" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "promo_note" ALTER "expiresAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "promo_read" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "registration_ticket" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "registry_item" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "registry_item" ALTER "updatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "renote_muting" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "reply_muting" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "signin" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "sw_subscription" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "used_username" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user" ALTER "lastActiveDate" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user" ALTER "lastFetchedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user" ALTER "updatedAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_group" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_group_invitation" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_group_invite" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_group_joining" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_ip" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_list" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_list_joining" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_note_pining" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_pending" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "user_security_key" ALTER "lastUsed" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "webhook" ALTER "createdAt" TYPE timestamp without time zone`,
);
await queryRunner.query(
`ALTER TABLE "webhook" ALTER "latestSentAt" TYPE timestamp without time zone`,
);
}
}

View File

@ -1,3 +1,5 @@
import { noteVisibilities } from "@/types.js";
export type Post = {
text: string | undefined;
cw: string | null;
@ -12,7 +14,9 @@ export function parse(acct: any): Post {
cw: acct.cw,
localOnly: acct.localOnly,
createdAt: new Date(acct.createdAt),
visibility: `hidden${acct.visibility || ""}`,
visibility: noteVisibilities.includes(acct.visibility)
? acct.visibility
: "specified",
};
}

View File

@ -16,7 +16,7 @@ export class AbuseUserReport {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the AbuseUserReport.",
})
public createdAt: Date;

View File

@ -16,12 +16,12 @@ export class AccessToken {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the AccessToken.",
})
public createdAt: Date;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
nullable: true,
})
public lastUsedAt: Date | null;

View File

@ -7,13 +7,13 @@ export class Ad {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the Ad.",
})
public createdAt: Date;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The expired date of the Ad.",
})
public expiresAt: Date;

View File

@ -17,7 +17,7 @@ export class AnnouncementRead {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the AnnouncementRead.",
})
public createdAt: Date;

View File

@ -7,12 +7,12 @@ export class Announcement {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the Announcement.",
})
public createdAt: Date;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The updated date of the Announcement.",
nullable: true,
})

View File

@ -17,7 +17,7 @@ export class Antenna {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the Antenna.",
})
public createdAt: Date;

View File

@ -15,7 +15,7 @@ export class App {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the App.",
})
public createdAt: Date;

View File

@ -26,7 +26,7 @@ export class AttestationChallenge {
})
public challenge: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The date challenge was created for expiry purposes.",
})
public createdAt: Date;

View File

@ -16,7 +16,7 @@ export class AuthSession {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the AuthSession.",
})
public createdAt: Date;

View File

@ -17,7 +17,7 @@ export class Blocking {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the Blocking.",
})
public createdAt: Date;

View File

@ -18,7 +18,7 @@ export class ChannelFollowing {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the ChannelFollowing.",
})
public createdAt: Date;

View File

@ -17,7 +17,7 @@ export class ChannelNotePining {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the ChannelNotePining.",
})
public createdAt: Date;

View File

@ -17,13 +17,13 @@ export class Channel {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the Channel.",
})
public createdAt: Date;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
nullable: true,
})
public lastNotedAt: Date | null;

View File

@ -15,7 +15,7 @@ export class Clip {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the Clip.",
})
public createdAt: Date;

View File

@ -23,7 +23,7 @@ export class DriveFile {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the DriveFile.",
})
public createdAt: Date;

View File

@ -16,7 +16,7 @@ export class DriveFolder {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the DriveFolder.",
})
public createdAt: Date;

View File

@ -7,7 +7,7 @@ export class Emoji {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
nullable: true,
})
public updatedAt: Date | null;

View File

@ -16,7 +16,7 @@ export class FollowRequest {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the FollowRequest.",
})
public createdAt: Date;

View File

@ -17,7 +17,7 @@ export class Following {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the Following.",
})
public createdAt: Date;

View File

@ -17,7 +17,7 @@ export class GalleryLike {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone")
@Column("timestamp with time zone")
public createdAt: Date;
@Index()

View File

@ -17,13 +17,13 @@ export class GalleryPost {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the GalleryPost.",
})
public createdAt: Date;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The updated date of the GalleryPost.",
})
public updatedAt: Date;

View File

@ -23,7 +23,7 @@ export class Instance {
*
*/
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The caught date of the Instance.",
})
public caughtAt: Date;
@ -75,7 +75,7 @@ export class Instance {
/**
*
*/
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
nullable: true,
})
public latestRequestSentAt: Date | null;
@ -91,7 +91,7 @@ export class Instance {
/**
*
*/
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
nullable: true,
})
public latestRequestReceivedAt: Date | null;
@ -99,7 +99,7 @@ export class Instance {
/**
*
*/
@Column("timestamp without time zone")
@Column("timestamp with time zone")
public lastCommunicatedAt: Date;
/**
@ -179,7 +179,7 @@ export class Instance {
})
public themeColor: string | null;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
nullable: true,
})
public infoUpdatedAt: Date | null;

View File

@ -18,7 +18,7 @@ export class MessagingMessage {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the MessagingMessage.",
})
public createdAt: Date;

View File

@ -15,7 +15,7 @@ export class ModerationLog {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the ModerationLog.",
})
public createdAt: Date;

View File

@ -17,13 +17,13 @@ export class Muting {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the Muting.",
})
public createdAt: Date;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
nullable: true,
})
public expiresAt: Date | null;

View File

@ -40,7 +40,7 @@ export class NoteEdit {
})
public fileIds: DriveFile["id"][];
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The updated date of the Note.",
})
public updatedAt: Date;

View File

@ -17,7 +17,7 @@ export class NoteFavorite {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the NoteFavorite.",
})
public createdAt: Date;

View File

@ -17,7 +17,7 @@ export class NoteReaction {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the NoteReaction.",
})
public createdAt: Date;

View File

@ -16,7 +16,7 @@ export class NoteThreadMuting {
@PrimaryColumn(id())
public id: string;
@Column("timestamp without time zone", {})
@Column("timestamp with time zone", {})
public createdAt: Date;
@Index()

View File

@ -18,7 +18,7 @@ export class NoteWatching {
public id: string;
@Index()
@Column("timestamp without time zone", {
@Column("timestamp with time zone", {
comment: "The created date of the NoteWatching.",
})
public createdAt: Date;

Some files were not shown because too many files have changed in this diff Show More