GNU Social follow requests IDs do not fit in database model #146
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
GNU Social follow request IDs tend to be much longer than 128 characters and as such cannot fit within the database model's limit of 128 characters, which will cause the follow request to never be handled.
@Column('varchar', {
length: 128, nullable: true,
comment: 'id of Follow Activity.',
})
public requestId: string | null;
Related issue: https://github.com/misskey-dev/misskey/issues/9086
Know how big we can expect GNU Social's follow request IDs to be?
The referenced issue is giving the following example:
https://gnusocial.jp/follow_from_https%3A%2F%2Fgnusocial.jp%2Findex.php%2Fuser%2F9200_to_https%3A%2F%2Fmewl.me%2Fusers%2F5b6bb2cada8b912b16218d34
So, pretty long, I'd say... 512 would probably be enough, I think, and most importantly would match what other entities have for ID length
URLs have a practical browser-limit of around 2000 chars, and 2048 chars in XML sitemaps'
<loc>
.As such, I think making any URL-related fields that we receive from remote to be
varchar(2048)
is reasonable.Besides that, all non-remote text fields should likely be TEXT, which is "immeasurably faster" according to postgres devs (and as discussed in irc).