From d892ff68fd327d13208adb3cec271a9544b89b39 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 17 Apr 2024 23:04:07 -1000 Subject: [PATCH] chore: :package: Update packages, scripts and run linting --- bun.lockb | Bin 150924 -> 150924 bytes drizzle/meta/0014_snapshot.json | 3710 +++++++++++----------- drizzle/meta/0015_snapshot.json | 3710 +++++++++++----------- drizzle/meta/0017_snapshot.json | 3746 +++++++++++----------- drizzle/meta/0019_snapshot.json | 3762 +++++++++++------------ drizzle/meta/_journal.json | 290 +- package.json | 199 +- packages/request-parser/package.json | 14 +- server/api/api/auth/login/index.ts | 10 +- server/api/api/v2/filters/[id]/index.ts | 2 +- server/api/oauth/authorize/index.ts | 4 +- server/api/well-known/jwks/index.ts | 2 +- 12 files changed, 7326 insertions(+), 8123 deletions(-) diff --git a/bun.lockb b/bun.lockb index 3ceca4d9f3dbe594e25b9d6533a7bdde2440573b..7115aead8e111c71e66c85c7177f43d54b244cec 100755 GIT binary patch delta 25 hcmeB~&Dk@XvtbM4+_~(Gai)4kdM4YK%w>GB9sqgA3B3RS delta 25 dcmeB~&Dk@XvtbM4+_~&b3}CQ*$y~-4>j7-L2x$NS diff --git a/drizzle/meta/0014_snapshot.json b/drizzle/meta/0014_snapshot.json index c68a8ac8..8e0605c9 100644 --- a/drizzle/meta/0014_snapshot.json +++ b/drizzle/meta/0014_snapshot.json @@ -1,1965 +1,1767 @@ { - "id": "7e3ced41-62d0-4afd-acd8-f988d138fe98", - "prevId": "3a5d3182-563a-4d3f-b3be-70811fae42b2", - "version": "5", - "dialect": "pg", - "tables": { - "Applications": { - "name": "Applications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" + "id": "7e3ced41-62d0-4afd-acd8-f988d138fe98", + "prevId": "3a5d3182-563a-4d3f-b3be-70811fae42b2", + "version": "5", + "dialect": "pg", + "tables": { + "Applications": { + "name": "Applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "website": { + "name": "website", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vapid_key": { + "name": "vapid_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "redirect_uris": { + "name": "redirect_uris", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "Applications_client_id_index": { + "name": "Applications_client_id_index", + "columns": ["client_id"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true + "Attachments": { + "name": "Attachments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "remote_url": { + "name": "remote_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "thumbnail_url": { + "name": "thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "blurhash": { + "name": "blurhash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fps": { + "name": "fps", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Attachments_noteId_Notes_id_fk": { + "name": "Attachments_noteId_Notes_id_fk", + "tableFrom": "Attachments", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "website": { - "name": "website", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToNote": { + "name": "EmojiToNote", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToNote_emojiId_noteId_index": { + "name": "EmojiToNote_emojiId_noteId_index", + "columns": ["emojiId", "noteId"], + "isUnique": true + }, + "EmojiToNote_noteId_index": { + "name": "EmojiToNote_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToNote_emojiId_Emojis_id_fk": { + "name": "EmojiToNote_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToNote_noteId_Notes_id_fk": { + "name": "EmojiToNote_noteId_Notes_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "vapid_key": { - "name": "vapid_key", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToUser": { + "name": "EmojiToUser", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToUser_emojiId_userId_index": { + "name": "EmojiToUser_emojiId_userId_index", + "columns": ["emojiId", "userId"], + "isUnique": true + }, + "EmojiToUser_userId_index": { + "name": "EmojiToUser_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToUser_emojiId_Emojis_id_fk": { + "name": "EmojiToUser_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToUser_userId_Users_id_fk": { + "name": "EmojiToUser_userId_Users_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true + "Emojis": { + "name": "Emojis", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "shortcode": { + "name": "shortcode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visible_in_picker": { + "name": "visible_in_picker", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Emojis_instanceId_Instances_id_fk": { + "name": "Emojis_instanceId_Instances_id_fk", + "tableFrom": "Emojis", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "secret": { - "name": "secret", - "type": "text", - "primaryKey": false, - "notNull": true + "FilterKeywords": { + "name": "FilterKeywords", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "filterId": { + "name": "filterId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "keyword": { + "name": "keyword", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "whole_word": { + "name": "whole_word", + "type": "boolean", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "FilterKeywords_filterId_Filters_id_fk": { + "name": "FilterKeywords_filterId_Filters_id_fk", + "tableFrom": "FilterKeywords", + "tableTo": "Filters", + "columnsFrom": ["filterId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true + "Filters": { + "name": "Filters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "context": { + "name": "context", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "filter_action": { + "name": "filter_action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Filters_userId_Users_id_fk": { + "name": "Filters_userId_Users_id_fk", + "tableFrom": "Filters", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "redirect_uris": { - "name": "redirect_uris", - "type": "text", - "primaryKey": false, - "notNull": true + "Flags": { + "name": "Flags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "flag_type": { + "name": "flag_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Flags_noteId_Notes_id_fk": { + "name": "Flags_noteId_Notes_id_fk", + "tableFrom": "Flags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Flags_userId_Users_id_fk": { + "name": "Flags_userId_Users_id_fk", + "tableFrom": "Flags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Instances": { + "name": "Instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Likes": { + "name": "Likes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "likerId": { + "name": "likerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "likedId": { + "name": "likedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Likes_likerId_Users_id_fk": { + "name": "Likes_likerId_Users_id_fk", + "tableFrom": "Likes", + "tableTo": "Users", + "columnsFrom": ["likerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Likes_likedId_Notes_id_fk": { + "name": "Likes_likedId_Notes_id_fk", + "tableFrom": "Likes", + "tableTo": "Notes", + "columnsFrom": ["likedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "LysandObject": { + "name": "LysandObject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "remote_id": { + "name": "remote_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "extra_data": { + "name": "extra_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "extensions": { + "name": "extensions", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "LysandObject_remote_id_index": { + "name": "LysandObject_remote_id_index", + "columns": ["remote_id"], + "isUnique": true + }, + "LysandObject_uri_index": { + "name": "LysandObject_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "LysandObject_authorId_LysandObject_id_fk": { + "name": "LysandObject_authorId_LysandObject_id_fk", + "tableFrom": "LysandObject", + "tableTo": "LysandObject", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Markers": { + "name": "Markers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notificationId": { + "name": "notificationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "timeline": { + "name": "timeline", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Markers_noteId_Notes_id_fk": { + "name": "Markers_noteId_Notes_id_fk", + "tableFrom": "Markers", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_notificationId_Notifications_id_fk": { + "name": "Markers_notificationId_Notifications_id_fk", + "tableFrom": "Markers", + "tableTo": "Notifications", + "columnsFrom": ["notificationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_userId_Users_id_fk": { + "name": "Markers_userId_Users_id_fk", + "tableFrom": "Markers", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModNotes": { + "name": "ModNotes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModNotes_noteId_Notes_id_fk": { + "name": "ModNotes_noteId_Notes_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_userId_Users_id_fk": { + "name": "ModNotes_userId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_modId_Users_id_fk": { + "name": "ModNotes_modId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModTags": { + "name": "ModTags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModTags_noteId_Notes_id_fk": { + "name": "ModTags_noteId_Notes_id_fk", + "tableFrom": "ModTags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_userId_Users_id_fk": { + "name": "ModTags_userId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_modId_Users_id_fk": { + "name": "ModTags_modId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "NoteToMentions": { + "name": "NoteToMentions", + "schema": "", + "columns": { + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "NoteToMentions_noteId_userId_index": { + "name": "NoteToMentions_noteId_userId_index", + "columns": ["noteId", "userId"], + "isUnique": true + }, + "NoteToMentions_userId_index": { + "name": "NoteToMentions_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "NoteToMentions_noteId_Notes_id_fk": { + "name": "NoteToMentions_noteId_Notes_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "NoteToMentions_userId_Users_id_fk": { + "name": "NoteToMentions_userId_Users_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notes": { + "name": "Notes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reblogId": { + "name": "reblogId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text/plain'" + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "replyId": { + "name": "replyId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "quoteId": { + "name": "quoteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "sensitive": { + "name": "sensitive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "spoiler_text": { + "name": "spoiler_text", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content_source": { + "name": "content_source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": { + "Notes_uri_index": { + "name": "Notes_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "Notes_authorId_Users_id_fk": { + "name": "Notes_authorId_Users_id_fk", + "tableFrom": "Notes", + "tableTo": "Users", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_applicationId_Applications_id_fk": { + "name": "Notes_applicationId_Applications_id_fk", + "tableFrom": "Notes", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_reblogId_Notes_id_fk": { + "name": "Notes_reblogId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["reblogId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_replyId_Notes_id_fk": { + "name": "Notes_replyId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["replyId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_quoteId_Notes_id_fk": { + "name": "Notes_quoteId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["quoteId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notifications": { + "name": "Notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "notifiedId": { + "name": "notifiedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "accountId": { + "name": "accountId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "dismissed": { + "name": "dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "Notifications_notifiedId_Users_id_fk": { + "name": "Notifications_notifiedId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["notifiedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_accountId_Users_id_fk": { + "name": "Notifications_accountId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["accountId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_noteId_Notes_id_fk": { + "name": "Notifications_noteId_Notes_id_fk", + "tableFrom": "Notifications", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdAccounts": { + "name": "OpenIdAccounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdAccounts_userId_Users_id_fk": { + "name": "OpenIdAccounts_userId_Users_id_fk", + "tableFrom": "OpenIdAccounts", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdLoginFlows": { + "name": "OpenIdLoginFlows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdLoginFlows_applicationId_Applications_id_fk": { + "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", + "tableFrom": "OpenIdLoginFlows", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Relationships": { + "name": "Relationships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "ownerId": { + "name": "ownerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "subjectId": { + "name": "subjectId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "following": { + "name": "following", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "showing_reblogs": { + "name": "showing_reblogs", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "notifying": { + "name": "notifying", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "followed_by": { + "name": "followed_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocking": { + "name": "blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocked_by": { + "name": "blocked_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting": { + "name": "muting", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting_notifications": { + "name": "muting_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "requested": { + "name": "requested", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "domain_blocking": { + "name": "domain_blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "endorsed": { + "name": "endorsed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "languages": { + "name": "languages", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Relationships_ownerId_Users_id_fk": { + "name": "Relationships_ownerId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["ownerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Relationships_subjectId_Users_id_fk": { + "name": "Relationships_subjectId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["subjectId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Tokens": { + "name": "Tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "token_type": { + "name": "token_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Tokens_userId_Users_id_fk": { + "name": "Tokens_userId_Users_id_fk", + "tableFrom": "Tokens", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Tokens_applicationId_Applications_id_fk": { + "name": "Tokens_applicationId_Applications_id_fk", + "tableFrom": "Tokens", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "UserToPinnedNotes": { + "name": "UserToPinnedNotes", + "schema": "", + "columns": { + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "UserToPinnedNotes_userId_noteId_index": { + "name": "UserToPinnedNotes_userId_noteId_index", + "columns": ["userId", "noteId"], + "isUnique": true + }, + "UserToPinnedNotes_noteId_index": { + "name": "UserToPinnedNotes_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "UserToPinnedNotes_userId_Users_id_fk": { + "name": "UserToPinnedNotes_userId_Users_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserToPinnedNotes_noteId_Notes_id_fk": { + "name": "UserToPinnedNotes_noteId_Notes_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Users": { + "name": "Users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "endpoints": { + "name": "endpoints", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "avatar": { + "name": "avatar", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_bot": { + "name": "is_bot", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_discoverable": { + "name": "is_discoverable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sanctions": { + "name": "sanctions", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "Users_uri_index": { + "name": "Users_uri_index", + "columns": ["uri"], + "isUnique": true + }, + "Users_username_index": { + "name": "Users_username_index", + "columns": ["username"], + "isUnique": true + }, + "Users_email_index": { + "name": "Users_email_index", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": { + "Users_instanceId_Instances_id_fk": { + "name": "Users_instanceId_Instances_id_fk", + "tableFrom": "Users", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } - }, - "indexes": { - "Applications_client_id_index": { - "name": "Applications_client_id_index", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} }, - "Attachments": { - "name": "Attachments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "remote_url": { - "name": "remote_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "thumbnail_url": { - "name": "thumbnail_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "blurhash": { - "name": "blurhash", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sha256": { - "name": "sha256", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "fps": { - "name": "fps", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachments_noteId_Notes_id_fk": { - "name": "Attachments_noteId_Notes_id_fk", - "tableFrom": "Attachments", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToNote": { - "name": "EmojiToNote", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToNote_emojiId_noteId_index": { - "name": "EmojiToNote_emojiId_noteId_index", - "columns": [ - "emojiId", - "noteId" - ], - "isUnique": true - }, - "EmojiToNote_noteId_index": { - "name": "EmojiToNote_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToNote_emojiId_Emojis_id_fk": { - "name": "EmojiToNote_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToNote_noteId_Notes_id_fk": { - "name": "EmojiToNote_noteId_Notes_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToUser": { - "name": "EmojiToUser", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToUser_emojiId_userId_index": { - "name": "EmojiToUser_emojiId_userId_index", - "columns": [ - "emojiId", - "userId" - ], - "isUnique": true - }, - "EmojiToUser_userId_index": { - "name": "EmojiToUser_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToUser_emojiId_Emojis_id_fk": { - "name": "EmojiToUser_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToUser_userId_Users_id_fk": { - "name": "EmojiToUser_userId_Users_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Emojis": { - "name": "Emojis", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "shortcode": { - "name": "shortcode", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "visible_in_picker": { - "name": "visible_in_picker", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Emojis_instanceId_Instances_id_fk": { - "name": "Emojis_instanceId_Instances_id_fk", - "tableFrom": "Emojis", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "FilterKeywords": { - "name": "FilterKeywords", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "filterId": { - "name": "filterId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "whole_word": { - "name": "whole_word", - "type": "boolean", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "FilterKeywords_filterId_Filters_id_fk": { - "name": "FilterKeywords_filterId_Filters_id_fk", - "tableFrom": "FilterKeywords", - "tableTo": "Filters", - "columnsFrom": [ - "filterId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Filters": { - "name": "Filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "context": { - "name": "context", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "filter_action": { - "name": "filter_action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Filters_userId_Users_id_fk": { - "name": "Filters_userId_Users_id_fk", - "tableFrom": "Filters", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flags": { - "name": "Flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flags_noteId_Notes_id_fk": { - "name": "Flags_noteId_Notes_id_fk", - "tableFrom": "Flags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flags_userId_Users_id_fk": { - "name": "Flags_userId_Users_id_fk", - "tableFrom": "Flags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instances": { - "name": "Instances", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "base_url": { - "name": "base_url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "logo": { - "name": "logo", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Likes": { - "name": "Likes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "likerId": { - "name": "likerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "likedId": { - "name": "likedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Likes_likerId_Users_id_fk": { - "name": "Likes_likerId_Users_id_fk", - "tableFrom": "Likes", - "tableTo": "Users", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Likes_likedId_Notes_id_fk": { - "name": "Likes_likedId_Notes_id_fk", - "tableFrom": "Likes", - "tableTo": "Notes", - "columnsFrom": [ - "likedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "LysandObject": { - "name": "LysandObject", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "remote_id": { - "name": "remote_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "extra_data": { - "name": "extra_data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "extensions": { - "name": "extensions", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "LysandObject_remote_id_index": { - "name": "LysandObject_remote_id_index", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_index": { - "name": "LysandObject_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_LysandObject_id_fk": { - "name": "LysandObject_authorId_LysandObject_id_fk", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Markers": { - "name": "Markers", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "notificationId": { - "name": "notificationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "timeline": { - "name": "timeline", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Markers_noteId_Notes_id_fk": { - "name": "Markers_noteId_Notes_id_fk", - "tableFrom": "Markers", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_notificationId_Notifications_id_fk": { - "name": "Markers_notificationId_Notifications_id_fk", - "tableFrom": "Markers", - "tableTo": "Notifications", - "columnsFrom": [ - "notificationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_userId_Users_id_fk": { - "name": "Markers_userId_Users_id_fk", - "tableFrom": "Markers", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNotes": { - "name": "ModNotes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNotes_noteId_Notes_id_fk": { - "name": "ModNotes_noteId_Notes_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_userId_Users_id_fk": { - "name": "ModNotes_userId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_modId_Users_id_fk": { - "name": "ModNotes_modId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTags": { - "name": "ModTags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTags_noteId_Notes_id_fk": { - "name": "ModTags_noteId_Notes_id_fk", - "tableFrom": "ModTags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_userId_Users_id_fk": { - "name": "ModTags_userId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_modId_Users_id_fk": { - "name": "ModTags_modId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "NoteToMentions": { - "name": "NoteToMentions", - "schema": "", - "columns": { - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "NoteToMentions_noteId_userId_index": { - "name": "NoteToMentions_noteId_userId_index", - "columns": [ - "noteId", - "userId" - ], - "isUnique": true - }, - "NoteToMentions_userId_index": { - "name": "NoteToMentions_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "NoteToMentions_noteId_Notes_id_fk": { - "name": "NoteToMentions_noteId_Notes_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "NoteToMentions_userId_Users_id_fk": { - "name": "NoteToMentions_userId_Users_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notes": { - "name": "Notes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "replyId": { - "name": "replyId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quoteId": { - "name": "quoteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoiler_text": { - "name": "spoiler_text", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content_source": { - "name": "content_source", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Notes_uri_index": { - "name": "Notes_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Notes_authorId_Users_id_fk": { - "name": "Notes_authorId_Users_id_fk", - "tableFrom": "Notes", - "tableTo": "Users", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_applicationId_Applications_id_fk": { - "name": "Notes_applicationId_Applications_id_fk", - "tableFrom": "Notes", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_reblogId_Notes_id_fk": { - "name": "Notes_reblogId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_replyId_Notes_id_fk": { - "name": "Notes_replyId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "replyId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_quoteId_Notes_id_fk": { - "name": "Notes_quoteId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "quoteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notifications": { - "name": "Notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "dismissed": { - "name": "dismissed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notifications_notifiedId_Users_id_fk": { - "name": "Notifications_notifiedId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_accountId_Users_id_fk": { - "name": "Notifications_accountId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_noteId_Notes_id_fk": { - "name": "Notifications_noteId_Notes_id_fk", - "tableFrom": "Notifications", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccounts": { - "name": "OpenIdAccounts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccounts_userId_Users_id_fk": { - "name": "OpenIdAccounts_userId_Users_id_fk", - "tableFrom": "OpenIdAccounts", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlows": { - "name": "OpenIdLoginFlows", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "code_verifier": { - "name": "code_verifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlows_applicationId_Applications_id_fk": { - "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", - "tableFrom": "OpenIdLoginFlows", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationships": { - "name": "Relationships", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "ownerId": { - "name": "ownerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "subjectId": { - "name": "subjectId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "following": { - "name": "following", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "showing_reblogs": { - "name": "showing_reblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followed_by": { - "name": "followed_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocked_by": { - "name": "blocked_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting_notifications": { - "name": "muting_notifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domain_blocking": { - "name": "domain_blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "endorsed": { - "name": "endorsed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "languages": { - "name": "languages", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Relationships_ownerId_Users_id_fk": { - "name": "Relationships_ownerId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationships_subjectId_Users_id_fk": { - "name": "Relationships_subjectId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Tokens": { - "name": "Tokens", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "token_type": { - "name": "token_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "scope": { - "name": "scope", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Tokens_userId_Users_id_fk": { - "name": "Tokens_userId_Users_id_fk", - "tableFrom": "Tokens", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Tokens_applicationId_Applications_id_fk": { - "name": "Tokens_applicationId_Applications_id_fk", - "tableFrom": "Tokens", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "UserToPinnedNotes": { - "name": "UserToPinnedNotes", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "UserToPinnedNotes_userId_noteId_index": { - "name": "UserToPinnedNotes_userId_noteId_index", - "columns": [ - "userId", - "noteId" - ], - "isUnique": true - }, - "UserToPinnedNotes_noteId_index": { - "name": "UserToPinnedNotes_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "UserToPinnedNotes_userId_Users_id_fk": { - "name": "UserToPinnedNotes_userId_Users_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "UserToPinnedNotes_noteId_Notes_id_fk": { - "name": "UserToPinnedNotes_noteId_Notes_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Users": { - "name": "Users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "endpoints": { - "name": "endpoints", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "avatar": { - "name": "avatar", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "header": { - "name": "header", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_bot": { - "name": "is_bot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_discoverable": { - "name": "is_discoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "private_key": { - "name": "private_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "Users_uri_index": { - "name": "Users_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - }, - "Users_username_index": { - "name": "Users_username_index", - "columns": [ - "username" - ], - "isUnique": true - }, - "Users_email_index": { - "name": "Users_email_index", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Users_instanceId_Instances_id_fk": { - "name": "Users_instanceId_Instances_id_fk", - "tableFrom": "Users", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, + "enums": {}, "schemas": {}, - "tables": {} - } -} \ No newline at end of file + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/drizzle/meta/0015_snapshot.json b/drizzle/meta/0015_snapshot.json index 3fd99658..4d62c518 100644 --- a/drizzle/meta/0015_snapshot.json +++ b/drizzle/meta/0015_snapshot.json @@ -1,1965 +1,1767 @@ { - "id": "189f44c2-bbf5-4dfd-b02f-ffaedde06921", - "prevId": "7e3ced41-62d0-4afd-acd8-f988d138fe98", - "version": "5", - "dialect": "pg", - "tables": { - "Applications": { - "name": "Applications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" + "id": "189f44c2-bbf5-4dfd-b02f-ffaedde06921", + "prevId": "7e3ced41-62d0-4afd-acd8-f988d138fe98", + "version": "5", + "dialect": "pg", + "tables": { + "Applications": { + "name": "Applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "website": { + "name": "website", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vapid_key": { + "name": "vapid_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "redirect_uris": { + "name": "redirect_uris", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "Applications_client_id_index": { + "name": "Applications_client_id_index", + "columns": ["client_id"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true + "Attachments": { + "name": "Attachments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "remote_url": { + "name": "remote_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "thumbnail_url": { + "name": "thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "blurhash": { + "name": "blurhash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fps": { + "name": "fps", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Attachments_noteId_Notes_id_fk": { + "name": "Attachments_noteId_Notes_id_fk", + "tableFrom": "Attachments", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "website": { - "name": "website", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToNote": { + "name": "EmojiToNote", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToNote_emojiId_noteId_index": { + "name": "EmojiToNote_emojiId_noteId_index", + "columns": ["emojiId", "noteId"], + "isUnique": true + }, + "EmojiToNote_noteId_index": { + "name": "EmojiToNote_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToNote_emojiId_Emojis_id_fk": { + "name": "EmojiToNote_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToNote_noteId_Notes_id_fk": { + "name": "EmojiToNote_noteId_Notes_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "vapid_key": { - "name": "vapid_key", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToUser": { + "name": "EmojiToUser", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToUser_emojiId_userId_index": { + "name": "EmojiToUser_emojiId_userId_index", + "columns": ["emojiId", "userId"], + "isUnique": true + }, + "EmojiToUser_userId_index": { + "name": "EmojiToUser_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToUser_emojiId_Emojis_id_fk": { + "name": "EmojiToUser_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToUser_userId_Users_id_fk": { + "name": "EmojiToUser_userId_Users_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true + "Emojis": { + "name": "Emojis", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "shortcode": { + "name": "shortcode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visible_in_picker": { + "name": "visible_in_picker", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Emojis_instanceId_Instances_id_fk": { + "name": "Emojis_instanceId_Instances_id_fk", + "tableFrom": "Emojis", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "secret": { - "name": "secret", - "type": "text", - "primaryKey": false, - "notNull": true + "FilterKeywords": { + "name": "FilterKeywords", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "filterId": { + "name": "filterId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "keyword": { + "name": "keyword", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "whole_word": { + "name": "whole_word", + "type": "boolean", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "FilterKeywords_filterId_Filters_id_fk": { + "name": "FilterKeywords_filterId_Filters_id_fk", + "tableFrom": "FilterKeywords", + "tableTo": "Filters", + "columnsFrom": ["filterId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true + "Filters": { + "name": "Filters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "context": { + "name": "context", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "filter_action": { + "name": "filter_action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Filters_userId_Users_id_fk": { + "name": "Filters_userId_Users_id_fk", + "tableFrom": "Filters", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "redirect_uris": { - "name": "redirect_uris", - "type": "text", - "primaryKey": false, - "notNull": true + "Flags": { + "name": "Flags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "flag_type": { + "name": "flag_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Flags_noteId_Notes_id_fk": { + "name": "Flags_noteId_Notes_id_fk", + "tableFrom": "Flags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Flags_userId_Users_id_fk": { + "name": "Flags_userId_Users_id_fk", + "tableFrom": "Flags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Instances": { + "name": "Instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Likes": { + "name": "Likes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "likerId": { + "name": "likerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "likedId": { + "name": "likedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Likes_likerId_Users_id_fk": { + "name": "Likes_likerId_Users_id_fk", + "tableFrom": "Likes", + "tableTo": "Users", + "columnsFrom": ["likerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Likes_likedId_Notes_id_fk": { + "name": "Likes_likedId_Notes_id_fk", + "tableFrom": "Likes", + "tableTo": "Notes", + "columnsFrom": ["likedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "LysandObject": { + "name": "LysandObject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "remote_id": { + "name": "remote_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "extra_data": { + "name": "extra_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "extensions": { + "name": "extensions", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "LysandObject_remote_id_index": { + "name": "LysandObject_remote_id_index", + "columns": ["remote_id"], + "isUnique": true + }, + "LysandObject_uri_index": { + "name": "LysandObject_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "LysandObject_authorId_LysandObject_id_fk": { + "name": "LysandObject_authorId_LysandObject_id_fk", + "tableFrom": "LysandObject", + "tableTo": "LysandObject", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Markers": { + "name": "Markers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notificationId": { + "name": "notificationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "timeline": { + "name": "timeline", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Markers_noteId_Notes_id_fk": { + "name": "Markers_noteId_Notes_id_fk", + "tableFrom": "Markers", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_notificationId_Notifications_id_fk": { + "name": "Markers_notificationId_Notifications_id_fk", + "tableFrom": "Markers", + "tableTo": "Notifications", + "columnsFrom": ["notificationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_userId_Users_id_fk": { + "name": "Markers_userId_Users_id_fk", + "tableFrom": "Markers", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModNotes": { + "name": "ModNotes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModNotes_noteId_Notes_id_fk": { + "name": "ModNotes_noteId_Notes_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_userId_Users_id_fk": { + "name": "ModNotes_userId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_modId_Users_id_fk": { + "name": "ModNotes_modId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModTags": { + "name": "ModTags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModTags_noteId_Notes_id_fk": { + "name": "ModTags_noteId_Notes_id_fk", + "tableFrom": "ModTags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_userId_Users_id_fk": { + "name": "ModTags_userId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_modId_Users_id_fk": { + "name": "ModTags_modId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "NoteToMentions": { + "name": "NoteToMentions", + "schema": "", + "columns": { + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "NoteToMentions_noteId_userId_index": { + "name": "NoteToMentions_noteId_userId_index", + "columns": ["noteId", "userId"], + "isUnique": true + }, + "NoteToMentions_userId_index": { + "name": "NoteToMentions_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "NoteToMentions_noteId_Notes_id_fk": { + "name": "NoteToMentions_noteId_Notes_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "NoteToMentions_userId_Users_id_fk": { + "name": "NoteToMentions_userId_Users_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notes": { + "name": "Notes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reblogId": { + "name": "reblogId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text/plain'" + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "replyId": { + "name": "replyId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "quoteId": { + "name": "quoteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "sensitive": { + "name": "sensitive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "spoiler_text": { + "name": "spoiler_text", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content_source": { + "name": "content_source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": { + "Notes_uri_index": { + "name": "Notes_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "Notes_authorId_Users_id_fk": { + "name": "Notes_authorId_Users_id_fk", + "tableFrom": "Notes", + "tableTo": "Users", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_applicationId_Applications_id_fk": { + "name": "Notes_applicationId_Applications_id_fk", + "tableFrom": "Notes", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_reblogId_Notes_id_fk": { + "name": "Notes_reblogId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["reblogId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_replyId_Notes_id_fk": { + "name": "Notes_replyId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["replyId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_quoteId_Notes_id_fk": { + "name": "Notes_quoteId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["quoteId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notifications": { + "name": "Notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "notifiedId": { + "name": "notifiedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "accountId": { + "name": "accountId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "dismissed": { + "name": "dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "Notifications_notifiedId_Users_id_fk": { + "name": "Notifications_notifiedId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["notifiedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_accountId_Users_id_fk": { + "name": "Notifications_accountId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["accountId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_noteId_Notes_id_fk": { + "name": "Notifications_noteId_Notes_id_fk", + "tableFrom": "Notifications", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdAccounts": { + "name": "OpenIdAccounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdAccounts_userId_Users_id_fk": { + "name": "OpenIdAccounts_userId_Users_id_fk", + "tableFrom": "OpenIdAccounts", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdLoginFlows": { + "name": "OpenIdLoginFlows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdLoginFlows_applicationId_Applications_id_fk": { + "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", + "tableFrom": "OpenIdLoginFlows", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Relationships": { + "name": "Relationships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "ownerId": { + "name": "ownerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "subjectId": { + "name": "subjectId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "following": { + "name": "following", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "showing_reblogs": { + "name": "showing_reblogs", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "notifying": { + "name": "notifying", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "followed_by": { + "name": "followed_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocking": { + "name": "blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocked_by": { + "name": "blocked_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting": { + "name": "muting", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting_notifications": { + "name": "muting_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "requested": { + "name": "requested", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "domain_blocking": { + "name": "domain_blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "endorsed": { + "name": "endorsed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "languages": { + "name": "languages", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Relationships_ownerId_Users_id_fk": { + "name": "Relationships_ownerId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["ownerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Relationships_subjectId_Users_id_fk": { + "name": "Relationships_subjectId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["subjectId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Tokens": { + "name": "Tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "token_type": { + "name": "token_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Tokens_userId_Users_id_fk": { + "name": "Tokens_userId_Users_id_fk", + "tableFrom": "Tokens", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Tokens_applicationId_Applications_id_fk": { + "name": "Tokens_applicationId_Applications_id_fk", + "tableFrom": "Tokens", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "UserToPinnedNotes": { + "name": "UserToPinnedNotes", + "schema": "", + "columns": { + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "UserToPinnedNotes_userId_noteId_index": { + "name": "UserToPinnedNotes_userId_noteId_index", + "columns": ["userId", "noteId"], + "isUnique": true + }, + "UserToPinnedNotes_noteId_index": { + "name": "UserToPinnedNotes_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "UserToPinnedNotes_userId_Users_id_fk": { + "name": "UserToPinnedNotes_userId_Users_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserToPinnedNotes_noteId_Notes_id_fk": { + "name": "UserToPinnedNotes_noteId_Notes_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Users": { + "name": "Users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "endpoints": { + "name": "endpoints", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "avatar": { + "name": "avatar", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_bot": { + "name": "is_bot", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_discoverable": { + "name": "is_discoverable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sanctions": { + "name": "sanctions", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "Users_uri_index": { + "name": "Users_uri_index", + "columns": ["uri"], + "isUnique": true + }, + "Users_username_index": { + "name": "Users_username_index", + "columns": ["username"], + "isUnique": true + }, + "Users_email_index": { + "name": "Users_email_index", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": { + "Users_instanceId_Instances_id_fk": { + "name": "Users_instanceId_Instances_id_fk", + "tableFrom": "Users", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } - }, - "indexes": { - "Applications_client_id_index": { - "name": "Applications_client_id_index", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} }, - "Attachments": { - "name": "Attachments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "remote_url": { - "name": "remote_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "thumbnail_url": { - "name": "thumbnail_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "blurhash": { - "name": "blurhash", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sha256": { - "name": "sha256", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "fps": { - "name": "fps", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachments_noteId_Notes_id_fk": { - "name": "Attachments_noteId_Notes_id_fk", - "tableFrom": "Attachments", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToNote": { - "name": "EmojiToNote", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToNote_emojiId_noteId_index": { - "name": "EmojiToNote_emojiId_noteId_index", - "columns": [ - "emojiId", - "noteId" - ], - "isUnique": true - }, - "EmojiToNote_noteId_index": { - "name": "EmojiToNote_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToNote_emojiId_Emojis_id_fk": { - "name": "EmojiToNote_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToNote_noteId_Notes_id_fk": { - "name": "EmojiToNote_noteId_Notes_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToUser": { - "name": "EmojiToUser", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToUser_emojiId_userId_index": { - "name": "EmojiToUser_emojiId_userId_index", - "columns": [ - "emojiId", - "userId" - ], - "isUnique": true - }, - "EmojiToUser_userId_index": { - "name": "EmojiToUser_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToUser_emojiId_Emojis_id_fk": { - "name": "EmojiToUser_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToUser_userId_Users_id_fk": { - "name": "EmojiToUser_userId_Users_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Emojis": { - "name": "Emojis", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "shortcode": { - "name": "shortcode", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "visible_in_picker": { - "name": "visible_in_picker", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Emojis_instanceId_Instances_id_fk": { - "name": "Emojis_instanceId_Instances_id_fk", - "tableFrom": "Emojis", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "FilterKeywords": { - "name": "FilterKeywords", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "filterId": { - "name": "filterId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "whole_word": { - "name": "whole_word", - "type": "boolean", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "FilterKeywords_filterId_Filters_id_fk": { - "name": "FilterKeywords_filterId_Filters_id_fk", - "tableFrom": "FilterKeywords", - "tableTo": "Filters", - "columnsFrom": [ - "filterId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Filters": { - "name": "Filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "context": { - "name": "context", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "filter_action": { - "name": "filter_action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Filters_userId_Users_id_fk": { - "name": "Filters_userId_Users_id_fk", - "tableFrom": "Filters", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flags": { - "name": "Flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flags_noteId_Notes_id_fk": { - "name": "Flags_noteId_Notes_id_fk", - "tableFrom": "Flags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flags_userId_Users_id_fk": { - "name": "Flags_userId_Users_id_fk", - "tableFrom": "Flags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instances": { - "name": "Instances", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "base_url": { - "name": "base_url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "logo": { - "name": "logo", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Likes": { - "name": "Likes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "likerId": { - "name": "likerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "likedId": { - "name": "likedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Likes_likerId_Users_id_fk": { - "name": "Likes_likerId_Users_id_fk", - "tableFrom": "Likes", - "tableTo": "Users", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Likes_likedId_Notes_id_fk": { - "name": "Likes_likedId_Notes_id_fk", - "tableFrom": "Likes", - "tableTo": "Notes", - "columnsFrom": [ - "likedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "LysandObject": { - "name": "LysandObject", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "remote_id": { - "name": "remote_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "extra_data": { - "name": "extra_data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "extensions": { - "name": "extensions", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "LysandObject_remote_id_index": { - "name": "LysandObject_remote_id_index", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_index": { - "name": "LysandObject_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_LysandObject_id_fk": { - "name": "LysandObject_authorId_LysandObject_id_fk", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Markers": { - "name": "Markers", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "notificationId": { - "name": "notificationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "timeline": { - "name": "timeline", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Markers_noteId_Notes_id_fk": { - "name": "Markers_noteId_Notes_id_fk", - "tableFrom": "Markers", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_notificationId_Notifications_id_fk": { - "name": "Markers_notificationId_Notifications_id_fk", - "tableFrom": "Markers", - "tableTo": "Notifications", - "columnsFrom": [ - "notificationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_userId_Users_id_fk": { - "name": "Markers_userId_Users_id_fk", - "tableFrom": "Markers", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNotes": { - "name": "ModNotes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNotes_noteId_Notes_id_fk": { - "name": "ModNotes_noteId_Notes_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_userId_Users_id_fk": { - "name": "ModNotes_userId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_modId_Users_id_fk": { - "name": "ModNotes_modId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTags": { - "name": "ModTags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTags_noteId_Notes_id_fk": { - "name": "ModTags_noteId_Notes_id_fk", - "tableFrom": "ModTags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_userId_Users_id_fk": { - "name": "ModTags_userId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_modId_Users_id_fk": { - "name": "ModTags_modId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "NoteToMentions": { - "name": "NoteToMentions", - "schema": "", - "columns": { - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "NoteToMentions_noteId_userId_index": { - "name": "NoteToMentions_noteId_userId_index", - "columns": [ - "noteId", - "userId" - ], - "isUnique": true - }, - "NoteToMentions_userId_index": { - "name": "NoteToMentions_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "NoteToMentions_noteId_Notes_id_fk": { - "name": "NoteToMentions_noteId_Notes_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "NoteToMentions_userId_Users_id_fk": { - "name": "NoteToMentions_userId_Users_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notes": { - "name": "Notes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "replyId": { - "name": "replyId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quoteId": { - "name": "quoteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoiler_text": { - "name": "spoiler_text", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content_source": { - "name": "content_source", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Notes_uri_index": { - "name": "Notes_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Notes_authorId_Users_id_fk": { - "name": "Notes_authorId_Users_id_fk", - "tableFrom": "Notes", - "tableTo": "Users", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_applicationId_Applications_id_fk": { - "name": "Notes_applicationId_Applications_id_fk", - "tableFrom": "Notes", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_reblogId_Notes_id_fk": { - "name": "Notes_reblogId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_replyId_Notes_id_fk": { - "name": "Notes_replyId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "replyId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_quoteId_Notes_id_fk": { - "name": "Notes_quoteId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "quoteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notifications": { - "name": "Notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "dismissed": { - "name": "dismissed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notifications_notifiedId_Users_id_fk": { - "name": "Notifications_notifiedId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_accountId_Users_id_fk": { - "name": "Notifications_accountId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_noteId_Notes_id_fk": { - "name": "Notifications_noteId_Notes_id_fk", - "tableFrom": "Notifications", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccounts": { - "name": "OpenIdAccounts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccounts_userId_Users_id_fk": { - "name": "OpenIdAccounts_userId_Users_id_fk", - "tableFrom": "OpenIdAccounts", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlows": { - "name": "OpenIdLoginFlows", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "code_verifier": { - "name": "code_verifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlows_applicationId_Applications_id_fk": { - "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", - "tableFrom": "OpenIdLoginFlows", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationships": { - "name": "Relationships", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "ownerId": { - "name": "ownerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "subjectId": { - "name": "subjectId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "following": { - "name": "following", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "showing_reblogs": { - "name": "showing_reblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followed_by": { - "name": "followed_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocked_by": { - "name": "blocked_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting_notifications": { - "name": "muting_notifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domain_blocking": { - "name": "domain_blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "endorsed": { - "name": "endorsed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "languages": { - "name": "languages", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Relationships_ownerId_Users_id_fk": { - "name": "Relationships_ownerId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationships_subjectId_Users_id_fk": { - "name": "Relationships_subjectId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Tokens": { - "name": "Tokens", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "token_type": { - "name": "token_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "scope": { - "name": "scope", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Tokens_userId_Users_id_fk": { - "name": "Tokens_userId_Users_id_fk", - "tableFrom": "Tokens", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Tokens_applicationId_Applications_id_fk": { - "name": "Tokens_applicationId_Applications_id_fk", - "tableFrom": "Tokens", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "UserToPinnedNotes": { - "name": "UserToPinnedNotes", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "UserToPinnedNotes_userId_noteId_index": { - "name": "UserToPinnedNotes_userId_noteId_index", - "columns": [ - "userId", - "noteId" - ], - "isUnique": true - }, - "UserToPinnedNotes_noteId_index": { - "name": "UserToPinnedNotes_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "UserToPinnedNotes_userId_Users_id_fk": { - "name": "UserToPinnedNotes_userId_Users_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "UserToPinnedNotes_noteId_Notes_id_fk": { - "name": "UserToPinnedNotes_noteId_Notes_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Users": { - "name": "Users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "endpoints": { - "name": "endpoints", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "avatar": { - "name": "avatar", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "header": { - "name": "header", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_bot": { - "name": "is_bot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_discoverable": { - "name": "is_discoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "private_key": { - "name": "private_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "Users_uri_index": { - "name": "Users_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - }, - "Users_username_index": { - "name": "Users_username_index", - "columns": [ - "username" - ], - "isUnique": true - }, - "Users_email_index": { - "name": "Users_email_index", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Users_instanceId_Instances_id_fk": { - "name": "Users_instanceId_Instances_id_fk", - "tableFrom": "Users", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, + "enums": {}, "schemas": {}, - "tables": {} - } -} \ No newline at end of file + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/drizzle/meta/0017_snapshot.json b/drizzle/meta/0017_snapshot.json index faa1a72a..f204ba4e 100644 --- a/drizzle/meta/0017_snapshot.json +++ b/drizzle/meta/0017_snapshot.json @@ -1,1983 +1,1785 @@ { - "id": "f716d012-9ab2-4fc0-b97b-466a2f159780", - "prevId": "75cb9067-6cf7-4e64-8b2f-e1c140a7d843", - "version": "5", - "dialect": "pg", - "tables": { - "Applications": { - "name": "Applications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" + "id": "f716d012-9ab2-4fc0-b97b-466a2f159780", + "prevId": "75cb9067-6cf7-4e64-8b2f-e1c140a7d843", + "version": "5", + "dialect": "pg", + "tables": { + "Applications": { + "name": "Applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "website": { + "name": "website", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vapid_key": { + "name": "vapid_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "redirect_uri": { + "name": "redirect_uri", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "Applications_client_id_index": { + "name": "Applications_client_id_index", + "columns": ["client_id"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true + "Attachments": { + "name": "Attachments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "remote_url": { + "name": "remote_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "thumbnail_url": { + "name": "thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "blurhash": { + "name": "blurhash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fps": { + "name": "fps", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Attachments_noteId_Notes_id_fk": { + "name": "Attachments_noteId_Notes_id_fk", + "tableFrom": "Attachments", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "website": { - "name": "website", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToNote": { + "name": "EmojiToNote", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToNote_emojiId_noteId_index": { + "name": "EmojiToNote_emojiId_noteId_index", + "columns": ["emojiId", "noteId"], + "isUnique": true + }, + "EmojiToNote_noteId_index": { + "name": "EmojiToNote_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToNote_emojiId_Emojis_id_fk": { + "name": "EmojiToNote_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToNote_noteId_Notes_id_fk": { + "name": "EmojiToNote_noteId_Notes_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "vapid_key": { - "name": "vapid_key", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToUser": { + "name": "EmojiToUser", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToUser_emojiId_userId_index": { + "name": "EmojiToUser_emojiId_userId_index", + "columns": ["emojiId", "userId"], + "isUnique": true + }, + "EmojiToUser_userId_index": { + "name": "EmojiToUser_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToUser_emojiId_Emojis_id_fk": { + "name": "EmojiToUser_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToUser_userId_Users_id_fk": { + "name": "EmojiToUser_userId_Users_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true + "Emojis": { + "name": "Emojis", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "shortcode": { + "name": "shortcode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visible_in_picker": { + "name": "visible_in_picker", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Emojis_instanceId_Instances_id_fk": { + "name": "Emojis_instanceId_Instances_id_fk", + "tableFrom": "Emojis", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "secret": { - "name": "secret", - "type": "text", - "primaryKey": false, - "notNull": true + "FilterKeywords": { + "name": "FilterKeywords", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "filterId": { + "name": "filterId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "keyword": { + "name": "keyword", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "whole_word": { + "name": "whole_word", + "type": "boolean", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "FilterKeywords_filterId_Filters_id_fk": { + "name": "FilterKeywords_filterId_Filters_id_fk", + "tableFrom": "FilterKeywords", + "tableTo": "Filters", + "columnsFrom": ["filterId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true + "Filters": { + "name": "Filters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "context": { + "name": "context", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "filter_action": { + "name": "filter_action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Filters_userId_Users_id_fk": { + "name": "Filters_userId_Users_id_fk", + "tableFrom": "Filters", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "redirect_uri": { - "name": "redirect_uri", - "type": "text", - "primaryKey": false, - "notNull": true + "Flags": { + "name": "Flags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "flag_type": { + "name": "flag_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Flags_noteId_Notes_id_fk": { + "name": "Flags_noteId_Notes_id_fk", + "tableFrom": "Flags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Flags_userId_Users_id_fk": { + "name": "Flags_userId_Users_id_fk", + "tableFrom": "Flags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Instances": { + "name": "Instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Likes": { + "name": "Likes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "likerId": { + "name": "likerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "likedId": { + "name": "likedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Likes_likerId_Users_id_fk": { + "name": "Likes_likerId_Users_id_fk", + "tableFrom": "Likes", + "tableTo": "Users", + "columnsFrom": ["likerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Likes_likedId_Notes_id_fk": { + "name": "Likes_likedId_Notes_id_fk", + "tableFrom": "Likes", + "tableTo": "Notes", + "columnsFrom": ["likedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "LysandObject": { + "name": "LysandObject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "remote_id": { + "name": "remote_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "extra_data": { + "name": "extra_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "extensions": { + "name": "extensions", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "LysandObject_remote_id_index": { + "name": "LysandObject_remote_id_index", + "columns": ["remote_id"], + "isUnique": true + }, + "LysandObject_uri_index": { + "name": "LysandObject_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "LysandObject_authorId_LysandObject_id_fk": { + "name": "LysandObject_authorId_LysandObject_id_fk", + "tableFrom": "LysandObject", + "tableTo": "LysandObject", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Markers": { + "name": "Markers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notificationId": { + "name": "notificationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "timeline": { + "name": "timeline", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Markers_noteId_Notes_id_fk": { + "name": "Markers_noteId_Notes_id_fk", + "tableFrom": "Markers", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_notificationId_Notifications_id_fk": { + "name": "Markers_notificationId_Notifications_id_fk", + "tableFrom": "Markers", + "tableTo": "Notifications", + "columnsFrom": ["notificationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_userId_Users_id_fk": { + "name": "Markers_userId_Users_id_fk", + "tableFrom": "Markers", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModNotes": { + "name": "ModNotes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModNotes_noteId_Notes_id_fk": { + "name": "ModNotes_noteId_Notes_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_userId_Users_id_fk": { + "name": "ModNotes_userId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_modId_Users_id_fk": { + "name": "ModNotes_modId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModTags": { + "name": "ModTags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModTags_noteId_Notes_id_fk": { + "name": "ModTags_noteId_Notes_id_fk", + "tableFrom": "ModTags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_userId_Users_id_fk": { + "name": "ModTags_userId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_modId_Users_id_fk": { + "name": "ModTags_modId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "NoteToMentions": { + "name": "NoteToMentions", + "schema": "", + "columns": { + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "NoteToMentions_noteId_userId_index": { + "name": "NoteToMentions_noteId_userId_index", + "columns": ["noteId", "userId"], + "isUnique": true + }, + "NoteToMentions_userId_index": { + "name": "NoteToMentions_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "NoteToMentions_noteId_Notes_id_fk": { + "name": "NoteToMentions_noteId_Notes_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "NoteToMentions_userId_Users_id_fk": { + "name": "NoteToMentions_userId_Users_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notes": { + "name": "Notes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reblogId": { + "name": "reblogId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text/plain'" + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "replyId": { + "name": "replyId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "quoteId": { + "name": "quoteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "sensitive": { + "name": "sensitive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "spoiler_text": { + "name": "spoiler_text", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content_source": { + "name": "content_source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": { + "Notes_uri_index": { + "name": "Notes_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "Notes_authorId_Users_id_fk": { + "name": "Notes_authorId_Users_id_fk", + "tableFrom": "Notes", + "tableTo": "Users", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_applicationId_Applications_id_fk": { + "name": "Notes_applicationId_Applications_id_fk", + "tableFrom": "Notes", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_reblogId_Notes_id_fk": { + "name": "Notes_reblogId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["reblogId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_replyId_Notes_id_fk": { + "name": "Notes_replyId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["replyId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_quoteId_Notes_id_fk": { + "name": "Notes_quoteId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["quoteId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notifications": { + "name": "Notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "notifiedId": { + "name": "notifiedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "accountId": { + "name": "accountId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "dismissed": { + "name": "dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "Notifications_notifiedId_Users_id_fk": { + "name": "Notifications_notifiedId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["notifiedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_accountId_Users_id_fk": { + "name": "Notifications_accountId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["accountId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_noteId_Notes_id_fk": { + "name": "Notifications_noteId_Notes_id_fk", + "tableFrom": "Notifications", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdAccounts": { + "name": "OpenIdAccounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdAccounts_userId_Users_id_fk": { + "name": "OpenIdAccounts_userId_Users_id_fk", + "tableFrom": "OpenIdAccounts", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdLoginFlows": { + "name": "OpenIdLoginFlows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdLoginFlows_applicationId_Applications_id_fk": { + "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", + "tableFrom": "OpenIdLoginFlows", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Relationships": { + "name": "Relationships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "ownerId": { + "name": "ownerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "subjectId": { + "name": "subjectId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "following": { + "name": "following", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "showing_reblogs": { + "name": "showing_reblogs", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "notifying": { + "name": "notifying", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "followed_by": { + "name": "followed_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocking": { + "name": "blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocked_by": { + "name": "blocked_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting": { + "name": "muting", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting_notifications": { + "name": "muting_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "requested": { + "name": "requested", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "domain_blocking": { + "name": "domain_blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "endorsed": { + "name": "endorsed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "languages": { + "name": "languages", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Relationships_ownerId_Users_id_fk": { + "name": "Relationships_ownerId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["ownerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Relationships_subjectId_Users_id_fk": { + "name": "Relationships_subjectId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["subjectId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Tokens": { + "name": "Tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "token_type": { + "name": "token_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "redirect_uri": { + "name": "redirect_uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Tokens_userId_Users_id_fk": { + "name": "Tokens_userId_Users_id_fk", + "tableFrom": "Tokens", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Tokens_applicationId_Applications_id_fk": { + "name": "Tokens_applicationId_Applications_id_fk", + "tableFrom": "Tokens", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "UserToPinnedNotes": { + "name": "UserToPinnedNotes", + "schema": "", + "columns": { + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "UserToPinnedNotes_userId_noteId_index": { + "name": "UserToPinnedNotes_userId_noteId_index", + "columns": ["userId", "noteId"], + "isUnique": true + }, + "UserToPinnedNotes_noteId_index": { + "name": "UserToPinnedNotes_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "UserToPinnedNotes_userId_Users_id_fk": { + "name": "UserToPinnedNotes_userId_Users_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserToPinnedNotes_noteId_Notes_id_fk": { + "name": "UserToPinnedNotes_noteId_Notes_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Users": { + "name": "Users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "endpoints": { + "name": "endpoints", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "avatar": { + "name": "avatar", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_bot": { + "name": "is_bot", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_discoverable": { + "name": "is_discoverable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sanctions": { + "name": "sanctions", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "Users_uri_index": { + "name": "Users_uri_index", + "columns": ["uri"], + "isUnique": true + }, + "Users_username_index": { + "name": "Users_username_index", + "columns": ["username"], + "isUnique": true + }, + "Users_email_index": { + "name": "Users_email_index", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": { + "Users_instanceId_Instances_id_fk": { + "name": "Users_instanceId_Instances_id_fk", + "tableFrom": "Users", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } - }, - "indexes": { - "Applications_client_id_index": { - "name": "Applications_client_id_index", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} }, - "Attachments": { - "name": "Attachments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "remote_url": { - "name": "remote_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "thumbnail_url": { - "name": "thumbnail_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "blurhash": { - "name": "blurhash", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sha256": { - "name": "sha256", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "fps": { - "name": "fps", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachments_noteId_Notes_id_fk": { - "name": "Attachments_noteId_Notes_id_fk", - "tableFrom": "Attachments", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToNote": { - "name": "EmojiToNote", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToNote_emojiId_noteId_index": { - "name": "EmojiToNote_emojiId_noteId_index", - "columns": [ - "emojiId", - "noteId" - ], - "isUnique": true - }, - "EmojiToNote_noteId_index": { - "name": "EmojiToNote_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToNote_emojiId_Emojis_id_fk": { - "name": "EmojiToNote_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToNote_noteId_Notes_id_fk": { - "name": "EmojiToNote_noteId_Notes_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToUser": { - "name": "EmojiToUser", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToUser_emojiId_userId_index": { - "name": "EmojiToUser_emojiId_userId_index", - "columns": [ - "emojiId", - "userId" - ], - "isUnique": true - }, - "EmojiToUser_userId_index": { - "name": "EmojiToUser_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToUser_emojiId_Emojis_id_fk": { - "name": "EmojiToUser_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToUser_userId_Users_id_fk": { - "name": "EmojiToUser_userId_Users_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Emojis": { - "name": "Emojis", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "shortcode": { - "name": "shortcode", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "visible_in_picker": { - "name": "visible_in_picker", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Emojis_instanceId_Instances_id_fk": { - "name": "Emojis_instanceId_Instances_id_fk", - "tableFrom": "Emojis", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "FilterKeywords": { - "name": "FilterKeywords", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "filterId": { - "name": "filterId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "whole_word": { - "name": "whole_word", - "type": "boolean", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "FilterKeywords_filterId_Filters_id_fk": { - "name": "FilterKeywords_filterId_Filters_id_fk", - "tableFrom": "FilterKeywords", - "tableTo": "Filters", - "columnsFrom": [ - "filterId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Filters": { - "name": "Filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "context": { - "name": "context", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "filter_action": { - "name": "filter_action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Filters_userId_Users_id_fk": { - "name": "Filters_userId_Users_id_fk", - "tableFrom": "Filters", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flags": { - "name": "Flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flags_noteId_Notes_id_fk": { - "name": "Flags_noteId_Notes_id_fk", - "tableFrom": "Flags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flags_userId_Users_id_fk": { - "name": "Flags_userId_Users_id_fk", - "tableFrom": "Flags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instances": { - "name": "Instances", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "base_url": { - "name": "base_url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "logo": { - "name": "logo", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Likes": { - "name": "Likes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "likerId": { - "name": "likerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "likedId": { - "name": "likedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Likes_likerId_Users_id_fk": { - "name": "Likes_likerId_Users_id_fk", - "tableFrom": "Likes", - "tableTo": "Users", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Likes_likedId_Notes_id_fk": { - "name": "Likes_likedId_Notes_id_fk", - "tableFrom": "Likes", - "tableTo": "Notes", - "columnsFrom": [ - "likedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "LysandObject": { - "name": "LysandObject", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "remote_id": { - "name": "remote_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "extra_data": { - "name": "extra_data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "extensions": { - "name": "extensions", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "LysandObject_remote_id_index": { - "name": "LysandObject_remote_id_index", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_index": { - "name": "LysandObject_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_LysandObject_id_fk": { - "name": "LysandObject_authorId_LysandObject_id_fk", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Markers": { - "name": "Markers", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "notificationId": { - "name": "notificationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "timeline": { - "name": "timeline", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Markers_noteId_Notes_id_fk": { - "name": "Markers_noteId_Notes_id_fk", - "tableFrom": "Markers", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_notificationId_Notifications_id_fk": { - "name": "Markers_notificationId_Notifications_id_fk", - "tableFrom": "Markers", - "tableTo": "Notifications", - "columnsFrom": [ - "notificationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_userId_Users_id_fk": { - "name": "Markers_userId_Users_id_fk", - "tableFrom": "Markers", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNotes": { - "name": "ModNotes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNotes_noteId_Notes_id_fk": { - "name": "ModNotes_noteId_Notes_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_userId_Users_id_fk": { - "name": "ModNotes_userId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_modId_Users_id_fk": { - "name": "ModNotes_modId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTags": { - "name": "ModTags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTags_noteId_Notes_id_fk": { - "name": "ModTags_noteId_Notes_id_fk", - "tableFrom": "ModTags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_userId_Users_id_fk": { - "name": "ModTags_userId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_modId_Users_id_fk": { - "name": "ModTags_modId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "NoteToMentions": { - "name": "NoteToMentions", - "schema": "", - "columns": { - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "NoteToMentions_noteId_userId_index": { - "name": "NoteToMentions_noteId_userId_index", - "columns": [ - "noteId", - "userId" - ], - "isUnique": true - }, - "NoteToMentions_userId_index": { - "name": "NoteToMentions_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "NoteToMentions_noteId_Notes_id_fk": { - "name": "NoteToMentions_noteId_Notes_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "NoteToMentions_userId_Users_id_fk": { - "name": "NoteToMentions_userId_Users_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notes": { - "name": "Notes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "replyId": { - "name": "replyId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quoteId": { - "name": "quoteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoiler_text": { - "name": "spoiler_text", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content_source": { - "name": "content_source", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Notes_uri_index": { - "name": "Notes_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Notes_authorId_Users_id_fk": { - "name": "Notes_authorId_Users_id_fk", - "tableFrom": "Notes", - "tableTo": "Users", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_applicationId_Applications_id_fk": { - "name": "Notes_applicationId_Applications_id_fk", - "tableFrom": "Notes", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_reblogId_Notes_id_fk": { - "name": "Notes_reblogId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_replyId_Notes_id_fk": { - "name": "Notes_replyId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "replyId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_quoteId_Notes_id_fk": { - "name": "Notes_quoteId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "quoteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notifications": { - "name": "Notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "dismissed": { - "name": "dismissed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notifications_notifiedId_Users_id_fk": { - "name": "Notifications_notifiedId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_accountId_Users_id_fk": { - "name": "Notifications_accountId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_noteId_Notes_id_fk": { - "name": "Notifications_noteId_Notes_id_fk", - "tableFrom": "Notifications", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccounts": { - "name": "OpenIdAccounts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccounts_userId_Users_id_fk": { - "name": "OpenIdAccounts_userId_Users_id_fk", - "tableFrom": "OpenIdAccounts", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlows": { - "name": "OpenIdLoginFlows", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "code_verifier": { - "name": "code_verifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlows_applicationId_Applications_id_fk": { - "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", - "tableFrom": "OpenIdLoginFlows", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationships": { - "name": "Relationships", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "ownerId": { - "name": "ownerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "subjectId": { - "name": "subjectId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "following": { - "name": "following", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "showing_reblogs": { - "name": "showing_reblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followed_by": { - "name": "followed_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocked_by": { - "name": "blocked_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting_notifications": { - "name": "muting_notifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domain_blocking": { - "name": "domain_blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "endorsed": { - "name": "endorsed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "languages": { - "name": "languages", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Relationships_ownerId_Users_id_fk": { - "name": "Relationships_ownerId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationships_subjectId_Users_id_fk": { - "name": "Relationships_subjectId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Tokens": { - "name": "Tokens", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "token_type": { - "name": "token_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "scope": { - "name": "scope", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "redirect_uri": { - "name": "redirect_uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Tokens_userId_Users_id_fk": { - "name": "Tokens_userId_Users_id_fk", - "tableFrom": "Tokens", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Tokens_applicationId_Applications_id_fk": { - "name": "Tokens_applicationId_Applications_id_fk", - "tableFrom": "Tokens", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "UserToPinnedNotes": { - "name": "UserToPinnedNotes", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "UserToPinnedNotes_userId_noteId_index": { - "name": "UserToPinnedNotes_userId_noteId_index", - "columns": [ - "userId", - "noteId" - ], - "isUnique": true - }, - "UserToPinnedNotes_noteId_index": { - "name": "UserToPinnedNotes_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "UserToPinnedNotes_userId_Users_id_fk": { - "name": "UserToPinnedNotes_userId_Users_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "UserToPinnedNotes_noteId_Notes_id_fk": { - "name": "UserToPinnedNotes_noteId_Notes_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Users": { - "name": "Users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "endpoints": { - "name": "endpoints", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "avatar": { - "name": "avatar", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "header": { - "name": "header", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_bot": { - "name": "is_bot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_discoverable": { - "name": "is_discoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "private_key": { - "name": "private_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "Users_uri_index": { - "name": "Users_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - }, - "Users_username_index": { - "name": "Users_username_index", - "columns": [ - "username" - ], - "isUnique": true - }, - "Users_email_index": { - "name": "Users_email_index", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Users_instanceId_Instances_id_fk": { - "name": "Users_instanceId_Instances_id_fk", - "tableFrom": "Users", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, + "enums": {}, "schemas": {}, - "tables": {} - } -} \ No newline at end of file + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/drizzle/meta/0019_snapshot.json b/drizzle/meta/0019_snapshot.json index 94e5f22f..6736b4db 100644 --- a/drizzle/meta/0019_snapshot.json +++ b/drizzle/meta/0019_snapshot.json @@ -1,1991 +1,1793 @@ { - "id": "c45f1b6f-a872-4e39-9c0b-05b1d6b27384", - "prevId": "c4c9b98a-3e9e-4ce4-8267-2af5a275ffdc", - "version": "5", - "dialect": "pg", - "tables": { - "Applications": { - "name": "Applications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" + "id": "c45f1b6f-a872-4e39-9c0b-05b1d6b27384", + "prevId": "c4c9b98a-3e9e-4ce4-8267-2af5a275ffdc", + "version": "5", + "dialect": "pg", + "tables": { + "Applications": { + "name": "Applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "website": { + "name": "website", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vapid_key": { + "name": "vapid_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "redirect_uri": { + "name": "redirect_uri", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "Applications_client_id_index": { + "name": "Applications_client_id_index", + "columns": ["client_id"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true + "Attachments": { + "name": "Attachments", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "remote_url": { + "name": "remote_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "thumbnail_url": { + "name": "thumbnail_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "blurhash": { + "name": "blurhash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sha256": { + "name": "sha256", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fps": { + "name": "fps", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Attachments_noteId_Notes_id_fk": { + "name": "Attachments_noteId_Notes_id_fk", + "tableFrom": "Attachments", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "website": { - "name": "website", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToNote": { + "name": "EmojiToNote", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToNote_emojiId_noteId_index": { + "name": "EmojiToNote_emojiId_noteId_index", + "columns": ["emojiId", "noteId"], + "isUnique": true + }, + "EmojiToNote_noteId_index": { + "name": "EmojiToNote_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToNote_emojiId_Emojis_id_fk": { + "name": "EmojiToNote_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToNote_noteId_Notes_id_fk": { + "name": "EmojiToNote_noteId_Notes_id_fk", + "tableFrom": "EmojiToNote", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "vapid_key": { - "name": "vapid_key", - "type": "text", - "primaryKey": false, - "notNull": false + "EmojiToUser": { + "name": "EmojiToUser", + "schema": "", + "columns": { + "emojiId": { + "name": "emojiId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "EmojiToUser_emojiId_userId_index": { + "name": "EmojiToUser_emojiId_userId_index", + "columns": ["emojiId", "userId"], + "isUnique": true + }, + "EmojiToUser_userId_index": { + "name": "EmojiToUser_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "EmojiToUser_emojiId_Emojis_id_fk": { + "name": "EmojiToUser_emojiId_Emojis_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Emojis", + "columnsFrom": ["emojiId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "EmojiToUser_userId_Users_id_fk": { + "name": "EmojiToUser_userId_Users_id_fk", + "tableFrom": "EmojiToUser", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true + "Emojis": { + "name": "Emojis", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "shortcode": { + "name": "shortcode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visible_in_picker": { + "name": "visible_in_picker", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Emojis_instanceId_Instances_id_fk": { + "name": "Emojis_instanceId_Instances_id_fk", + "tableFrom": "Emojis", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "secret": { - "name": "secret", - "type": "text", - "primaryKey": false, - "notNull": true + "FilterKeywords": { + "name": "FilterKeywords", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "filterId": { + "name": "filterId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "keyword": { + "name": "keyword", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "whole_word": { + "name": "whole_word", + "type": "boolean", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "FilterKeywords_filterId_Filters_id_fk": { + "name": "FilterKeywords_filterId_Filters_id_fk", + "tableFrom": "FilterKeywords", + "tableTo": "Filters", + "columnsFrom": ["filterId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "scopes": { - "name": "scopes", - "type": "text", - "primaryKey": false, - "notNull": true + "Filters": { + "name": "Filters", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "context": { + "name": "context", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "filter_action": { + "name": "filter_action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Filters_userId_Users_id_fk": { + "name": "Filters_userId_Users_id_fk", + "tableFrom": "Filters", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "redirect_uri": { - "name": "redirect_uri", - "type": "text", - "primaryKey": false, - "notNull": true + "Flags": { + "name": "Flags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "flag_type": { + "name": "flag_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Flags_noteId_Notes_id_fk": { + "name": "Flags_noteId_Notes_id_fk", + "tableFrom": "Flags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Flags_userId_Users_id_fk": { + "name": "Flags_userId_Users_id_fk", + "tableFrom": "Flags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Instances": { + "name": "Instances", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Likes": { + "name": "Likes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "likerId": { + "name": "likerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "likedId": { + "name": "likedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Likes_likerId_Users_id_fk": { + "name": "Likes_likerId_Users_id_fk", + "tableFrom": "Likes", + "tableTo": "Users", + "columnsFrom": ["likerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Likes_likedId_Notes_id_fk": { + "name": "Likes_likedId_Notes_id_fk", + "tableFrom": "Likes", + "tableTo": "Notes", + "columnsFrom": ["likedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "LysandObject": { + "name": "LysandObject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "remote_id": { + "name": "remote_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "extra_data": { + "name": "extra_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "extensions": { + "name": "extensions", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "LysandObject_remote_id_index": { + "name": "LysandObject_remote_id_index", + "columns": ["remote_id"], + "isUnique": true + }, + "LysandObject_uri_index": { + "name": "LysandObject_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "LysandObject_authorId_LysandObject_id_fk": { + "name": "LysandObject_authorId_LysandObject_id_fk", + "tableFrom": "LysandObject", + "tableTo": "LysandObject", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Markers": { + "name": "Markers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notificationId": { + "name": "notificationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "timeline": { + "name": "timeline", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Markers_noteId_Notes_id_fk": { + "name": "Markers_noteId_Notes_id_fk", + "tableFrom": "Markers", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_notificationId_Notifications_id_fk": { + "name": "Markers_notificationId_Notifications_id_fk", + "tableFrom": "Markers", + "tableTo": "Notifications", + "columnsFrom": ["notificationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Markers_userId_Users_id_fk": { + "name": "Markers_userId_Users_id_fk", + "tableFrom": "Markers", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModNotes": { + "name": "ModNotes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModNotes_noteId_Notes_id_fk": { + "name": "ModNotes_noteId_Notes_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_userId_Users_id_fk": { + "name": "ModNotes_userId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNotes_modId_Users_id_fk": { + "name": "ModNotes_modId_Users_id_fk", + "tableFrom": "ModNotes", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModTags": { + "name": "ModTags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "ModTags_noteId_Notes_id_fk": { + "name": "ModTags_noteId_Notes_id_fk", + "tableFrom": "ModTags", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_userId_Users_id_fk": { + "name": "ModTags_userId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTags_modId_Users_id_fk": { + "name": "ModTags_modId_Users_id_fk", + "tableFrom": "ModTags", + "tableTo": "Users", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "NoteToMentions": { + "name": "NoteToMentions", + "schema": "", + "columns": { + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "NoteToMentions_noteId_userId_index": { + "name": "NoteToMentions_noteId_userId_index", + "columns": ["noteId", "userId"], + "isUnique": true + }, + "NoteToMentions_userId_index": { + "name": "NoteToMentions_userId_index", + "columns": ["userId"], + "isUnique": false + } + }, + "foreignKeys": { + "NoteToMentions_noteId_Notes_id_fk": { + "name": "NoteToMentions_noteId_Notes_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "NoteToMentions_userId_Users_id_fk": { + "name": "NoteToMentions_userId_Users_id_fk", + "tableFrom": "NoteToMentions", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notes": { + "name": "Notes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorId": { + "name": "authorId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "reblogId": { + "name": "reblogId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text/plain'" + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "replyId": { + "name": "replyId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "quoteId": { + "name": "quoteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "sensitive": { + "name": "sensitive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "spoiler_text": { + "name": "spoiler_text", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content_source": { + "name": "content_source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": { + "Notes_uri_index": { + "name": "Notes_uri_index", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "Notes_authorId_Users_id_fk": { + "name": "Notes_authorId_Users_id_fk", + "tableFrom": "Notes", + "tableTo": "Users", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_applicationId_Applications_id_fk": { + "name": "Notes_applicationId_Applications_id_fk", + "tableFrom": "Notes", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_reblogId_Notes_id_fk": { + "name": "Notes_reblogId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["reblogId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notes_replyId_Notes_id_fk": { + "name": "Notes_replyId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["replyId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Notes_quoteId_Notes_id_fk": { + "name": "Notes_quoteId_Notes_id_fk", + "tableFrom": "Notes", + "tableTo": "Notes", + "columnsFrom": ["quoteId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notifications": { + "name": "Notifications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "notifiedId": { + "name": "notifiedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "accountId": { + "name": "accountId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "dismissed": { + "name": "dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": { + "Notifications_notifiedId_Users_id_fk": { + "name": "Notifications_notifiedId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["notifiedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_accountId_Users_id_fk": { + "name": "Notifications_accountId_Users_id_fk", + "tableFrom": "Notifications", + "tableTo": "Users", + "columnsFrom": ["accountId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notifications_noteId_Notes_id_fk": { + "name": "Notifications_noteId_Notes_id_fk", + "tableFrom": "Notifications", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdAccounts": { + "name": "OpenIdAccounts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdAccounts_userId_Users_id_fk": { + "name": "OpenIdAccounts_userId_Users_id_fk", + "tableFrom": "OpenIdAccounts", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdLoginFlows": { + "name": "OpenIdLoginFlows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "issuer_id": { + "name": "issuer_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdLoginFlows_applicationId_Applications_id_fk": { + "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", + "tableFrom": "OpenIdLoginFlows", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Relationships": { + "name": "Relationships", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "ownerId": { + "name": "ownerId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "subjectId": { + "name": "subjectId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "following": { + "name": "following", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "showing_reblogs": { + "name": "showing_reblogs", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "notifying": { + "name": "notifying", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "followed_by": { + "name": "followed_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocking": { + "name": "blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocked_by": { + "name": "blocked_by", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting": { + "name": "muting", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting_notifications": { + "name": "muting_notifications", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "requested": { + "name": "requested", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "domain_blocking": { + "name": "domain_blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "endorsed": { + "name": "endorsed", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "languages": { + "name": "languages", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "Relationships_ownerId_Users_id_fk": { + "name": "Relationships_ownerId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["ownerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Relationships_subjectId_Users_id_fk": { + "name": "Relationships_subjectId_Users_id_fk", + "tableFrom": "Relationships", + "tableTo": "Users", + "columnsFrom": ["subjectId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Tokens": { + "name": "Tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "token_type": { + "name": "token_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "redirect_uri": { + "name": "redirect_uri", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "id_token": { + "name": "id_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Tokens_userId_Users_id_fk": { + "name": "Tokens_userId_Users_id_fk", + "tableFrom": "Tokens", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Tokens_applicationId_Applications_id_fk": { + "name": "Tokens_applicationId_Applications_id_fk", + "tableFrom": "Tokens", + "tableTo": "Applications", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "UserToPinnedNotes": { + "name": "UserToPinnedNotes", + "schema": "", + "columns": { + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "noteId": { + "name": "noteId", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "UserToPinnedNotes_userId_noteId_index": { + "name": "UserToPinnedNotes_userId_noteId_index", + "columns": ["userId", "noteId"], + "isUnique": true + }, + "UserToPinnedNotes_noteId_index": { + "name": "UserToPinnedNotes_noteId_index", + "columns": ["noteId"], + "isUnique": false + } + }, + "foreignKeys": { + "UserToPinnedNotes_userId_Users_id_fk": { + "name": "UserToPinnedNotes_userId_Users_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Users", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "UserToPinnedNotes_noteId_Notes_id_fk": { + "name": "UserToPinnedNotes_noteId_Notes_id_fk", + "tableFrom": "UserToPinnedNotes", + "tableTo": "Notes", + "columnsFrom": ["noteId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Users": { + "name": "Users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "endpoints": { + "name": "endpoints", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "avatar": { + "name": "avatar", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header": { + "name": "header", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_bot": { + "name": "is_bot", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_locked": { + "name": "is_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_discoverable": { + "name": "is_discoverable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sanctions": { + "name": "sanctions", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "disable_automoderation": { + "name": "disable_automoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "Users_uri_index": { + "name": "Users_uri_index", + "columns": ["uri"], + "isUnique": true + }, + "Users_username_index": { + "name": "Users_username_index", + "columns": ["username"], + "isUnique": true + }, + "Users_email_index": { + "name": "Users_email_index", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": { + "Users_instanceId_Instances_id_fk": { + "name": "Users_instanceId_Instances_id_fk", + "tableFrom": "Users", + "tableTo": "Instances", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } - }, - "indexes": { - "Applications_client_id_index": { - "name": "Applications_client_id_index", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} }, - "Attachments": { - "name": "Attachments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "remote_url": { - "name": "remote_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "thumbnail_url": { - "name": "thumbnail_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "mime_type": { - "name": "mime_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "description": { - "name": "description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "blurhash": { - "name": "blurhash", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "sha256": { - "name": "sha256", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "fps": { - "name": "fps", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachments_noteId_Notes_id_fk": { - "name": "Attachments_noteId_Notes_id_fk", - "tableFrom": "Attachments", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToNote": { - "name": "EmojiToNote", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToNote_emojiId_noteId_index": { - "name": "EmojiToNote_emojiId_noteId_index", - "columns": [ - "emojiId", - "noteId" - ], - "isUnique": true - }, - "EmojiToNote_noteId_index": { - "name": "EmojiToNote_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToNote_emojiId_Emojis_id_fk": { - "name": "EmojiToNote_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToNote_noteId_Notes_id_fk": { - "name": "EmojiToNote_noteId_Notes_id_fk", - "tableFrom": "EmojiToNote", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "EmojiToUser": { - "name": "EmojiToUser", - "schema": "", - "columns": { - "emojiId": { - "name": "emojiId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "EmojiToUser_emojiId_userId_index": { - "name": "EmojiToUser_emojiId_userId_index", - "columns": [ - "emojiId", - "userId" - ], - "isUnique": true - }, - "EmojiToUser_userId_index": { - "name": "EmojiToUser_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "EmojiToUser_emojiId_Emojis_id_fk": { - "name": "EmojiToUser_emojiId_Emojis_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Emojis", - "columnsFrom": [ - "emojiId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "EmojiToUser_userId_Users_id_fk": { - "name": "EmojiToUser_userId_Users_id_fk", - "tableFrom": "EmojiToUser", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Emojis": { - "name": "Emojis", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "shortcode": { - "name": "shortcode", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "visible_in_picker": { - "name": "visible_in_picker", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Emojis_instanceId_Instances_id_fk": { - "name": "Emojis_instanceId_Instances_id_fk", - "tableFrom": "Emojis", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "FilterKeywords": { - "name": "FilterKeywords", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "filterId": { - "name": "filterId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "keyword": { - "name": "keyword", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "whole_word": { - "name": "whole_word", - "type": "boolean", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "FilterKeywords_filterId_Filters_id_fk": { - "name": "FilterKeywords_filterId_Filters_id_fk", - "tableFrom": "FilterKeywords", - "tableTo": "Filters", - "columnsFrom": [ - "filterId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Filters": { - "name": "Filters", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "context": { - "name": "context", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "filter_action": { - "name": "filter_action", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Filters_userId_Users_id_fk": { - "name": "Filters_userId_Users_id_fk", - "tableFrom": "Filters", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flags": { - "name": "Flags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flag_type": { - "name": "flag_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flags_noteId_Notes_id_fk": { - "name": "Flags_noteId_Notes_id_fk", - "tableFrom": "Flags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flags_userId_Users_id_fk": { - "name": "Flags_userId_Users_id_fk", - "tableFrom": "Flags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instances": { - "name": "Instances", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "base_url": { - "name": "base_url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "version": { - "name": "version", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "logo": { - "name": "logo", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Likes": { - "name": "Likes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "likerId": { - "name": "likerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "likedId": { - "name": "likedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Likes_likerId_Users_id_fk": { - "name": "Likes_likerId_Users_id_fk", - "tableFrom": "Likes", - "tableTo": "Users", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Likes_likedId_Notes_id_fk": { - "name": "Likes_likedId_Notes_id_fk", - "tableFrom": "Likes", - "tableTo": "Notes", - "columnsFrom": [ - "likedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "LysandObject": { - "name": "LysandObject", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "remote_id": { - "name": "remote_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "extra_data": { - "name": "extra_data", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "extensions": { - "name": "extensions", - "type": "jsonb", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "LysandObject_remote_id_index": { - "name": "LysandObject_remote_id_index", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_index": { - "name": "LysandObject_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_LysandObject_id_fk": { - "name": "LysandObject_authorId_LysandObject_id_fk", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Markers": { - "name": "Markers", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "notificationId": { - "name": "notificationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "timeline": { - "name": "timeline", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Markers_noteId_Notes_id_fk": { - "name": "Markers_noteId_Notes_id_fk", - "tableFrom": "Markers", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_notificationId_Notifications_id_fk": { - "name": "Markers_notificationId_Notifications_id_fk", - "tableFrom": "Markers", - "tableTo": "Notifications", - "columnsFrom": [ - "notificationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Markers_userId_Users_id_fk": { - "name": "Markers_userId_Users_id_fk", - "tableFrom": "Markers", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNotes": { - "name": "ModNotes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNotes_noteId_Notes_id_fk": { - "name": "ModNotes_noteId_Notes_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_userId_Users_id_fk": { - "name": "ModNotes_userId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNotes_modId_Users_id_fk": { - "name": "ModNotes_modId_Users_id_fk", - "tableFrom": "ModNotes", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTags": { - "name": "ModTags", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTags_noteId_Notes_id_fk": { - "name": "ModTags_noteId_Notes_id_fk", - "tableFrom": "ModTags", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_userId_Users_id_fk": { - "name": "ModTags_userId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTags_modId_Users_id_fk": { - "name": "ModTags_modId_Users_id_fk", - "tableFrom": "ModTags", - "tableTo": "Users", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "NoteToMentions": { - "name": "NoteToMentions", - "schema": "", - "columns": { - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "NoteToMentions_noteId_userId_index": { - "name": "NoteToMentions_noteId_userId_index", - "columns": [ - "noteId", - "userId" - ], - "isUnique": true - }, - "NoteToMentions_userId_index": { - "name": "NoteToMentions_userId_index", - "columns": [ - "userId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "NoteToMentions_noteId_Notes_id_fk": { - "name": "NoteToMentions_noteId_Notes_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "NoteToMentions_userId_Users_id_fk": { - "name": "NoteToMentions_userId_Users_id_fk", - "tableFrom": "NoteToMentions", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notes": { - "name": "Notes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "authorId": { - "name": "authorId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "replyId": { - "name": "replyId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quoteId": { - "name": "quoteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoiler_text": { - "name": "spoiler_text", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content_source": { - "name": "content_source", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Notes_uri_index": { - "name": "Notes_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Notes_authorId_Users_id_fk": { - "name": "Notes_authorId_Users_id_fk", - "tableFrom": "Notes", - "tableTo": "Users", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_applicationId_Applications_id_fk": { - "name": "Notes_applicationId_Applications_id_fk", - "tableFrom": "Notes", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_reblogId_Notes_id_fk": { - "name": "Notes_reblogId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notes_replyId_Notes_id_fk": { - "name": "Notes_replyId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "replyId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Notes_quoteId_Notes_id_fk": { - "name": "Notes_quoteId_Notes_id_fk", - "tableFrom": "Notes", - "tableTo": "Notes", - "columnsFrom": [ - "quoteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notifications": { - "name": "Notifications", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "dismissed": { - "name": "dismissed", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notifications_notifiedId_Users_id_fk": { - "name": "Notifications_notifiedId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_accountId_Users_id_fk": { - "name": "Notifications_accountId_Users_id_fk", - "tableFrom": "Notifications", - "tableTo": "Users", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notifications_noteId_Notes_id_fk": { - "name": "Notifications_noteId_Notes_id_fk", - "tableFrom": "Notifications", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccounts": { - "name": "OpenIdAccounts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "server_id": { - "name": "server_id", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccounts_userId_Users_id_fk": { - "name": "OpenIdAccounts_userId_Users_id_fk", - "tableFrom": "OpenIdAccounts", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlows": { - "name": "OpenIdLoginFlows", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "code_verifier": { - "name": "code_verifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuer_id": { - "name": "issuer_id", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlows_applicationId_Applications_id_fk": { - "name": "OpenIdLoginFlows_applicationId_Applications_id_fk", - "tableFrom": "OpenIdLoginFlows", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationships": { - "name": "Relationships", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "ownerId": { - "name": "ownerId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "subjectId": { - "name": "subjectId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "following": { - "name": "following", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "showing_reblogs": { - "name": "showing_reblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followed_by": { - "name": "followed_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocked_by": { - "name": "blocked_by", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting_notifications": { - "name": "muting_notifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domain_blocking": { - "name": "domain_blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "endorsed": { - "name": "endorsed", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "languages": { - "name": "languages", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "Relationships_ownerId_Users_id_fk": { - "name": "Relationships_ownerId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationships_subjectId_Users_id_fk": { - "name": "Relationships_subjectId_Users_id_fk", - "tableFrom": "Relationships", - "tableTo": "Users", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Tokens": { - "name": "Tokens", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "token_type": { - "name": "token_type", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "scope": { - "name": "scope", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "access_token": { - "name": "access_token", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "client_id": { - "name": "client_id", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "redirect_uri": { - "name": "redirect_uri", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "id_token": { - "name": "id_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Tokens_userId_Users_id_fk": { - "name": "Tokens_userId_Users_id_fk", - "tableFrom": "Tokens", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Tokens_applicationId_Applications_id_fk": { - "name": "Tokens_applicationId_Applications_id_fk", - "tableFrom": "Tokens", - "tableTo": "Applications", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "UserToPinnedNotes": { - "name": "UserToPinnedNotes", - "schema": "", - "columns": { - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "noteId": { - "name": "noteId", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "UserToPinnedNotes_userId_noteId_index": { - "name": "UserToPinnedNotes_userId_noteId_index", - "columns": [ - "userId", - "noteId" - ], - "isUnique": true - }, - "UserToPinnedNotes_noteId_index": { - "name": "UserToPinnedNotes_noteId_index", - "columns": [ - "noteId" - ], - "isUnique": false - } - }, - "foreignKeys": { - "UserToPinnedNotes_userId_Users_id_fk": { - "name": "UserToPinnedNotes_userId_Users_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Users", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "UserToPinnedNotes_noteId_Notes_id_fk": { - "name": "UserToPinnedNotes_noteId_Notes_id_fk", - "tableFrom": "UserToPinnedNotes", - "tableTo": "Notes", - "columnsFrom": [ - "noteId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Users": { - "name": "Users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "uri": { - "name": "uri", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "username": { - "name": "username", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "display_name": { - "name": "display_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "is_admin": { - "name": "is_admin", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "endpoints": { - "name": "endpoints", - "type": "jsonb", - "primaryKey": false, - "notNull": false - }, - "source": { - "name": "source", - "type": "jsonb", - "primaryKey": false, - "notNull": true - }, - "avatar": { - "name": "avatar", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "header": { - "name": "header", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "updated_at": { - "name": "updated_at", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "is_bot": { - "name": "is_bot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_locked": { - "name": "is_locked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "is_discoverable": { - "name": "is_discoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false - }, - "public_key": { - "name": "public_key", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "private_key": { - "name": "private_key", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disable_automoderation": { - "name": "disable_automoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "Users_uri_index": { - "name": "Users_uri_index", - "columns": [ - "uri" - ], - "isUnique": true - }, - "Users_username_index": { - "name": "Users_username_index", - "columns": [ - "username" - ], - "isUnique": true - }, - "Users_email_index": { - "name": "Users_email_index", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Users_instanceId_Instances_id_fk": { - "name": "Users_instanceId_Instances_id_fk", - "tableFrom": "Users", - "tableTo": "Instances", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, + "enums": {}, "schemas": {}, - "tables": {} - } -} \ No newline at end of file + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 034e84a4..aa84d034 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -1,146 +1,146 @@ { - "version": "5", - "dialect": "pg", - "entries": [ - { - "idx": 0, - "version": "5", - "when": 1712805159664, - "tag": "0000_illegal_living_lightning", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1713055774123, - "tag": "0001_salty_night_thrasher", - "breakpoints": true - }, - { - "idx": 2, - "version": "5", - "when": 1713056370431, - "tag": "0002_stiff_ares", - "breakpoints": true - }, - { - "idx": 3, - "version": "5", - "when": 1713056528340, - "tag": "0003_spicy_arachne", - "breakpoints": true - }, - { - "idx": 4, - "version": "5", - "when": 1713056712218, - "tag": "0004_burly_lockjaw", - "breakpoints": true - }, - { - "idx": 5, - "version": "5", - "when": 1713056917973, - "tag": "0005_sleepy_puma", - "breakpoints": true - }, - { - "idx": 6, - "version": "5", - "when": 1713057159867, - "tag": "0006_messy_network", - "breakpoints": true - }, - { - "idx": 7, - "version": "5", - "when": 1713227918208, - "tag": "0007_naive_sleeper", - "breakpoints": true - }, - { - "idx": 8, - "version": "5", - "when": 1713246700119, - "tag": "0008_flawless_brother_voodoo", - "breakpoints": true - }, - { - "idx": 9, - "version": "5", - "when": 1713327832438, - "tag": "0009_easy_slyde", - "breakpoints": true - }, - { - "idx": 10, - "version": "5", - "when": 1713327880929, - "tag": "0010_daffy_frightful_four", - "breakpoints": true - }, - { - "idx": 11, - "version": "5", - "when": 1713333611707, - "tag": "0011_special_the_fury", - "breakpoints": true - }, - { - "idx": 12, - "version": "5", - "when": 1713336108114, - "tag": "0012_certain_thor_girl", - "breakpoints": true - }, - { - "idx": 13, - "version": "5", - "when": 1713336611301, - "tag": "0013_wandering_celestials", - "breakpoints": true - }, - { - "idx": 14, - "version": "5", - "when": 1713389937821, - "tag": "0014_wonderful_sandman", - "breakpoints": true - }, - { - "idx": 15, - "version": "5", - "when": 1713399438164, - "tag": "0015_easy_mojo", - "breakpoints": true - }, - { - "idx": 16, - "version": "5", - "when": 1713413369623, - "tag": "0016_keen_mindworm", - "breakpoints": true - }, - { - "idx": 17, - "version": "5", - "when": 1713417089150, - "tag": "0017_dusty_black_knight", - "breakpoints": true - }, - { - "idx": 18, - "version": "5", - "when": 1713418575392, - "tag": "0018_rapid_hairball", - "breakpoints": true - }, - { - "idx": 19, - "version": "5", - "when": 1713421706451, - "tag": "0019_mushy_lorna_dane", - "breakpoints": true - } - ] -} \ No newline at end of file + "version": "5", + "dialect": "pg", + "entries": [ + { + "idx": 0, + "version": "5", + "when": 1712805159664, + "tag": "0000_illegal_living_lightning", + "breakpoints": true + }, + { + "idx": 1, + "version": "5", + "when": 1713055774123, + "tag": "0001_salty_night_thrasher", + "breakpoints": true + }, + { + "idx": 2, + "version": "5", + "when": 1713056370431, + "tag": "0002_stiff_ares", + "breakpoints": true + }, + { + "idx": 3, + "version": "5", + "when": 1713056528340, + "tag": "0003_spicy_arachne", + "breakpoints": true + }, + { + "idx": 4, + "version": "5", + "when": 1713056712218, + "tag": "0004_burly_lockjaw", + "breakpoints": true + }, + { + "idx": 5, + "version": "5", + "when": 1713056917973, + "tag": "0005_sleepy_puma", + "breakpoints": true + }, + { + "idx": 6, + "version": "5", + "when": 1713057159867, + "tag": "0006_messy_network", + "breakpoints": true + }, + { + "idx": 7, + "version": "5", + "when": 1713227918208, + "tag": "0007_naive_sleeper", + "breakpoints": true + }, + { + "idx": 8, + "version": "5", + "when": 1713246700119, + "tag": "0008_flawless_brother_voodoo", + "breakpoints": true + }, + { + "idx": 9, + "version": "5", + "when": 1713327832438, + "tag": "0009_easy_slyde", + "breakpoints": true + }, + { + "idx": 10, + "version": "5", + "when": 1713327880929, + "tag": "0010_daffy_frightful_four", + "breakpoints": true + }, + { + "idx": 11, + "version": "5", + "when": 1713333611707, + "tag": "0011_special_the_fury", + "breakpoints": true + }, + { + "idx": 12, + "version": "5", + "when": 1713336108114, + "tag": "0012_certain_thor_girl", + "breakpoints": true + }, + { + "idx": 13, + "version": "5", + "when": 1713336611301, + "tag": "0013_wandering_celestials", + "breakpoints": true + }, + { + "idx": 14, + "version": "5", + "when": 1713389937821, + "tag": "0014_wonderful_sandman", + "breakpoints": true + }, + { + "idx": 15, + "version": "5", + "when": 1713399438164, + "tag": "0015_easy_mojo", + "breakpoints": true + }, + { + "idx": 16, + "version": "5", + "when": 1713413369623, + "tag": "0016_keen_mindworm", + "breakpoints": true + }, + { + "idx": 17, + "version": "5", + "when": 1713417089150, + "tag": "0017_dusty_black_knight", + "breakpoints": true + }, + { + "idx": 18, + "version": "5", + "when": 1713418575392, + "tag": "0018_rapid_hairball", + "breakpoints": true + }, + { + "idx": 19, + "version": "5", + "when": 1713421706451, + "tag": "0019_mushy_lorna_dane", + "breakpoints": true + } + ] +} diff --git a/package.json b/package.json index b9a2a039..2d9e4088 100644 --- a/package.json +++ b/package.json @@ -1,105 +1,100 @@ { - "name": "lysand", - "module": "index.ts", - "type": "module", - "version": "0.4.0", - "description": "A project to build a federated social network", - "author": { - "email": "contact@cpluspatch.com", - "name": "CPlusPatch", - "url": "https://cpluspatch.com" - }, - "bugs": { - "url": "https://github.com/lysand-org/lysand/issues" - }, - "icon": "https://github.com/lysand-org/lysand", - "license": "AGPL-3.0", - "keywords": ["federated", "activitypub", "bun"], - "workspaces": ["packages/*"], - "maintainers": [ - { - "email": "contact@cpluspatch.com", - "name": "CPlusPatch", - "url": "https://cpluspatch.com" + "name": "lysand", + "module": "index.ts", + "type": "module", + "version": "0.4.0", + "description": "A project to build a federated social network", + "author": { + "email": "contact@cpluspatch.com", + "name": "CPlusPatch", + "url": "https://cpluspatch.com" + }, + "bugs": { + "url": "https://github.com/lysand-org/lysand/issues" + }, + "icon": "https://github.com/lysand-org/lysand", + "license": "AGPL-3.0", + "keywords": ["federated", "activitypub", "bun"], + "workspaces": ["packages/*"], + "maintainers": [ + { + "email": "contact@cpluspatch.com", + "name": "CPlusPatch", + "url": "https://cpluspatch.com" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/lysand-org/lysand.git" + }, + "private": true, + "scripts": { + "dev": "bun run --watch index.ts", + "start": "NODE_ENV=production bun run dist/index.js --prod", + "lint": "bunx @biomejs/biome check .", + "prod-build": "bun run build.ts", + "benchmark:timeline": "bun run benchmarks/timelines.ts", + "cloc": "cloc . --exclude-dir node_modules,dist,.output,.nuxt,meta,logs,glitch,glitch-dev --exclude-ext sql,log,pem", + "cli": "bun run cli.ts" + }, + "trustedDependencies": [ + "@biomejs/biome", + "@fortawesome/fontawesome-common-types", + "@fortawesome/free-regular-svg-icons", + "@fortawesome/free-solid-svg-icons", + "es5-ext", + "esbuild", + "json-editor-vue", + "msgpackr-extract", + "nuxt-app", + "sharp", + "vue-demi" + ], + "devDependencies": { + "@biomejs/biome": "^1.7.0", + "@types/cli-table": "^0.3.4", + "@types/html-to-text": "^9.0.4", + "@types/ioredis": "^5.0.0", + "@types/jsonld": "^1.5.13", + "@types/mime-types": "^2.1.4", + "@types/pg": "^8.11.5", + "bun-types": "latest", + "drizzle-kit": "^0.20.14", + "typescript": "latest" + }, + "peerDependencies": { + "typescript": "^5.3.2" + }, + "dependencies": { + "@json2csv/plainjs": "^7.0.6", + "blurhash": "^2.0.5", + "bullmq": "^5.7.1", + "chalk": "^5.3.0", + "cli-parser": "workspace:*", + "cli-table": "^0.3.11", + "config-manager": "workspace:*", + "drizzle-orm": "^0.30.7", + "extract-zip": "^2.0.1", + "html-to-text": "^9.0.5", + "ioredis": "^5.3.2", + "ip-matching": "^2.1.2", + "iso-639-1": "^3.1.0", + "isomorphic-dompurify": "latest", + "jose": "^5.2.4", + "linkify-html": "^4.1.3", + "linkify-string": "^4.1.3", + "linkifyjs": "^4.1.3", + "log-manager": "workspace:*", + "magic-regexp": "^0.8.0", + "marked": "^12.0.1", + "media-manager": "workspace:*", + "megalodon": "^10.0.0", + "meilisearch": "^0.38.0", + "mime-types": "^2.1.35", + "oauth4webapi": "^2.4.0", + "pg": "^8.11.5", + "request-parser": "workspace:*", + "sharp": "^0.33.3", + "zod": "^3.22.4" } - ], - "repository": { - "type": "git", - "url": "git+https://github.com/lysand-org/lysand.git" - }, - "private": true, - "scripts": { - "dev": "bun run --watch index.ts", - "vite:dev": "bunx --bun vite pages", - "vite:build": "bunx --bun vite build pages", - "fe:dev": "bun --bun nuxt dev packages/frontend", - "fe:build": "bun --bun nuxt build packages/frontend", - "fe:analyze": "bun --bun nuxt analyze packages/frontend", - "start": "NITRO_PORT=5173 bun run dist/frontend/server/index.mjs & NODE_ENV=production bun run dist/index.js --prod", - "lint": "bunx --bun eslint --config .eslintrc.cjs --ext .ts .", - "prod-build": "bun run build.ts", - "benchmark:timeline": "bun run benchmarks/timelines.ts", - "cloc": "cloc . --exclude-dir node_modules,dist,.output,.nuxt,meta,logs --exclude-ext sql,log", - "cli": "bun run cli.ts" - }, - "trustedDependencies": [ - "@biomejs/biome", - "@fortawesome/fontawesome-common-types", - "@fortawesome/free-regular-svg-icons", - "@fortawesome/free-solid-svg-icons", - "es5-ext", - "esbuild", - "json-editor-vue", - "msgpackr-extract", - "nuxt-app", - "sharp", - "vue-demi" - ], - "devDependencies": { - "@biomejs/biome": "^1.7.0", - "@types/cli-table": "^0.3.4", - "@types/html-to-text": "^9.0.4", - "@types/ioredis": "^5.0.0", - "@types/jsonld": "^1.5.13", - "@types/mime-types": "^2.1.4", - "@types/pg": "^8.11.5", - "bun-types": "latest", - "drizzle-kit": "^0.20.14", - "typescript": "latest" - }, - "peerDependencies": { - "typescript": "^5.3.2" - }, - "dependencies": { - "@json2csv/plainjs": "^7.0.6", - "blurhash": "^2.0.5", - "bullmq": "^5.7.1", - "chalk": "^5.3.0", - "cli-parser": "workspace:*", - "cli-table": "^0.3.11", - "config-manager": "workspace:*", - "drizzle-orm": "^0.30.7", - "extract-zip": "^2.0.1", - "html-to-text": "^9.0.5", - "ioredis": "^5.3.2", - "ip-matching": "^2.1.2", - "iso-639-1": "^3.1.0", - "isomorphic-dompurify": "latest", - "jose": "^5.2.4", - "linkify-html": "^4.1.3", - "linkify-string": "^4.1.3", - "linkifyjs": "^4.1.3", - "log-manager": "workspace:*", - "magic-regexp": "^0.8.0", - "marked": "^12.0.1", - "media-manager": "workspace:*", - "megalodon": "^10.0.0", - "meilisearch": "^0.38.0", - "mime-types": "^2.1.35", - "oauth4webapi": "^2.4.0", - "pg": "^8.11.5", - "request-parser": "workspace:*", - "sharp": "^0.33.3", - "zod": "^3.22.4" - } } diff --git a/packages/request-parser/package.json b/packages/request-parser/package.json index 22afee91..4697e599 100644 --- a/packages/request-parser/package.json +++ b/packages/request-parser/package.json @@ -1,9 +1,9 @@ { - "name": "request-parser", - "version": "0.0.0", - "main": "index.ts", - "dependencies": { "qs": "^6.12.1" }, - "devDependencies": { - "@types/qs": "^6.9.15" - } + "name": "request-parser", + "version": "0.0.0", + "main": "index.ts", + "dependencies": { "qs": "^6.12.1" }, + "devDependencies": { + "@types/qs": "^6.9.15" + } } diff --git a/server/api/api/auth/login/index.ts b/server/api/api/auth/login/index.ts index 42fe761f..f22ad38f 100644 --- a/server/api/api/auth/login/index.ts +++ b/server/api/api/auth/login/index.ts @@ -1,13 +1,13 @@ import { apiRoute, applyConfig } from "@api"; -import { z } from "zod"; -import { findFirstUser } from "~database/entities/User"; -import { SignJWT } from "jose"; -import { config } from "~packages/config-manager"; import { errorResponse, response } from "@response"; +import { SignJWT } from "jose"; import { stringify } from "qs"; +import { z } from "zod"; import { fromZodError } from "zod-validation-error"; -import { RequestParser } from "~packages/request-parser"; +import { findFirstUser } from "~database/entities/User"; import { db } from "~drizzle/db"; +import { config } from "~packages/config-manager"; +import { RequestParser } from "~packages/request-parser"; export const meta = applyConfig({ allowedMethods: ["POST"], diff --git a/server/api/api/v2/filters/[id]/index.ts b/server/api/api/v2/filters/[id]/index.ts index 0998c359..2fe473d9 100644 --- a/server/api/api/v2/filters/[id]/index.ts +++ b/server/api/api/v2/filters/[id]/index.ts @@ -1,6 +1,6 @@ import { apiRoute, applyConfig, idValidator } from "@api"; import { errorResponse, jsonResponse } from "@response"; -import { and, eq, inArray, type InferSelectModel } from "drizzle-orm"; +import { type InferSelectModel, and, eq, inArray } from "drizzle-orm"; import { z } from "zod"; import { db } from "~drizzle/db"; import { FilterKeywords, Filters } from "~drizzle/schema"; diff --git a/server/api/oauth/authorize/index.ts b/server/api/oauth/authorize/index.ts index d9707d89..d67b1813 100644 --- a/server/api/oauth/authorize/index.ts +++ b/server/api/oauth/authorize/index.ts @@ -1,12 +1,12 @@ import { randomBytes } from "node:crypto"; import { apiRoute, applyConfig, idValidator } from "@api"; +import { response } from "@response"; +import { SignJWT, jwtVerify } from "jose"; import { z } from "zod"; import { TokenType } from "~database/entities/Token"; import { findFirstUser } from "~database/entities/User"; import { db } from "~drizzle/db"; import { Tokens } from "~drizzle/schema"; -import { response } from "@response"; -import { jwtVerify, SignJWT } from "jose"; import { config } from "~packages/config-manager"; export const meta = applyConfig({ diff --git a/server/api/well-known/jwks/index.ts b/server/api/well-known/jwks/index.ts index a5299e3f..2c53545a 100644 --- a/server/api/well-known/jwks/index.ts +++ b/server/api/well-known/jwks/index.ts @@ -1,7 +1,7 @@ import { apiRoute, applyConfig } from "@api"; import { jsonResponse } from "@response"; +import { createRemoteJWKSet, exportJWK } from "jose"; import { config } from "~packages/config-manager"; -import { exportJWK, createRemoteJWKSet } from "jose"; export const meta = applyConfig({ allowedMethods: ["GET"],