diff --git a/CHANGES.md b/CHANGES.md index 39e07f78..6547b43a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -235,6 +235,17 @@ To be released. are removed; UnoCSS emits a single _src/public/uno.css_ whose URL is cache-busted by file mtime. + - Added public *Followers* and *Following* pages on profile screens, with + pagination (100 entries per page) and a substring search filter over + display name and handle. The followers list is always public. The + following list is gated by a new per-account setting, *Make following + list public* (off by default); when off, the page returns *404 Not + Found*, the corresponding ActivityPub `following` collection is hidden + from federation, and the Mastodon-compatible + `GET /api/v1/accounts/:id/following` endpoint returns an empty array. + The toggle also round-trips through `PATCH update_credentials` as + `hide_collections`. [[#491]] + - Added public reaction list pages anchored to each local post: `/@:handle/:id/likes` lists the accounts that liked the post, `/@:handle/:id/shares` lists the accounts that boosted it, @@ -383,6 +394,7 @@ To be released. [#488]: https://github.com/fedify-dev/hollo/issues/488 [#489]: https://github.com/fedify-dev/hollo/issues/489 [#490]: https://github.com/fedify-dev/hollo/pull/490 +[#491]: https://github.com/fedify-dev/hollo/pull/491 Version 0.8.4 diff --git a/drizzle/20260517021029_account_owners_following_list_public/migration.sql b/drizzle/20260517021029_account_owners_following_list_public/migration.sql new file mode 100644 index 00000000..dc70ea47 --- /dev/null +++ b/drizzle/20260517021029_account_owners_following_list_public/migration.sql @@ -0,0 +1 @@ +ALTER TABLE "account_owners" ADD COLUMN "following_list_public" boolean DEFAULT false NOT NULL; \ No newline at end of file diff --git a/drizzle/20260517021029_account_owners_following_list_public/snapshot.json b/drizzle/20260517021029_account_owners_following_list_public/snapshot.json new file mode 100644 index 00000000..8a7be69e --- /dev/null +++ b/drizzle/20260517021029_account_owners_following_list_public/snapshot.json @@ -0,0 +1,7369 @@ +{ + "version": "8", + "dialect": "postgres", + "id": "f188622b-4361-4d27-9c78-637cf9d10e24", + "prevIds": [ + "ed7d9aee-c7b5-4778-b92d-4e4c7ea3bdae" + ], + "ddl": [ + { + "values": [ + "Application", + "Group", + "Organization", + "Person", + "Service" + ], + "name": "account_type", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "cleanup_thumbnails" + ], + "name": "cleanup_job_category", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "completed", + "failed", + "cancelled" + ], + "name": "cleanup_job_status", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "authorization_code", + "client_credentials" + ], + "name": "grant_type", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "following_accounts", + "lists", + "muted_accounts", + "blocked_accounts", + "bookmarks" + ], + "name": "import_job_category", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "completed", + "failed", + "cancelled" + ], + "name": "import_job_status", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "followed", + "list", + "none" + ], + "name": "list_replies_policy", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "notifications", + "home" + ], + "name": "marker_type", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "mention", + "status", + "reblog", + "follow", + "follow_request", + "favourite", + "emoji_reaction", + "poll", + "update", + "admin.sign_up", + "admin.report", + "quote", + "quoted_update" + ], + "name": "notification_type", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "Article", + "Note", + "Question" + ], + "name": "post_type", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "public", + "unlisted", + "private", + "direct" + ], + "name": "post_visibility", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "public", + "followers", + "nobody" + ], + "name": "quote_approval_policy", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "accepted", + "rejected", + "revoked", + "unauthorized" + ], + "name": "quote_state", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "pending", + "processing", + "completed", + "failed" + ], + "name": "remote_reply_scrape_job_status", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "read", + "read:accounts", + "read:blocks", + "read:bookmarks", + "read:favourites", + "read:filters", + "read:follows", + "read:lists", + "read:mutes", + "read:notifications", + "read:search", + "read:statuses", + "write", + "write:accounts", + "write:blocks", + "write:bookmarks", + "write:conversations", + "write:favourites", + "write:filters", + "write:follows", + "write:lists", + "write:media", + "write:mutes", + "write:notifications", + "write:reports", + "write:statuses", + "follow", + "push", + "profile" + ], + "name": "scope", + "entityType": "enums", + "schema": "public" + }, + { + "values": [ + "amber", + "azure", + "blue", + "cyan", + "fuchsia", + "green", + "grey", + "indigo", + "jade", + "lime", + "orange", + "pink", + "pumpkin", + "purple", + "red", + "sand", + "slate", + "violet", + "yellow", + "zinc" + ], + "name": "theme_color", + "entityType": "enums", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "access_grants", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "access_tokens", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "account_owners", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "accounts", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "applications", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "blocks", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "bookmarks", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "cleanup_job_items", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "cleanup_jobs", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "credentials", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "custom_emojis", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "featured_tags", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "follows", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "import_job_items", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "import_jobs", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "instances", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "likes", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "list_members", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "list_posts", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "lists", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "markers", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "media", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "mentions", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "mutes", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "notification_groups", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "notifications", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "passkey_login_challenges", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "passkeys", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "pinned_posts", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "poll_options", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "poll_votes", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "polls", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "posts", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "reactions", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "remote_reply_scrape_jobs", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "remote_reply_scrape_origins", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "reports", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "timeline_posts", + "entityType": "tables", + "schema": "public" + }, + { + "isRlsEnabled": false, + "name": "totps", + "entityType": "tables", + "schema": "public" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_in", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "redirect_uri", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "scope", + "typeSchema": "public", + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "scopes", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code_challenge", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "varchar(256)", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code_challenge_method", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "application_id", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "resource_owner_id", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "revoked", + "entityType": "columns", + "schema": "public", + "table": "access_grants" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "code", + "entityType": "columns", + "schema": "public", + "table": "access_tokens" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "application_id", + "entityType": "columns", + "schema": "public", + "table": "access_tokens" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_owner_id", + "entityType": "columns", + "schema": "public", + "table": "access_tokens" + }, + { + "type": "grant_type", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'authorization_code'", + "generated": null, + "identity": null, + "name": "grant_type", + "entityType": "columns", + "schema": "public", + "table": "access_tokens" + }, + { + "type": "scope", + "typeSchema": "public", + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "scopes", + "entityType": "columns", + "schema": "public", + "table": "access_tokens" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "access_tokens" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handle", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rsa_private_key_jwk", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "rsa_public_key_jwk", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ed25519_private_key_jwk", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "ed25519_public_key_jwk", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "json", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "fields", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bio", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "followed_tags", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "post_visibility", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'public'", + "generated": null, + "identity": null, + "name": "visibility", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'en'", + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "discoverable", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "expand_spoilers", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "following_list_public", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "theme_color", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "theme_color", + "entityType": "columns", + "schema": "public", + "table": "account_owners" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "iri", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "account_type", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "varchar(100)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "handle", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "bio_html", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "protected", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "avatar_url", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "cover_url", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "inbox_url", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "followers_url", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shared_inbox_url", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "featured_url", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "following_count", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "followers_count", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "posts_count", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "json", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "field_htmls", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "emojis", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "sensitive", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "successor_id", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "(ARRAY[]::text[])", + "generated": null, + "identity": null, + "name": "aliases", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "instance_host", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "published", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "updated", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "fetched", + "entityType": "columns", + "schema": "public", + "table": "accounts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "varchar(256)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "redirect_uris", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "scope", + "typeSchema": "public", + "notNull": true, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "scopes", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "website", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "client_id", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "client_secret", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "confidential", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "applications" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "blocks" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "blocked_account_id", + "entityType": "columns", + "schema": "public", + "table": "blocks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "blocks" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "bookmarks" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_owner_id", + "entityType": "columns", + "schema": "public", + "table": "bookmarks" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "bookmarks" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "job_id", + "entityType": "columns", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "type": "cleanup_job_status", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "data", + "entityType": "columns", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error_message", + "entityType": "columns", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processed_at", + "entityType": "columns", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "cleanup_job_category", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "cleanup_job_status", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "total_items", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "processed_items", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successful_items", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failed_items", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error_message", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completed_at", + "entityType": "columns", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "type": "varchar(254)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "email", + "entityType": "columns", + "schema": "public", + "table": "credentials" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "password_hash", + "entityType": "columns", + "schema": "public", + "table": "credentials" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "credentials" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "shortcode", + "entityType": "columns", + "schema": "public", + "table": "custom_emojis" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "custom_emojis" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "custom_emojis" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "custom_emojis" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "featured_tags" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_owner_id", + "entityType": "columns", + "schema": "public", + "table": "featured_tags" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "name", + "entityType": "columns", + "schema": "public", + "table": "featured_tags" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "featured_tags" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "iri", + "entityType": "columns", + "schema": "public", + "table": "follows" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "following_id", + "entityType": "columns", + "schema": "public", + "table": "follows" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "follower_id", + "entityType": "columns", + "schema": "public", + "table": "follows" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "shares", + "entityType": "columns", + "schema": "public", + "table": "follows" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "notify", + "entityType": "columns", + "schema": "public", + "table": "follows" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 1, + "default": null, + "generated": null, + "identity": null, + "name": "languages", + "entityType": "columns", + "schema": "public", + "table": "follows" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "follows" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "approved", + "entityType": "columns", + "schema": "public", + "table": "follows" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "import_job_items" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "job_id", + "entityType": "columns", + "schema": "public", + "table": "import_job_items" + }, + { + "type": "import_job_status", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "import_job_items" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "data", + "entityType": "columns", + "schema": "public", + "table": "import_job_items" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error_message", + "entityType": "columns", + "schema": "public", + "table": "import_job_items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processed_at", + "entityType": "columns", + "schema": "public", + "table": "import_job_items" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "import_job_items" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_owner_id", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "import_job_category", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "category", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "import_job_status", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "total_items", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "processed_items", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "successful_items", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "failed_items", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error_message", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completed_at", + "entityType": "columns", + "schema": "public", + "table": "import_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "host", + "entityType": "columns", + "schema": "public", + "table": "instances" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "software", + "entityType": "columns", + "schema": "public", + "table": "instances" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "software_version", + "entityType": "columns", + "schema": "public", + "table": "instances" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "instances" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "likes" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "likes" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "likes" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "list_id", + "entityType": "columns", + "schema": "public", + "table": "list_members" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "list_members" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "list_members" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "list_id", + "entityType": "columns", + "schema": "public", + "table": "list_posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "list_posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "lists" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_owner_id", + "entityType": "columns", + "schema": "public", + "table": "lists" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "lists" + }, + { + "type": "list_replies_policy", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'list'", + "generated": null, + "identity": null, + "name": "replies_policy", + "entityType": "columns", + "schema": "public", + "table": "lists" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "exclusive", + "entityType": "columns", + "schema": "public", + "table": "lists" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "lists" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_owner_id", + "entityType": "columns", + "schema": "public", + "table": "markers" + }, + { + "type": "marker_type", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "markers" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_read_id", + "entityType": "columns", + "schema": "public", + "table": "markers" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "1", + "generated": null, + "identity": null, + "name": "version", + "entityType": "columns", + "schema": "public", + "table": "markers" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "updated", + "entityType": "columns", + "schema": "public", + "table": "markers" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "width", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "height", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "description", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail_type", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail_url", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail_width", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "thumbnail_height", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "thumbnail_cleaned", + "entityType": "columns", + "schema": "public", + "table": "media" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "mentions" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "mentions" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "mutes" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "mutes" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "muted_account_id", + "entityType": "columns", + "schema": "public", + "table": "mutes" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "true", + "generated": null, + "identity": null, + "name": "notifications", + "entityType": "columns", + "schema": "public", + "table": "mutes" + }, + { + "type": "interval", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "duration", + "entityType": "columns", + "schema": "public", + "table": "mutes" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "mutes" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "group_key", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_owner_id", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "notification_type", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target_post_id", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "notifications_count", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "most_recent_notification_id", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "sample_account_ids", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "latest_page_notification_at", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "page_min_id", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "page_max_id", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "updated", + "entityType": "columns", + "schema": "public", + "table": "notification_groups" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_owner_id", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "notification_type", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actor_account_id", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target_post_id", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target_account_id", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target_poll_id", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "group_key", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "read_at", + "entityType": "columns", + "schema": "public", + "table": "notifications" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "passkey_login_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "challenge", + "entityType": "columns", + "schema": "public", + "table": "passkey_login_challenges" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires_at", + "entityType": "columns", + "schema": "public", + "table": "passkey_login_challenges" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "passkey_login_challenges" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "varchar(254)", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "credential_email", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "public_key", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "counter", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "(ARRAY[]::text[])", + "generated": null, + "identity": null, + "name": "transports", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "device_type", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "backed_up", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "nickname", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_used", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "passkeys" + }, + { + "type": "bigserial", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "index", + "entityType": "columns", + "schema": "public", + "table": "pinned_posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "pinned_posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "pinned_posts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "pinned_posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "poll_id", + "entityType": "columns", + "schema": "public", + "table": "poll_options" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "index", + "entityType": "columns", + "schema": "public", + "table": "poll_options" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "title", + "entityType": "columns", + "schema": "public", + "table": "poll_options" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "votes_count", + "entityType": "columns", + "schema": "public", + "table": "poll_options" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "poll_id", + "entityType": "columns", + "schema": "public", + "table": "poll_votes" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "option_index", + "entityType": "columns", + "schema": "public", + "table": "poll_votes" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "poll_votes" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "poll_votes" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "polls" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "multiple", + "entityType": "columns", + "schema": "public", + "table": "polls" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "voters_count", + "entityType": "columns", + "schema": "public", + "table": "polls" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "expires", + "entityType": "columns", + "schema": "public", + "table": "polls" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "polls" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "iri", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "post_type", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "type", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "actor_id", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "application_id", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "reply_target_id", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "sharing_id", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "quote_target_id", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "quote_target_iri", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "quote_state", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "quote_state", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "quote_authorization_iri", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "quote_approval_policy", + "typeSchema": "public", + "notNull": false, + "dimensions": 0, + "default": "'public'", + "generated": null, + "identity": null, + "name": "quote_approval_policy", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "post_visibility", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "visibility", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "summary", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content_html", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "content", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "poll_id", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "language", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "tags", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "emojis", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "boolean", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "false", + "generated": null, + "identity": null, + "name": "sensitive", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "url", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "jsonb", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "preview_card", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "replies_count", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "shares_count", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "likes_count", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "bigint", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "quotes_count", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "idempotence_key", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "published", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "updated", + "entityType": "columns", + "schema": "public", + "table": "posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "reactions" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "reactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "emoji", + "entityType": "columns", + "schema": "public", + "table": "reactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "custom_emoji", + "entityType": "columns", + "schema": "public", + "table": "reactions" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "emoji_iri", + "entityType": "columns", + "schema": "public", + "table": "reactions" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "reactions" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_iri", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "replies_iri", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "base_url", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "origin_host", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "depth", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "remote_reply_scrape_job_status", + "typeSchema": "public", + "notNull": true, + "dimensions": 0, + "default": "'pending'", + "generated": null, + "identity": null, + "name": "status", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "attempts", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "integer", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "0", + "generated": null, + "identity": null, + "name": "fetched_items", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "next_attempt_at", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "error_message", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "started_at", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "completed_at", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "updated", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "origin_host", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_origins" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "next_request_at", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_origins" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "last_request_at", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_origins" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processing_job_id", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_origins" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": false, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "processing_started_at", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_origins" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "updated", + "entityType": "columns", + "schema": "public", + "table": "remote_reply_scrape_origins" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "id", + "entityType": "columns", + "schema": "public", + "table": "reports" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "iri", + "entityType": "columns", + "schema": "public", + "table": "reports" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "reports" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "target_account_id", + "entityType": "columns", + "schema": "public", + "table": "reports" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "reports" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "comment", + "entityType": "columns", + "schema": "public", + "table": "reports" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 1, + "default": "'{}'", + "generated": null, + "identity": null, + "name": "posts", + "entityType": "columns", + "schema": "public", + "table": "reports" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "account_id", + "entityType": "columns", + "schema": "public", + "table": "timeline_posts" + }, + { + "type": "uuid", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "post_id", + "entityType": "columns", + "schema": "public", + "table": "timeline_posts" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "issuer", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "label", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "algorithm", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "digits", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "smallint", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "period", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "text", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": null, + "generated": null, + "identity": null, + "name": "secret", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "type": "timestamp with time zone", + "typeSchema": null, + "notNull": true, + "dimensions": 0, + "default": "CURRENT_TIMESTAMP", + "generated": null, + "identity": null, + "name": "created", + "entityType": "columns", + "schema": "public", + "table": "totps" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "resource_owner_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "access_grants_resource_owner_id_index", + "entityType": "indexes", + "schema": "public", + "table": "access_grants" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "handle", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "accounts_handle_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "accounts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "name", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "accounts_name_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "accounts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "blocks_account_id_index", + "entityType": "indexes", + "schema": "public", + "table": "blocks" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "blocked_account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "blocks_blocked_account_id_index", + "entityType": "indexes", + "schema": "public", + "table": "blocks" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "account_owner_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "bookmarks_post_id_account_owner_id_index", + "entityType": "indexes", + "schema": "public", + "table": "bookmarks" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "job_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "cleanup_job_items_job_id_status_index", + "entityType": "indexes", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "cleanup_jobs_status_created_index", + "entityType": "indexes", + "schema": "public", + "table": "cleanup_jobs" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "following_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "approved", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "(\"approved\" is not null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "follows_following_id_approved_index", + "entityType": "indexes", + "schema": "public", + "table": "follows" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "follower_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "following_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "(\"approved\" is not null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "follows_follower_id_following_id_approved_index", + "entityType": "indexes", + "schema": "public", + "table": "follows" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "following_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "follows_following_id_created_index", + "entityType": "indexes", + "schema": "public", + "table": "follows" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "job_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "import_job_items_job_id_status_index", + "entityType": "indexes", + "schema": "public", + "table": "import_job_items" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_owner_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "import_jobs_account_owner_id_status_index", + "entityType": "indexes", + "schema": "public", + "table": "import_jobs" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "import_jobs_status_created_index", + "entityType": "indexes", + "schema": "public", + "table": "import_jobs" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "likes_account_id_post_id_index", + "entityType": "indexes", + "schema": "public", + "table": "likes" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "likes_created_index", + "entityType": "indexes", + "schema": "public", + "table": "likes" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "list_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "list_posts_list_id_post_id_index", + "entityType": "indexes", + "schema": "public", + "table": "list_posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "media_post_id_index", + "entityType": "indexes", + "schema": "public", + "table": "media" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "mentions_post_id_account_id_index", + "entityType": "indexes", + "schema": "public", + "table": "mentions" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "mutes_account_id_index", + "entityType": "indexes", + "schema": "public", + "table": "mutes" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_owner_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "updated", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notification_groups_account_owner_id_updated_index", + "entityType": "indexes", + "schema": "public", + "table": "notification_groups" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_owner_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "type", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notification_groups_account_owner_id_type_index", + "entityType": "indexes", + "schema": "public", + "table": "notification_groups" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_owner_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notifications_account_owner_id_created_index", + "entityType": "indexes", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_owner_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "read_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notifications_account_owner_id_read_at_index", + "entityType": "indexes", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "group_key", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notifications_group_key_index", + "entityType": "indexes", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "notifications_created_index", + "entityType": "indexes", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "expires_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "passkey_login_challenges_expires_at_index", + "entityType": "indexes", + "schema": "public", + "table": "passkey_login_challenges" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "pinned_posts_account_id_post_id_index", + "entityType": "indexes", + "schema": "public", + "table": "pinned_posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "poll_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "index", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "poll_options_poll_id_index_index", + "entityType": "indexes", + "schema": "public", + "table": "poll_options" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "poll_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "poll_votes_poll_id_account_id_index", + "entityType": "indexes", + "schema": "public", + "table": "poll_votes" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "sharing_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_sharing_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_actor_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sharing_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_actor_id_sharing_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "reply_target_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_reply_target_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "reply_target_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_actor_id_reply_target_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "quote_target_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "(\"quote_target_id\" is not null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_quote_target_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "visibility", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_visibility_actor_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "visibility", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "sharing_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "(\"sharing_id\" is not null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_visibility_actor_id_sharing_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "visibility", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "reply_target_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "(\"reply_target_id\" is not null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_visibility_actor_id_reply_target_id_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "content_html", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": { + "name": "gin_trgm_ops", + "default": false + } + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "posts_content_html_trgm_idx", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "updated", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_updated_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "updated", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_actor_id_updated_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "published", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_actor_id_published_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "actor_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "language", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": "(\"language\" is not null)", + "with": "", + "method": "btree", + "concurrently": false, + "name": "posts_actor_id_language_index", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "tags", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "gin", + "concurrently": false, + "name": "posts_tags_gin_idx", + "entityType": "indexes", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "reactions_post_id_index", + "entityType": "indexes", + "schema": "public", + "table": "reactions" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "reactions_post_id_account_id_index", + "entityType": "indexes", + "schema": "public", + "table": "reactions" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "reactions_created_index", + "entityType": "indexes", + "schema": "public", + "table": "reactions" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "next_attempt_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "remote_reply_scrape_jobs_claim_index", + "entityType": "indexes", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "origin_host", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "next_attempt_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "created", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "remote_reply_scrape_jobs_origin_claim_index", + "entityType": "indexes", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "nameExplicit": true, + "columns": [ + { + "value": "status", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "updated", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "remote_reply_scrape_jobs_stale_processing_index", + "entityType": "indexes", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "next_request_at", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "remote_reply_scrape_origins_next_request_at_index", + "entityType": "indexes", + "schema": "public", + "table": "remote_reply_scrape_origins" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "processing_job_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "remote_reply_scrape_origins_processing_job_id_index", + "entityType": "indexes", + "schema": "public", + "table": "remote_reply_scrape_origins" + }, + { + "nameExplicit": false, + "columns": [ + { + "value": "account_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + }, + { + "value": "post_id", + "isExpression": false, + "asc": true, + "nullsFirst": false, + "opclass": null + } + ], + "isUnique": false, + "where": null, + "with": "", + "method": "btree", + "concurrently": false, + "name": "timeline_posts_account_id_post_id_index", + "entityType": "indexes", + "schema": "public", + "table": "timeline_posts" + }, + { + "nameExplicit": false, + "columns": [ + "application_id" + ], + "schemaTo": "public", + "tableTo": "applications", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "access_grants_application_id_applications_id_fk", + "entityType": "fks", + "schema": "public", + "table": "access_grants" + }, + { + "nameExplicit": false, + "columns": [ + "resource_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "access_grants_resource_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "access_grants" + }, + { + "nameExplicit": false, + "columns": [ + "application_id" + ], + "schemaTo": "public", + "tableTo": "applications", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "access_tokens_application_id_applications_id_fk", + "entityType": "fks", + "schema": "public", + "table": "access_tokens" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "access_tokens_account_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "access_tokens" + }, + { + "nameExplicit": false, + "columns": [ + "id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "account_owners_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "account_owners" + }, + { + "nameExplicit": false, + "columns": [ + "successor_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "accounts_successor_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "accounts" + }, + { + "nameExplicit": false, + "columns": [ + "instance_host" + ], + "schemaTo": "public", + "tableTo": "instances", + "columnsTo": [ + "host" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "accounts_instance_host_instances_host_fk", + "entityType": "fks", + "schema": "public", + "table": "accounts" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "blocks_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "blocks" + }, + { + "nameExplicit": false, + "columns": [ + "blocked_account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "blocks_blocked_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "blocks" + }, + { + "nameExplicit": false, + "columns": [ + "post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "bookmarks_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "bookmarks" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "bookmarks_account_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "bookmarks" + }, + { + "nameExplicit": false, + "columns": [ + "job_id" + ], + "schemaTo": "public", + "tableTo": "cleanup_jobs", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "cleanup_job_items_job_id_cleanup_jobs_id_fk", + "entityType": "fks", + "schema": "public", + "table": "cleanup_job_items" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "featured_tags_account_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "featured_tags" + }, + { + "nameExplicit": false, + "columns": [ + "following_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "follows_following_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "follows" + }, + { + "nameExplicit": false, + "columns": [ + "follower_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "follows_follower_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "follows" + }, + { + "nameExplicit": false, + "columns": [ + "job_id" + ], + "schemaTo": "public", + "tableTo": "import_jobs", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "import_job_items_job_id_import_jobs_id_fk", + "entityType": "fks", + "schema": "public", + "table": "import_job_items" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "import_jobs_account_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "import_jobs" + }, + { + "nameExplicit": false, + "columns": [ + "post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "likes_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "likes" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "likes_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "likes" + }, + { + "nameExplicit": false, + "columns": [ + "list_id" + ], + "schemaTo": "public", + "tableTo": "lists", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "list_members_list_id_lists_id_fk", + "entityType": "fks", + "schema": "public", + "table": "list_members" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "list_members_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "list_members" + }, + { + "nameExplicit": false, + "columns": [ + "list_id" + ], + "schemaTo": "public", + "tableTo": "lists", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "list_posts_list_id_lists_id_fk", + "entityType": "fks", + "schema": "public", + "table": "list_posts" + }, + { + "nameExplicit": false, + "columns": [ + "post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "list_posts_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "list_posts" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "lists_account_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "lists" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "markers_account_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "markers" + }, + { + "nameExplicit": false, + "columns": [ + "post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "media_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "media" + }, + { + "nameExplicit": false, + "columns": [ + "post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "mentions_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "mentions" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "mentions_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "mentions" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "mutes_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "mutes" + }, + { + "nameExplicit": false, + "columns": [ + "muted_account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "mutes_muted_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "mutes" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notification_groups_account_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "notification_groups" + }, + { + "nameExplicit": false, + "columns": [ + "target_post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notification_groups_target_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "notification_groups" + }, + { + "nameExplicit": false, + "columns": [ + "most_recent_notification_id" + ], + "schemaTo": "public", + "tableTo": "notifications", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notification_groups_most_recent_notification_id_notifications_i", + "entityType": "fks", + "schema": "public", + "table": "notification_groups" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notifications_account_owner_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + "actor_account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notifications_actor_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + "target_post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notifications_target_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + "target_account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notifications_target_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + "target_poll_id" + ], + "schemaTo": "public", + "tableTo": "polls", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "notifications_target_poll_id_polls_id_fk", + "entityType": "fks", + "schema": "public", + "table": "notifications" + }, + { + "nameExplicit": false, + "columns": [ + "credential_email" + ], + "schemaTo": "public", + "tableTo": "credentials", + "columnsTo": [ + "email" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "passkeys_credential_email_credentials_email_fk", + "entityType": "fks", + "schema": "public", + "table": "passkeys" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pinned_posts_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "pinned_posts" + }, + { + "nameExplicit": false, + "columns": [ + "post_id", + "account_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id", + "actor_id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "pinned_posts_post_id_account_id_posts_id_actor_id_fk", + "entityType": "fks", + "schema": "public", + "table": "pinned_posts" + }, + { + "nameExplicit": false, + "columns": [ + "poll_id" + ], + "schemaTo": "public", + "tableTo": "polls", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "poll_options_poll_id_polls_id_fk", + "entityType": "fks", + "schema": "public", + "table": "poll_options" + }, + { + "nameExplicit": false, + "columns": [ + "poll_id" + ], + "schemaTo": "public", + "tableTo": "polls", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "poll_votes_poll_id_polls_id_fk", + "entityType": "fks", + "schema": "public", + "table": "poll_votes" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "poll_votes_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "poll_votes" + }, + { + "nameExplicit": false, + "columns": [ + "poll_id", + "option_index" + ], + "schemaTo": "public", + "tableTo": "poll_options", + "columnsTo": [ + "poll_id", + "index" + ], + "onUpdate": "NO ACTION", + "onDelete": "NO ACTION", + "name": "poll_votes_poll_id_option_index_poll_options_poll_id_index_fk", + "entityType": "fks", + "schema": "public", + "table": "poll_votes" + }, + { + "nameExplicit": false, + "columns": [ + "actor_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "posts_actor_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "application_id" + ], + "schemaTo": "public", + "tableTo": "applications", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "posts_application_id_applications_id_fk", + "entityType": "fks", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "reply_target_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "posts_reply_target_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "sharing_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "posts_sharing_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "quote_target_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "posts_quote_target_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "poll_id" + ], + "schemaTo": "public", + "tableTo": "polls", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "SET NULL", + "name": "posts_poll_id_polls_id_fk", + "entityType": "fks", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "reactions_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "reactions" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "reactions_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "reactions" + }, + { + "nameExplicit": false, + "columns": [ + "post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "remote_reply_scrape_jobs_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "remote_reply_scrape_jobs" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "reports_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "reports" + }, + { + "nameExplicit": false, + "columns": [ + "target_account_id" + ], + "schemaTo": "public", + "tableTo": "accounts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "reports_target_account_id_accounts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "reports" + }, + { + "nameExplicit": false, + "columns": [ + "account_id" + ], + "schemaTo": "public", + "tableTo": "account_owners", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "timeline_posts_account_id_account_owners_id_fk", + "entityType": "fks", + "schema": "public", + "table": "timeline_posts" + }, + { + "nameExplicit": false, + "columns": [ + "post_id" + ], + "schemaTo": "public", + "tableTo": "posts", + "columnsTo": [ + "id" + ], + "onUpdate": "NO ACTION", + "onDelete": "CASCADE", + "name": "timeline_posts_post_id_posts_id_fk", + "entityType": "fks", + "schema": "public", + "table": "timeline_posts" + }, + { + "columns": [ + "account_id", + "blocked_account_id" + ], + "nameExplicit": false, + "name": "blocks_account_id_blocked_account_id_pk", + "entityType": "pks", + "schema": "public", + "table": "blocks" + }, + { + "columns": [ + "post_id", + "account_owner_id" + ], + "nameExplicit": false, + "name": "bookmarks_post_id_account_owner_id_pk", + "entityType": "pks", + "schema": "public", + "table": "bookmarks" + }, + { + "columns": [ + "following_id", + "follower_id" + ], + "nameExplicit": false, + "name": "follows_following_id_follower_id_pk", + "entityType": "pks", + "schema": "public", + "table": "follows" + }, + { + "columns": [ + "post_id", + "account_id" + ], + "nameExplicit": false, + "name": "likes_post_id_account_id_pk", + "entityType": "pks", + "schema": "public", + "table": "likes" + }, + { + "columns": [ + "list_id", + "account_id" + ], + "nameExplicit": false, + "name": "list_members_list_id_account_id_pk", + "entityType": "pks", + "schema": "public", + "table": "list_members" + }, + { + "columns": [ + "list_id", + "post_id" + ], + "nameExplicit": false, + "name": "list_posts_list_id_post_id_pk", + "entityType": "pks", + "schema": "public", + "table": "list_posts" + }, + { + "columns": [ + "account_owner_id", + "type" + ], + "nameExplicit": false, + "name": "markers_account_owner_id_type_pk", + "entityType": "pks", + "schema": "public", + "table": "markers" + }, + { + "columns": [ + "post_id", + "account_id" + ], + "nameExplicit": false, + "name": "mentions_post_id_account_id_pk", + "entityType": "pks", + "schema": "public", + "table": "mentions" + }, + { + "columns": [ + "poll_id", + "index" + ], + "nameExplicit": false, + "name": "poll_options_poll_id_index_pk", + "entityType": "pks", + "schema": "public", + "table": "poll_options" + }, + { + "columns": [ + "poll_id", + "option_index", + "account_id" + ], + "nameExplicit": false, + "name": "poll_votes_poll_id_option_index_account_id_pk", + "entityType": "pks", + "schema": "public", + "table": "poll_votes" + }, + { + "columns": [ + "post_id", + "account_id", + "emoji" + ], + "nameExplicit": false, + "name": "reactions_post_id_account_id_emoji_pk", + "entityType": "pks", + "schema": "public", + "table": "reactions" + }, + { + "columns": [ + "account_id", + "post_id" + ], + "nameExplicit": false, + "name": "timeline_posts_account_id_post_id_pk", + "entityType": "pks", + "schema": "public", + "table": "timeline_posts" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "access_grants_pkey", + "schema": "public", + "table": "access_grants", + "entityType": "pks" + }, + { + "columns": [ + "code" + ], + "nameExplicit": false, + "name": "access_tokens_pkey", + "schema": "public", + "table": "access_tokens", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "account_owners_pkey", + "schema": "public", + "table": "account_owners", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "accounts_pkey", + "schema": "public", + "table": "accounts", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "applications_pkey", + "schema": "public", + "table": "applications", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "cleanup_job_items_pkey", + "schema": "public", + "table": "cleanup_job_items", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "cleanup_jobs_pkey", + "schema": "public", + "table": "cleanup_jobs", + "entityType": "pks" + }, + { + "columns": [ + "email" + ], + "nameExplicit": false, + "name": "credentials_pkey", + "schema": "public", + "table": "credentials", + "entityType": "pks" + }, + { + "columns": [ + "shortcode" + ], + "nameExplicit": false, + "name": "custom_emojis_pkey", + "schema": "public", + "table": "custom_emojis", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "featured_tags_pkey", + "schema": "public", + "table": "featured_tags", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "import_job_items_pkey", + "schema": "public", + "table": "import_job_items", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "import_jobs_pkey", + "schema": "public", + "table": "import_jobs", + "entityType": "pks" + }, + { + "columns": [ + "host" + ], + "nameExplicit": false, + "name": "instances_pkey", + "schema": "public", + "table": "instances", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "lists_pkey", + "schema": "public", + "table": "lists", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "media_pkey", + "schema": "public", + "table": "media", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "mutes_pkey", + "schema": "public", + "table": "mutes", + "entityType": "pks" + }, + { + "columns": [ + "group_key" + ], + "nameExplicit": false, + "name": "notification_groups_pkey", + "schema": "public", + "table": "notification_groups", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "notifications_pkey", + "schema": "public", + "table": "notifications", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "passkey_login_challenges_pkey", + "schema": "public", + "table": "passkey_login_challenges", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "passkeys_pkey", + "schema": "public", + "table": "passkeys", + "entityType": "pks" + }, + { + "columns": [ + "index" + ], + "nameExplicit": false, + "name": "pinned_posts_pkey", + "schema": "public", + "table": "pinned_posts", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "polls_pkey", + "schema": "public", + "table": "polls", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "posts_pkey", + "schema": "public", + "table": "posts", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "remote_reply_scrape_jobs_pkey", + "schema": "public", + "table": "remote_reply_scrape_jobs", + "entityType": "pks" + }, + { + "columns": [ + "origin_host" + ], + "nameExplicit": false, + "name": "remote_reply_scrape_origins_pkey", + "schema": "public", + "table": "remote_reply_scrape_origins", + "entityType": "pks" + }, + { + "columns": [ + "id" + ], + "nameExplicit": false, + "name": "reports_pkey", + "schema": "public", + "table": "reports", + "entityType": "pks" + }, + { + "nameExplicit": false, + "columns": [ + "account_owner_id", + "name" + ], + "nullsNotDistinct": false, + "name": "featured_tags_account_owner_id_name_unique", + "entityType": "uniques", + "schema": "public", + "table": "featured_tags" + }, + { + "nameExplicit": true, + "columns": [ + "account_id", + "muted_account_id" + ], + "nullsNotDistinct": false, + "name": "mutes_account_id_muted_account_id_unique", + "entityType": "uniques", + "schema": "public", + "table": "mutes" + }, + { + "nameExplicit": false, + "columns": [ + "post_id", + "account_id" + ], + "nullsNotDistinct": false, + "name": "pinned_posts_post_id_account_id_unique", + "entityType": "uniques", + "schema": "public", + "table": "pinned_posts" + }, + { + "nameExplicit": false, + "columns": [ + "poll_id", + "title" + ], + "nullsNotDistinct": false, + "name": "poll_options_poll_id_title_unique", + "entityType": "uniques", + "schema": "public", + "table": "poll_options" + }, + { + "nameExplicit": true, + "columns": [ + "id", + "actor_id" + ], + "nullsNotDistinct": false, + "name": "posts_id_actor_id_unique", + "entityType": "uniques", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "poll_id" + ], + "nullsNotDistinct": false, + "name": "posts_poll_id_unique", + "entityType": "uniques", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "actor_id", + "sharing_id" + ], + "nullsNotDistinct": false, + "name": "posts_actor_id_sharing_id_unique", + "entityType": "uniques", + "schema": "public", + "table": "posts" + }, + { + "nameExplicit": false, + "columns": [ + "code" + ], + "nullsNotDistinct": false, + "name": "access_grants_code_unique", + "schema": "public", + "table": "access_grants", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "handle" + ], + "nullsNotDistinct": false, + "name": "account_owners_handle_unique", + "schema": "public", + "table": "account_owners", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "iri" + ], + "nullsNotDistinct": false, + "name": "accounts_iri_unique", + "schema": "public", + "table": "accounts", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "handle" + ], + "nullsNotDistinct": false, + "name": "accounts_handle_unique", + "schema": "public", + "table": "accounts", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "client_id" + ], + "nullsNotDistinct": false, + "name": "applications_client_id_unique", + "schema": "public", + "table": "applications", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "iri" + ], + "nullsNotDistinct": false, + "name": "follows_iri_unique", + "schema": "public", + "table": "follows", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "iri" + ], + "nullsNotDistinct": false, + "name": "posts_iri_unique", + "schema": "public", + "table": "posts", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "replies_iri" + ], + "nullsNotDistinct": false, + "name": "remote_reply_scrape_jobs_replies_iri_unique", + "schema": "public", + "table": "remote_reply_scrape_jobs", + "entityType": "uniques" + }, + { + "nameExplicit": false, + "columns": [ + "iri" + ], + "nullsNotDistinct": false, + "name": "reports_iri_unique", + "schema": "public", + "table": "reports", + "entityType": "uniques" + }, + { + "value": "jsonb_typeof(\"rsa_private_key_jwk\") = 'object'", + "name": "ck_account_owners_rsa_private_key_jwk_object", + "entityType": "checks", + "schema": "public", + "table": "account_owners" + }, + { + "value": "jsonb_typeof(\"rsa_public_key_jwk\") = 'object'", + "name": "ck_account_owners_rsa_public_key_jwk_object", + "entityType": "checks", + "schema": "public", + "table": "account_owners" + }, + { + "value": "jsonb_typeof(\"ed25519_private_key_jwk\") = 'object'", + "name": "ck_account_owners_ed25519_private_key_jwk_object", + "entityType": "checks", + "schema": "public", + "table": "account_owners" + }, + { + "value": "jsonb_typeof(\"ed25519_public_key_jwk\") = 'object'", + "name": "ck_account_owners_ed25519_public_key_jwk_object", + "entityType": "checks", + "schema": "public", + "table": "account_owners" + }, + { + "value": "\"following_id\" != \"follower_id\"", + "name": "ck_follows_self", + "entityType": "checks", + "schema": "public", + "table": "follows" + } + ], + "renames": [] +} \ No newline at end of file diff --git a/src/api/v1/accounts.ts b/src/api/v1/accounts.ts index 513c8f31..e35a946b 100644 --- a/src/api/v1/accounts.ts +++ b/src/api/v1/accounts.ts @@ -241,6 +241,10 @@ app.patch( : owner.fields, visibility: form["source[privacy]"] ?? owner.visibility, language: form["source[language]"] ?? owner.language, + followingListPublic: + form.hide_collections == null + ? owner.followingListPublic + : form.hide_collections !== "true", }) .where(eq(accountOwners.id, owner.id)) .returning(); @@ -815,7 +819,13 @@ app.get("/:id/followers", async (c) => { app.get("/:id/following", async (c) => { const accountId = c.req.param("id"); if (!isUuid(accountId)) return c.json({ error: "Record not found" }, 404); - const followers = await db.query.follows.findMany({ + const localOwner = await db.query.accountOwners.findFirst({ + where: { id: { eq: accountId } }, + }); + if (localOwner != null && !localOwner.followingListPublic) { + return c.json([]); + } + const following = await db.query.follows.findMany({ where: { RAW: (follows, { and, eq, isNotNull }) => and(eq(follows.followerId, accountId), isNotNull(follows.approved))!, @@ -824,7 +834,7 @@ app.get("/:id/following", async (c) => { with: { following: { with: { owner: true, successor: true } } }, }); return c.json( - followers.map((f) => + following.map((f) => f.following.owner == null ? serializeAccount(f.following, c.req.url) : serializeAccountOwner( diff --git a/src/components/AccountForm.tsx b/src/components/AccountForm.tsx index 713478d5..76108033 100644 --- a/src/components/AccountForm.tsx +++ b/src/components/AccountForm.tsx @@ -37,6 +37,7 @@ export interface AccountFormProps { protected?: boolean; discoverable?: boolean; expandSpoilers?: boolean; + followingListPublic?: boolean; language?: string; visibility?: PostVisibility; themeColor?: ThemeColor; @@ -197,6 +198,12 @@ for(var i=0;i + diff --git a/src/components/NewAccountPage.tsx b/src/components/NewAccountPage.tsx index 2c4de6e2..8fa6a0b7 100644 --- a/src/components/NewAccountPage.tsx +++ b/src/components/NewAccountPage.tsx @@ -10,6 +10,7 @@ export interface NewAccountPageProps { protected?: boolean; discoverable?: boolean; expandSpoilers?: boolean; + followingListPublic?: boolean; language?: string; visibility?: PostVisibility; themeColor?: ThemeColor; diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx index 9e617ba8..284331f9 100644 --- a/src/components/Profile.tsx +++ b/src/components/Profile.tsx @@ -71,18 +71,33 @@ export function Profile({ accountOwner, baseUrl }: ProfileProps) {

- - - {numberFormatter.format(account.followingCount ?? 0)} - {" "} - following - - + {accountOwner.followingListPublic ? ( + + + {numberFormatter.format(account.followingCount ?? 0)} + {" "} + following + + ) : ( + + + {numberFormatter.format(account.followingCount ?? 0)} + {" "} + following + + )} + {numberFormatter.format(account.followersCount ?? 0)} {" "} {account.followersCount === 1 ? "follower" : "followers"} - +

{bioHtml && (
{ const protected_ = form.get("protected") != null; const discoverable = form.get("discoverable") != null; const expandSpoilers = form.get("expandSpoilers") != null; + const followingListPublic = form.get("followingListPublic") != null; const language = form.get("language")?.toString()?.trim(); const visibility = form .get("visibility") @@ -147,6 +148,7 @@ accounts.post("/", async (c) => { protected: protected_, discoverable, expandSpoilers, + followingListPublic, language, visibility, themeColor, @@ -183,6 +185,7 @@ accounts.post("/", async (c) => { protected: protected_, discoverable, expandSpoilers, + followingListPublic, language, visibility, themeColor, @@ -210,6 +213,7 @@ accounts.post("/", async (c) => { protected: protected_, discoverable, expandSpoilers, + followingListPublic, language, visibility, themeColor, @@ -320,6 +324,7 @@ accounts.post("/", async (c) => { themeColor, discoverable, expandSpoilers, + followingListPublic, fields: rawFieldsRecord, }) .returning(); @@ -399,6 +404,7 @@ accounts.get("/new", (c) => { themeColor: "azure", news: true, expandSpoilers: false, + followingListPublic: false, }} officialAccount={HOLLO_OFFICIAL_ACCOUNT} host={getInstanceHost(new URL(c.req.url))} @@ -484,6 +490,9 @@ function AccountPage(props: AccountPageProps) { props.values?.discoverable ?? props.accountOwner.discoverable, expandSpoilers: props.values?.expandSpoilers ?? props.accountOwner.expandSpoilers, + followingListPublic: + props.values?.followingListPublic ?? + props.accountOwner.followingListPublic, language: props.values?.language ?? props.accountOwner.language, visibility: props.values?.visibility ?? props.accountOwner.visibility, themeColor: props.values?.themeColor ?? props.accountOwner.themeColor, @@ -521,6 +530,7 @@ accounts.post("/:id", async (c) => { const protected_ = form.get("protected") != null; const discoverable = form.get("discoverable") != null; const expandSpoilers = form.get("expandSpoilers") != null; + const followingListPublic = form.get("followingListPublic") != null; const language = form.get("language")?.toString()?.trim(); const visibility = form .get("visibility") @@ -542,6 +552,7 @@ accounts.post("/:id", async (c) => { protected: protected_, discoverable, expandSpoilers, + followingListPublic, language, visibility, themeColor, @@ -574,6 +585,7 @@ accounts.post("/:id", async (c) => { protected: protected_, discoverable, expandSpoilers, + followingListPublic, language, visibility, themeColor, @@ -604,6 +616,7 @@ accounts.post("/:id", async (c) => { protected: protected_, discoverable, expandSpoilers, + followingListPublic, language, visibility, themeColor, @@ -704,6 +717,7 @@ accounts.post("/:id", async (c) => { themeColor, discoverable, expandSpoilers, + followingListPublic, fields: updateRawFieldsRecord, }) .where(eq(accountOwners.id, accountId)); diff --git a/src/pages/profile/follows.tsx b/src/pages/profile/follows.tsx new file mode 100644 index 00000000..615bd2a6 --- /dev/null +++ b/src/pages/profile/follows.tsx @@ -0,0 +1,259 @@ +import { and, count, desc, eq, ilike, isNotNull, or } from "drizzle-orm"; +import { type Context, Hono } from "hono"; + +import { Layout } from "../../components/Layout.tsx"; +import { Profile } from "../../components/Profile.tsx"; +import { PublicAccountList } from "../../components/PublicAccountList.tsx"; +import { db } from "../../db.ts"; +import { + type Account, + type AccountOwner, + accounts, + follows, +} from "../../schema.ts"; + +const PAGE_SIZE = 100; +const numberFormatter = new Intl.NumberFormat("en-US"); + +const followsApp = new Hono(); + +type Kind = "followers" | "following"; + +async function loadOwner(c: Context) { + let handle = c.req.param("handle"); + if (handle == null) return null; + if (handle.startsWith("@")) handle = handle.substring(1); + const owner = await db.query.accountOwners.findFirst({ + where: { handle: { eq: handle } }, + with: { account: true }, + }); + return owner ?? null; +} + +function parsePage(c: Context): number | null { + const pageStr = c.req.query("page"); + if (pageStr === undefined) return 1; + if (!/^\d+$/.test(pageStr)) return null; + const parsed = Number.parseInt(pageStr, 10); + if (!Number.isSafeInteger(parsed) || parsed < 1) return null; + // Reject pages whose offset would overflow safe-integer arithmetic. + if (parsed > Math.floor(Number.MAX_SAFE_INTEGER / PAGE_SIZE)) return null; + return parsed; +} + +function parseQuery(c: Context): string | undefined { + const raw = c.req.query("q"); + if (raw == null) return undefined; + const trimmed = raw.trim(); + return trimmed === "" ? undefined : trimmed; +} + +function escapeLike(q: string): string { + return q.replace(/[\\%_]/g, (ch) => `\\${ch}`); +} + +function buildPaginationUrls( + page: number, + hasNext: boolean, + query: string | undefined, +): { newerUrl?: string; olderUrl?: string } { + function build(targetPage: number): string { + const params = new URLSearchParams(); + params.set("page", String(targetPage)); + if (query != null) params.set("q", query); + return `?${params.toString()}`; + } + return { + newerUrl: page > 1 ? build(page - 1) : undefined, + olderUrl: hasNext ? build(page + 1) : undefined, + }; +} + +async function renderFollowsPage(c: Context, kind: Kind) { + const owner = await loadOwner(c); + if (owner == null) return c.notFound(); + if (kind === "following" && !owner.followingListPublic) { + return c.notFound(); + } + const page = parsePage(c); + if (page == null) return c.notFound(); + const query = parseQuery(c); + + const ownerColumn = + kind === "followers" ? follows.followingId : follows.followerId; + const otherColumn = + kind === "followers" ? follows.followerId : follows.followingId; + const pattern = query == null ? null : `%${escapeLike(query)}%`; + const where = and( + eq(ownerColumn, owner.id), + isNotNull(follows.approved), + pattern == null + ? undefined + : or(ilike(accounts.name, pattern), ilike(accounts.handle, pattern)), + ); + + const [{ total }] = + pattern == null + ? await db.select({ total: count() }).from(follows).where(where) + : await db + .select({ total: count() }) + .from(follows) + .innerJoin(accounts, eq(otherColumn, accounts.id)) + .where(where); + + if (page > 1 && total === 0) return c.notFound(); + const maxPage = Math.max(1, Math.ceil(total / PAGE_SIZE)); + if (page > maxPage) return c.notFound(); + + const rows = await db + .select({ account: accounts }) + .from(follows) + .innerJoin(accounts, eq(otherColumn, accounts.id)) + .where(where) + .orderBy(desc(follows.approved), desc(otherColumn)) + .limit(PAGE_SIZE) + .offset((page - 1) * PAGE_SIZE); + + const { newerUrl, olderUrl } = buildPaginationUrls( + page, + page * PAGE_SIZE < total, + query, + ); + + return c.html( + r.account)} + total={total} + query={query} + newerUrl={newerUrl} + olderUrl={olderUrl} + baseUrl={c.req.url} + />, + ); +} + +followsApp.get("/followers", (c) => renderFollowsPage(c, "followers")); +followsApp.get("/following", (c) => renderFollowsPage(c, "following")); + +interface FollowsPageProps { + readonly kind: Kind; + readonly accountOwner: AccountOwner & { account: Account }; + readonly accounts: Account[]; + readonly total: number; + readonly query: string | undefined; + readonly newerUrl?: string; + readonly olderUrl?: string; + readonly baseUrl: URL | string; +} + +function FollowsPage({ + kind, + accountOwner, + accounts: accountList, + total, + query, + newerUrl, + olderUrl, + baseUrl, +}: FollowsPageProps) { + const heading = kind === "followers" ? "Followers" : "Following"; + const countLabel = numberFormatter.format(total); + let emptyText: string; + if (query != null) { + emptyText = "No matches found."; + } else if (kind === "followers") { + emptyText = "No followers yet."; + } else { + emptyText = "Not following anyone yet."; + } + const emptyIcon = + kind === "followers" ? "i-lucide-users" : "i-lucide-user-plus"; + return ( + +
+ +
+
+

+ {heading} + + {countLabel} + +

+ +
+ {accountList.length === 0 ? ( +
+
+ ) : ( + + )} +
+ {(newerUrl || olderUrl) && ( + + )} +
+
+ ); +} + +export default followsApp; diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx index 910b8de6..d190d0ca 100644 --- a/src/pages/profile/index.tsx +++ b/src/pages/profile/index.tsx @@ -13,6 +13,7 @@ import { posts, } from "../../schema.ts"; import { isUuid } from "../../uuid.ts"; +import follows from "./follows.tsx"; import postReactions from "./postReactions.tsx"; import { postViewRelations } from "./postRelations.ts"; import profilePost from "./profilePost.tsx"; @@ -21,6 +22,7 @@ const profile = new Hono(); profile.route("/:id{[-a-f0-9]+}", postReactions); profile.route("/:id{[-a-f0-9]+}", profilePost); +profile.route("/", follows); const PAGE_SIZE = 30; diff --git a/src/schema.ts b/src/schema.ts index 3f1ade91..d7b9e860 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -249,6 +249,9 @@ export const accountOwners = pgTable( language: text("language").notNull().default("en"), discoverable: boolean().notNull().default(false), expandSpoilers: boolean("expand_spoilers").notNull().default(false), + followingListPublic: boolean("following_list_public") + .notNull() + .default(false), themeColor: themeColorEnum("theme_color").notNull(), }, (table) => [