diff --git a/biome.json b/biome.json index 77ecea9f..e7011d24 100644 --- a/biome.json +++ b/biome.json @@ -2,19 +2,34 @@ "$schema": "https://biomejs.dev/schemas/1.6.4/schema.json", "organizeImports": { "enabled": true, - "ignore": ["node_modules/**/*", "dist/**/*"] + "ignore": [ + "node_modules/**/*", + "dist/**/*", + "packages/frontend/.output", + "packages/frontend/.nuxt" + ] }, "linter": { "enabled": true, "rules": { "recommended": true }, - "ignore": ["node_modules/**/*", "dist/**/*"] + "ignore": [ + "node_modules/**/*", + "dist/**/*", + "packages/frontend/.output", + "packages/frontend/.nuxt" + ] }, "formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 4, - "ignore": ["node_modules/**/*", "dist/**/*"] + "ignore": [ + "node_modules/**/*", + "dist/**/*", + "packages/frontend/.output", + "packages/frontend/.nuxt" + ] } } diff --git a/cli.ts b/cli.ts index 4005b170..9610b6d6 100644 --- a/cli.ts +++ b/cli.ts @@ -9,12 +9,12 @@ import { CliBuilder, CliCommand } from "cli-parser"; import Table from "cli-table"; import extract from "extract-zip"; import { MediaBackend } from "media-manager"; +import { lookup } from "mime-types"; import { client } from "~database/datasource"; import { getUrl } from "~database/entities/Attachment"; import { createNewLocalUser } from "~database/entities/User"; import { CliParameterType } from "~packages/cli-parser/cli-builder.type"; import { config } from "~packages/config-manager"; -import { lookup } from "mime-types"; const args = process.argv; diff --git a/database/entities/Attachment.ts b/database/entities/Attachment.ts index 2fe6daed..22349a82 100644 --- a/database/entities/Attachment.ts +++ b/database/entities/Attachment.ts @@ -1,11 +1,11 @@ import type { Config } from "config-manager"; -import { MediaBackendType } from "media-manager"; -import type { APIAsyncAttachment } from "~types/entities/async_attachment"; -import type { APIAttachment } from "~types/entities/attachment"; +import type { InferSelectModel } from "drizzle-orm"; import type * as Lysand from "lysand-types"; +import { MediaBackendType } from "media-manager"; import { db } from "~drizzle/db"; import { attachment } from "~drizzle/schema"; -import type { InferSelectModel } from "drizzle-orm"; +import type { APIAsyncAttachment } from "~types/entities/async_attachment"; +import type { APIAttachment } from "~types/entities/attachment"; export type Attachment = InferSelectModel; diff --git a/database/entities/Emoji.ts b/database/entities/Emoji.ts index 10c5bf19..cd8490cd 100644 --- a/database/entities/Emoji.ts +++ b/database/entities/Emoji.ts @@ -1,9 +1,9 @@ -import type { APIEmoji } from "~types/entities/emoji"; +import { type InferSelectModel, and, eq } from "drizzle-orm"; import type * as Lysand from "lysand-types"; -import { addInstanceIfNotExists } from "./Instance"; import { db } from "~drizzle/db"; import { emoji, instance } from "~drizzle/schema"; -import { and, eq, type InferSelectModel } from "drizzle-orm"; +import type { APIEmoji } from "~types/entities/emoji"; +import { addInstanceIfNotExists } from "./Instance"; export type EmojiWithInstance = InferSelectModel & { instance: InferSelectModel | null; diff --git a/database/entities/Federation.ts b/database/entities/Federation.ts index 981383b7..f2227e28 100644 --- a/database/entities/Federation.ts +++ b/database/entities/Federation.ts @@ -1,6 +1,6 @@ -import type * as Lysand from "lysand-types"; import { config } from "config-manager"; -import { getUserUri, type User } from "./User"; +import type * as Lysand from "lysand-types"; +import { type User, getUserUri } from "./User"; export const objectToInboxRequest = async ( object: Lysand.Entity, diff --git a/database/entities/Instance.ts b/database/entities/Instance.ts index 0e700972..646ad085 100644 --- a/database/entities/Instance.ts +++ b/database/entities/Instance.ts @@ -1,5 +1,5 @@ -import { db } from "~drizzle/db"; import type * as Lysand from "lysand-types"; +import { db } from "~drizzle/db"; import { instance } from "~drizzle/schema"; /** diff --git a/database/entities/Like.ts b/database/entities/Like.ts index 87f20a9b..e44c38e3 100644 --- a/database/entities/Like.ts +++ b/database/entities/Like.ts @@ -1,10 +1,10 @@ import { config } from "config-manager"; +import { type InferSelectModel, and, eq } from "drizzle-orm"; +import type * as Lysand from "lysand-types"; +import { db } from "~drizzle/db"; +import { like, notification } from "~drizzle/schema"; import type { StatusWithRelations } from "./Status"; import type { UserWithRelations } from "./User"; -import type * as Lysand from "lysand-types"; -import { and, eq, type InferSelectModel } from "drizzle-orm"; -import { notification, like } from "~drizzle/schema"; -import { db } from "~drizzle/db"; export type Like = InferSelectModel; diff --git a/database/entities/Notification.ts b/database/entities/Notification.ts index d037dd5b..e502c775 100644 --- a/database/entities/Notification.ts +++ b/database/entities/Notification.ts @@ -1,19 +1,19 @@ +import type { InferSelectModel } from "drizzle-orm"; +import { db } from "~drizzle/db"; +import type { notification } from "~drizzle/schema"; import type { APINotification } from "~types/entities/notification"; import { type StatusWithRelations, - statusToAPI, findFirstStatuses, + statusToAPI, } from "./Status"; import { type UserWithRelations, - userToAPI, - userRelations, - userExtrasTemplate, transformOutputToUserWithRelations, + userExtrasTemplate, + userRelations, + userToAPI, } from "./User"; -import type { InferSelectModel } from "drizzle-orm"; -import type { notification } from "~drizzle/schema"; -import { db } from "~drizzle/db"; export type Notification = InferSelectModel; diff --git a/database/entities/Object.ts b/database/entities/Object.ts index fb436e50..a9a069b2 100644 --- a/database/entities/Object.ts +++ b/database/entities/Object.ts @@ -1,8 +1,8 @@ import type { InferSelectModel } from "drizzle-orm"; +import type * as Lysand from "lysand-types"; import { db } from "~drizzle/db"; import { lysandObject } from "~drizzle/schema"; import { findFirstUser } from "./User"; -import type * as Lysand from "lysand-types"; export type LysandObject = InferSelectModel; diff --git a/database/entities/Relationship.ts b/database/entities/Relationship.ts index 6c0e580f..31dadb6f 100644 --- a/database/entities/Relationship.ts +++ b/database/entities/Relationship.ts @@ -1,9 +1,8 @@ -import { client } from "~database/datasource"; +import type { InferSelectModel } from "drizzle-orm"; +import { db } from "~drizzle/db"; +import { relationship } from "~drizzle/schema"; import type { APIRelationship } from "~types/entities/relationship"; import type { User } from "./User"; -import type { InferSelectModel } from "drizzle-orm"; -import { relationship } from "~drizzle/schema"; -import { db } from "~drizzle/db"; export type Relationship = InferSelectModel; diff --git a/database/entities/Status.ts b/database/entities/Status.ts index 9ac28927..58329680 100644 --- a/database/entities/Status.ts +++ b/database/entities/Status.ts @@ -1,13 +1,34 @@ import { sanitizeHtml } from "@sanitization"; import { config } from "config-manager"; +import { + type InferSelectModel, + and, + eq, + inArray, + isNotNull, + isNull, + or, + sql, +} from "drizzle-orm"; import { htmlToText } from "html-to-text"; import linkifyHtml from "linkify-html"; import linkifyStr from "linkify-string"; +import type * as Lysand from "lysand-types"; import { parse } from "marked"; +import { db } from "~drizzle/db"; +import { + type application, + attachment, + emojiToStatus, + instance, + type like, + status, + statusToUser, + user, +} from "~drizzle/schema"; import type { APIAttachment } from "~types/entities/attachment"; import type { APIStatus } from "~types/entities/status"; import type { Note } from "~types/lysand/Object"; -import type * as Lysand from "lysand-types"; import { applicationToAPI } from "./Application"; import { attachmentFromLysand, @@ -15,48 +36,27 @@ import { attachmentToLysand, } from "./Attachment"; import { + type EmojiWithInstance, emojiToAPI, emojiToLysand, fetchEmoji, parseEmojis, - type EmojiWithInstance, } from "./Emoji"; +import { objectToInboxRequest } from "./Federation"; import { - getUserUri, - resolveUser, - resolveWebFinger, - userToAPI, - userExtras, - userRelations, - userExtrasTemplate, type User, type UserWithRelations, type UserWithRelationsAndRelationships, - transformOutputToUserWithRelations, findManyUsers, + getUserUri, + resolveUser, + resolveWebFinger, + transformOutputToUserWithRelations, + userExtras, + userExtrasTemplate, + userRelations, + userToAPI, } from "./User"; -import { objectToInboxRequest } from "./Federation"; -import { - and, - eq, - or, - type InferSelectModel, - sql, - isNotNull, - inArray, - isNull, -} from "drizzle-orm"; -import { - status, - type application, - attachment, - type like, - user, - statusToUser, - emojiToStatus, - instance, -} from "~drizzle/schema"; -import { db } from "~drizzle/db"; export type Status = InferSelectModel; diff --git a/database/entities/User.ts b/database/entities/User.ts index c9b9ed17..065e8471 100644 --- a/database/entities/User.ts +++ b/database/entities/User.ts @@ -1,20 +1,10 @@ +import { getBestContentType, urlToContentFormat } from "@content_types"; import { addUserToMeilisearch } from "@meilisearch"; import { type Config, config } from "config-manager"; +import { type InferSelectModel, and, eq, sql } from "drizzle-orm"; import { htmlToText } from "html-to-text"; -import type { APIAccount } from "~types/entities/account"; -import type { APISource } from "~types/entities/source"; import type * as Lysand from "lysand-types"; -import { - fetchEmoji, - emojiToAPI, - emojiToLysand, - type EmojiWithInstance, -} from "./Emoji"; -import { addInstanceIfNotExists } from "./Instance"; -import { createNewRelationship } from "./Relationship"; -import { getBestContentType, urlToContentFormat } from "@content_types"; -import { objectToInboxRequest } from "./Federation"; -import { and, eq, sql, type InferSelectModel } from "drizzle-orm"; +import { db } from "~drizzle/db"; import { emojiToUser, instance, @@ -22,7 +12,17 @@ import { relationship, user, } from "~drizzle/schema"; -import { db } from "~drizzle/db"; +import type { APIAccount } from "~types/entities/account"; +import type { APISource } from "~types/entities/source"; +import { + type EmojiWithInstance, + emojiToAPI, + emojiToLysand, + fetchEmoji, +} from "./Emoji"; +import { objectToInboxRequest } from "./Federation"; +import { addInstanceIfNotExists } from "./Instance"; +import { createNewRelationship } from "./Relationship"; export type User = InferSelectModel & { endpoints?: Partial<{ diff --git a/drizzle-scanned/0000_third_misty_knight.sql b/drizzle-scanned/0000_third_misty_knight.sql deleted file mode 100644 index 98c2e90e..00000000 --- a/drizzle-scanned/0000_third_misty_knight.sql +++ /dev/null @@ -1,462 +0,0 @@ --- Current sql file was generated after introspecting the database --- If you want to run this migration please uncomment this code before executing migrations -/* -CREATE TABLE IF NOT EXISTS "_prisma_migrations" ( - "id" varchar(36) PRIMARY KEY NOT NULL, - "checksum" varchar(64) NOT NULL, - "finished_at" timestamp with time zone, - "migration_name" varchar(255) NOT NULL, - "logs" text, - "rolled_back_at" timestamp with time zone, - "started_at" timestamp with time zone DEFAULT now() NOT NULL, - "applied_steps_count" integer DEFAULT 0 NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Emoji" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "shortcode" text NOT NULL, - "url" text NOT NULL, - "visible_in_picker" boolean NOT NULL, - "instanceId" uuid, - "alt" text, - "content_type" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Like" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "likerId" uuid NOT NULL, - "likedId" uuid NOT NULL, - "createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "LysandObject" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "remote_id" text NOT NULL, - "type" text NOT NULL, - "uri" text NOT NULL, - "created_at" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL, - "authorId" uuid, - "extra_data" jsonb NOT NULL, - "extensions" jsonb NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Relationship" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "ownerId" uuid NOT NULL, - "subjectId" uuid NOT NULL, - "following" boolean NOT NULL, - "showingReblogs" boolean NOT NULL, - "notifying" boolean NOT NULL, - "followedBy" boolean NOT NULL, - "blocking" boolean NOT NULL, - "blockedBy" boolean NOT NULL, - "muting" boolean NOT NULL, - "mutingNotifications" boolean NOT NULL, - "requested" boolean NOT NULL, - "domainBlocking" boolean NOT NULL, - "endorsed" boolean NOT NULL, - "languages" text[], - "note" text NOT NULL, - "createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL, - "updatedAt" timestamp(3) NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Application" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "name" text NOT NULL, - "website" text, - "vapid_key" text, - "client_id" text NOT NULL, - "secret" text NOT NULL, - "scopes" text NOT NULL, - "redirect_uris" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Token" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "token_type" text NOT NULL, - "scope" text NOT NULL, - "access_token" text NOT NULL, - "code" text NOT NULL, - "created_at" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL, - "userId" uuid, - "applicationId" uuid -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "_EmojiToUser" ( - "A" uuid NOT NULL, - "B" uuid NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "_EmojiToStatus" ( - "A" uuid NOT NULL, - "B" uuid NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "_StatusToUser" ( - "A" uuid NOT NULL, - "B" uuid NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "_UserPinnedNotes" ( - "A" uuid NOT NULL, - "B" uuid NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Attachment" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "url" text NOT NULL, - "remote_url" text, - "thumbnail_url" text, - "mime_type" text NOT NULL, - "description" text, - "blurhash" text, - "sha256" text, - "fps" integer, - "duration" integer, - "width" integer, - "height" integer, - "size" integer, - "statusId" uuid -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Notification" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "type" text NOT NULL, - "createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL, - "notifiedId" uuid NOT NULL, - "accountId" uuid NOT NULL, - "statusId" uuid -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Status" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "uri" text, - "authorId" uuid NOT NULL, - "createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL, - "updatedAt" timestamp(3) NOT NULL, - "reblogId" uuid, - "content" text DEFAULT '' NOT NULL, - "contentType" text DEFAULT 'text/plain' NOT NULL, - "visibility" text NOT NULL, - "inReplyToPostId" uuid, - "quotingPostId" uuid, - "instanceId" uuid, - "sensitive" boolean NOT NULL, - "spoilerText" text DEFAULT '' NOT NULL, - "applicationId" uuid, - "contentSource" text DEFAULT '' NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Instance" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "base_url" text NOT NULL, - "name" text NOT NULL, - "version" text NOT NULL, - "logo" jsonb NOT NULL, - "disableAutomoderation" boolean DEFAULT false NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "OpenIdAccount" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "userId" uuid, - "serverId" text NOT NULL, - "issuerId" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "User" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "uri" text, - "username" text NOT NULL, - "displayName" text NOT NULL, - "password" text, - "email" text, - "note" text DEFAULT '' NOT NULL, - "isAdmin" boolean DEFAULT false NOT NULL, - "endpoints" jsonb, - "source" jsonb NOT NULL, - "avatar" text NOT NULL, - "header" text NOT NULL, - "createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL, - "updatedAt" timestamp(3) NOT NULL, - "isBot" boolean DEFAULT false NOT NULL, - "isLocked" boolean DEFAULT false NOT NULL, - "isDiscoverable" boolean DEFAULT false NOT NULL, - "sanctions" text[] DEFAULT 'RRAY[', - "publicKey" text NOT NULL, - "privateKey" text, - "instanceId" uuid, - "disableAutomoderation" boolean DEFAULT false NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "OpenIdLoginFlow" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "codeVerifier" text NOT NULL, - "applicationId" uuid, - "issuerId" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "Flag" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "flagType" text DEFAULT 'other' NOT NULL, - "createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL, - "flaggeStatusId" uuid, - "flaggedUserId" uuid -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "ModNote" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "notedStatusId" uuid, - "notedUserId" uuid, - "modId" uuid NOT NULL, - "note" text NOT NULL, - "createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "ModTag" ( - "id" uuid PRIMARY KEY DEFAULT uuid_generate_v7() NOT NULL, - "taggedStatusId" uuid, - "taggedUserId" uuid, - "modId" uuid NOT NULL, - "tag" text NOT NULL, - "createdAt" timestamp(3) DEFAULT CURRENT_TIMESTAMP NOT NULL -); ---> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "LysandObject_remote_id_key" ON "LysandObject" ("remote_id");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "LysandObject_uri_key" ON "LysandObject" ("uri");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "Application_client_id_key" ON "Application" ("client_id");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "_EmojiToUser_AB_unique" ON "_EmojiToUser" ("A","B");--> statement-breakpoint -CREATE INDEX IF NOT EXISTS "_EmojiToUser_B_index" ON "_EmojiToUser" ("B");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "_EmojiToStatus_AB_unique" ON "_EmojiToStatus" ("A","B");--> statement-breakpoint -CREATE INDEX IF NOT EXISTS "_EmojiToStatus_B_index" ON "_EmojiToStatus" ("B");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "_StatusToUser_AB_unique" ON "_StatusToUser" ("A","B");--> statement-breakpoint -CREATE INDEX IF NOT EXISTS "_StatusToUser_B_index" ON "_StatusToUser" ("B");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "_UserPinnedNotes_AB_unique" ON "_UserPinnedNotes" ("A","B");--> statement-breakpoint -CREATE INDEX IF NOT EXISTS "_UserPinnedNotes_B_index" ON "_UserPinnedNotes" ("B");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "Status_uri_key" ON "Status" ("uri");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "User_uri_key" ON "User" ("uri");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "User_username_key" ON "User" ("username");--> statement-breakpoint -CREATE UNIQUE INDEX IF NOT EXISTS "User_email_key" ON "User" ("email");--> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Emoji" ADD CONSTRAINT "Emoji_instanceId_fkey" FOREIGN KEY ("instanceId") REFERENCES "public"."Instance"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Like" ADD CONSTRAINT "Like_likerId_fkey" FOREIGN KEY ("likerId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Like" ADD CONSTRAINT "Like_likedId_fkey" FOREIGN KEY ("likedId") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "LysandObject" ADD CONSTRAINT "LysandObject_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "public"."LysandObject"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Relationship" ADD CONSTRAINT "Relationship_ownerId_fkey" FOREIGN KEY ("ownerId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Relationship" ADD CONSTRAINT "Relationship_subjectId_fkey" FOREIGN KEY ("subjectId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Token" ADD CONSTRAINT "Token_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Token" ADD CONSTRAINT "Token_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "public"."Application"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "_EmojiToUser" ADD CONSTRAINT "_EmojiToUser_A_fkey" FOREIGN KEY ("A") REFERENCES "public"."Emoji"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "_EmojiToUser" ADD CONSTRAINT "_EmojiToUser_B_fkey" FOREIGN KEY ("B") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "_EmojiToStatus" ADD CONSTRAINT "_EmojiToStatus_A_fkey" FOREIGN KEY ("A") REFERENCES "public"."Emoji"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "_EmojiToStatus" ADD CONSTRAINT "_EmojiToStatus_B_fkey" FOREIGN KEY ("B") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "_StatusToUser" ADD CONSTRAINT "_StatusToUser_A_fkey" FOREIGN KEY ("A") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "_StatusToUser" ADD CONSTRAINT "_StatusToUser_B_fkey" FOREIGN KEY ("B") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "_UserPinnedNotes" ADD CONSTRAINT "_UserPinnedNotes_A_fkey" FOREIGN KEY ("A") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "_UserPinnedNotes" ADD CONSTRAINT "_UserPinnedNotes_B_fkey" FOREIGN KEY ("B") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Attachment" ADD CONSTRAINT "Attachment_statusId_fkey" FOREIGN KEY ("statusId") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Notification" ADD CONSTRAINT "Notification_notifiedId_fkey" FOREIGN KEY ("notifiedId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Notification" ADD CONSTRAINT "Notification_accountId_fkey" FOREIGN KEY ("accountId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Notification" ADD CONSTRAINT "Notification_statusId_fkey" FOREIGN KEY ("statusId") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Status" ADD CONSTRAINT "Status_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Status" ADD CONSTRAINT "Status_reblogId_fkey" FOREIGN KEY ("reblogId") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Status" ADD CONSTRAINT "Status_inReplyToPostId_fkey" FOREIGN KEY ("inReplyToPostId") REFERENCES "public"."Status"("id") ON DELETE set null ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Status" ADD CONSTRAINT "Status_quotingPostId_fkey" FOREIGN KEY ("quotingPostId") REFERENCES "public"."Status"("id") ON DELETE set null ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Status" ADD CONSTRAINT "Status_instanceId_fkey" FOREIGN KEY ("instanceId") REFERENCES "public"."Instance"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Status" ADD CONSTRAINT "Status_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "public"."Application"("id") ON DELETE set null ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "OpenIdAccount" ADD CONSTRAINT "OpenIdAccount_userId_fkey" FOREIGN KEY ("userId") REFERENCES "public"."User"("id") ON DELETE set null ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "User" ADD CONSTRAINT "User_instanceId_fkey" FOREIGN KEY ("instanceId") REFERENCES "public"."Instance"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "OpenIdLoginFlow" ADD CONSTRAINT "OpenIdLoginFlow_applicationId_fkey" FOREIGN KEY ("applicationId") REFERENCES "public"."Application"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Flag" ADD CONSTRAINT "Flag_flaggeStatusId_fkey" FOREIGN KEY ("flaggeStatusId") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "Flag" ADD CONSTRAINT "Flag_flaggedUserId_fkey" FOREIGN KEY ("flaggedUserId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "ModNote" ADD CONSTRAINT "ModNote_notedStatusId_fkey" FOREIGN KEY ("notedStatusId") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "ModNote" ADD CONSTRAINT "ModNote_notedUserId_fkey" FOREIGN KEY ("notedUserId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "ModNote" ADD CONSTRAINT "ModNote_modId_fkey" FOREIGN KEY ("modId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "ModTag" ADD CONSTRAINT "ModTag_taggedStatusId_fkey" FOREIGN KEY ("taggedStatusId") REFERENCES "public"."Status"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "ModTag" ADD CONSTRAINT "ModTag_taggedUserId_fkey" FOREIGN KEY ("taggedUserId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "ModTag" ADD CONSTRAINT "ModTag_modId_fkey" FOREIGN KEY ("modId") REFERENCES "public"."User"("id") ON DELETE cascade ON UPDATE cascade; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; - -*/ \ No newline at end of file diff --git a/drizzle-scanned/meta/0000_snapshot.json b/drizzle-scanned/meta/0000_snapshot.json deleted file mode 100644 index a014f406..00000000 --- a/drizzle-scanned/meta/0000_snapshot.json +++ /dev/null @@ -1,1867 +0,0 @@ -{ - "id": "00000000-0000-0000-0000-000000000000", - "prevId": "", - "version": "5", - "dialect": "pg", - "tables": { - "_prisma_migrations": { - "name": "_prisma_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(36)", - "primaryKey": true, - "notNull": true - }, - "checksum": { - "name": "checksum", - "type": "varchar(64)", - "primaryKey": false, - "notNull": true - }, - "finished_at": { - "name": "finished_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "migration_name": { - "name": "migration_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "logs": { - "name": "logs", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "rolled_back_at": { - "name": "rolled_back_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false - }, - "started_at": { - "name": "started_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "applied_steps_count": { - "name": "applied_steps_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Emoji": { - "name": "Emoji", - "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 - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "Emoji_instanceId_fkey": { - "name": "Emoji_instanceId_fkey", - "tableFrom": "Emoji", - "tableTo": "Instance", - "schemaTo": "public", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Like": { - "name": "Like", - "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": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": { - "Like_likerId_fkey": { - "name": "Like_likerId_fkey", - "tableFrom": "Like", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Like_likedId_fkey": { - "name": "Like_likedId_fkey", - "tableFrom": "Like", - "tableTo": "Status", - "schemaTo": "public", - "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": "CURRENT_TIMESTAMP" - }, - "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_key": { - "name": "LysandObject_remote_id_key", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_key": { - "name": "LysandObject_uri_key", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_fkey": { - "name": "LysandObject_authorId_fkey", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "schemaTo": "public", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationship": { - "name": "Relationship", - "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 - }, - "showingReblogs": { - "name": "showingReblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followedBy": { - "name": "followedBy", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blockedBy": { - "name": "blockedBy", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "mutingNotifications": { - "name": "mutingNotifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domainBlocking": { - "name": "domainBlocking", - "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 - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "Relationship_ownerId_fkey": { - "name": "Relationship_ownerId_fkey", - "tableFrom": "Relationship", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationship_subjectId_fkey": { - "name": "Relationship_subjectId_fkey", - "tableFrom": "Relationship", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Application": { - "name": "Application", - "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": { - "Application_client_id_key": { - "name": "Application_client_id_key", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Token": { - "name": "Token", - "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": "CURRENT_TIMESTAMP" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Token_userId_fkey": { - "name": "Token_userId_fkey", - "tableFrom": "Token", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Token_applicationId_fkey": { - "name": "Token_applicationId_fkey", - "tableFrom": "Token", - "tableTo": "Application", - "schemaTo": "public", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "_EmojiToUser": { - "name": "_EmojiToUser", - "schema": "", - "columns": { - "A": { - "name": "A", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "B": { - "name": "B", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "_EmojiToUser_AB_unique": { - "name": "_EmojiToUser_AB_unique", - "columns": [ - "A", - "B" - ], - "isUnique": true - }, - "_EmojiToUser_B_index": { - "name": "_EmojiToUser_B_index", - "columns": [ - "B" - ], - "isUnique": false - } - }, - "foreignKeys": { - "_EmojiToUser_A_fkey": { - "name": "_EmojiToUser_A_fkey", - "tableFrom": "_EmojiToUser", - "tableTo": "Emoji", - "schemaTo": "public", - "columnsFrom": [ - "A" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "_EmojiToUser_B_fkey": { - "name": "_EmojiToUser_B_fkey", - "tableFrom": "_EmojiToUser", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "B" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "_EmojiToStatus": { - "name": "_EmojiToStatus", - "schema": "", - "columns": { - "A": { - "name": "A", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "B": { - "name": "B", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "_EmojiToStatus_AB_unique": { - "name": "_EmojiToStatus_AB_unique", - "columns": [ - "A", - "B" - ], - "isUnique": true - }, - "_EmojiToStatus_B_index": { - "name": "_EmojiToStatus_B_index", - "columns": [ - "B" - ], - "isUnique": false - } - }, - "foreignKeys": { - "_EmojiToStatus_A_fkey": { - "name": "_EmojiToStatus_A_fkey", - "tableFrom": "_EmojiToStatus", - "tableTo": "Emoji", - "schemaTo": "public", - "columnsFrom": [ - "A" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "_EmojiToStatus_B_fkey": { - "name": "_EmojiToStatus_B_fkey", - "tableFrom": "_EmojiToStatus", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "B" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "_StatusToUser": { - "name": "_StatusToUser", - "schema": "", - "columns": { - "A": { - "name": "A", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "B": { - "name": "B", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "_StatusToUser_AB_unique": { - "name": "_StatusToUser_AB_unique", - "columns": [ - "A", - "B" - ], - "isUnique": true - }, - "_StatusToUser_B_index": { - "name": "_StatusToUser_B_index", - "columns": [ - "B" - ], - "isUnique": false - } - }, - "foreignKeys": { - "_StatusToUser_A_fkey": { - "name": "_StatusToUser_A_fkey", - "tableFrom": "_StatusToUser", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "A" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "_StatusToUser_B_fkey": { - "name": "_StatusToUser_B_fkey", - "tableFrom": "_StatusToUser", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "B" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "_UserPinnedNotes": { - "name": "_UserPinnedNotes", - "schema": "", - "columns": { - "A": { - "name": "A", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "B": { - "name": "B", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "_UserPinnedNotes_AB_unique": { - "name": "_UserPinnedNotes_AB_unique", - "columns": [ - "A", - "B" - ], - "isUnique": true - }, - "_UserPinnedNotes_B_index": { - "name": "_UserPinnedNotes_B_index", - "columns": [ - "B" - ], - "isUnique": false - } - }, - "foreignKeys": { - "_UserPinnedNotes_A_fkey": { - "name": "_UserPinnedNotes_A_fkey", - "tableFrom": "_UserPinnedNotes", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "A" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "_UserPinnedNotes_B_fkey": { - "name": "_UserPinnedNotes_B_fkey", - "tableFrom": "_UserPinnedNotes", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "B" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Attachment": { - "name": "Attachment", - "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 - }, - "statusId": { - "name": "statusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachment_statusId_fkey": { - "name": "Attachment_statusId_fkey", - "tableFrom": "Attachment", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "statusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notification": { - "name": "Notification", - "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": "CURRENT_TIMESTAMP" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "statusId": { - "name": "statusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notification_notifiedId_fkey": { - "name": "Notification_notifiedId_fkey", - "tableFrom": "Notification", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notification_accountId_fkey": { - "name": "Notification_accountId_fkey", - "tableFrom": "Notification", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notification_statusId_fkey": { - "name": "Notification_statusId_fkey", - "tableFrom": "Notification", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "statusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Status": { - "name": "Status", - "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": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "contentType": { - "name": "contentType", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "inReplyToPostId": { - "name": "inReplyToPostId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quotingPostId": { - "name": "quotingPostId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoilerText": { - "name": "spoilerText", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "contentSource": { - "name": "contentSource", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Status_uri_key": { - "name": "Status_uri_key", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Status_authorId_fkey": { - "name": "Status_authorId_fkey", - "tableFrom": "Status", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Status_reblogId_fkey": { - "name": "Status_reblogId_fkey", - "tableFrom": "Status", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Status_inReplyToPostId_fkey": { - "name": "Status_inReplyToPostId_fkey", - "tableFrom": "Status", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "inReplyToPostId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Status_quotingPostId_fkey": { - "name": "Status_quotingPostId_fkey", - "tableFrom": "Status", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "quotingPostId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Status_instanceId_fkey": { - "name": "Status_instanceId_fkey", - "tableFrom": "Status", - "tableTo": "Instance", - "schemaTo": "public", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Status_applicationId_fkey": { - "name": "Status_applicationId_fkey", - "tableFrom": "Status", - "tableTo": "Application", - "schemaTo": "public", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instance": { - "name": "Instance", - "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 - }, - "disableAutomoderation": { - "name": "disableAutomoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccount": { - "name": "OpenIdAccount", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "serverId": { - "name": "serverId", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuerId": { - "name": "issuerId", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccount_userId_fkey": { - "name": "OpenIdAccount_userId_fkey", - "tableFrom": "OpenIdAccount", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "User": { - "name": "User", - "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 - }, - "displayName": { - "name": "displayName", - "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": "''" - }, - "isAdmin": { - "name": "isAdmin", - "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 - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true - }, - "isBot": { - "name": "isBot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "isLocked": { - "name": "isLocked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "isDiscoverable": { - "name": "isDiscoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false, - "default": "'RRAY['" - }, - "publicKey": { - "name": "publicKey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "privateKey": { - "name": "privateKey", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disableAutomoderation": { - "name": "disableAutomoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "User_uri_key": { - "name": "User_uri_key", - "columns": [ - "uri" - ], - "isUnique": true - }, - "User_username_key": { - "name": "User_username_key", - "columns": [ - "username" - ], - "isUnique": true - }, - "User_email_key": { - "name": "User_email_key", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "User_instanceId_fkey": { - "name": "User_instanceId_fkey", - "tableFrom": "User", - "tableTo": "Instance", - "schemaTo": "public", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlow": { - "name": "OpenIdLoginFlow", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "codeVerifier": { - "name": "codeVerifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuerId": { - "name": "issuerId", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlow_applicationId_fkey": { - "name": "OpenIdLoginFlow_applicationId_fkey", - "tableFrom": "OpenIdLoginFlow", - "tableTo": "Application", - "schemaTo": "public", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flag": { - "name": "Flag", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flagType": { - "name": "flagType", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - }, - "flaggeStatusId": { - "name": "flaggeStatusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "flaggedUserId": { - "name": "flaggedUserId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flag_flaggeStatusId_fkey": { - "name": "Flag_flaggeStatusId_fkey", - "tableFrom": "Flag", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "flaggeStatusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flag_flaggedUserId_fkey": { - "name": "Flag_flaggedUserId_fkey", - "tableFrom": "Flag", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "flaggedUserId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNote": { - "name": "ModNote", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "notedStatusId": { - "name": "notedStatusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "notedUserId": { - "name": "notedUserId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNote_notedStatusId_fkey": { - "name": "ModNote_notedStatusId_fkey", - "tableFrom": "ModNote", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "notedStatusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNote_notedUserId_fkey": { - "name": "ModNote_notedUserId_fkey", - "tableFrom": "ModNote", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "notedUserId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNote_modId_fkey": { - "name": "ModNote_modId_fkey", - "tableFrom": "ModNote", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTag": { - "name": "ModTag", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "taggedStatusId": { - "name": "taggedStatusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "taggedUserId": { - "name": "taggedUserId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTag_taggedStatusId_fkey": { - "name": "ModTag_taggedStatusId_fkey", - "tableFrom": "ModTag", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "taggedStatusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTag_taggedUserId_fkey": { - "name": "ModTag_taggedUserId_fkey", - "tableFrom": "ModTag", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "taggedUserId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTag_modId_fkey": { - "name": "ModTag_modId_fkey", - "tableFrom": "ModTag", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/drizzle-scanned/meta/_journal.json b/drizzle-scanned/meta/_journal.json deleted file mode 100644 index 3ff690dc..00000000 --- a/drizzle-scanned/meta/_journal.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": "5", - "dialect": "pg", - "entries": [ - { - "idx": 0, - "version": "5", - "when": 1712812153499, - "tag": "0000_third_misty_knight", - "breakpoints": true - } - ] -} \ No newline at end of file diff --git a/drizzle-scanned/schema.ts b/drizzle-scanned/schema.ts deleted file mode 100644 index 2d3395d1..00000000 --- a/drizzle-scanned/schema.ts +++ /dev/null @@ -1,292 +0,0 @@ -import { pgTable, varchar, timestamp, text, integer, foreignKey, uuid, boolean, uniqueIndex, jsonb, index } from "drizzle-orm/pg-core" - import { sql } from "drizzle-orm" - - - -export const prismaMigrations = pgTable("_prisma_migrations", { - id: varchar("id", { length: 36 }).primaryKey().notNull(), - checksum: varchar("checksum", { length: 64 }).notNull(), - finishedAt: timestamp("finished_at", { withTimezone: true, mode: 'string' }), - migrationName: varchar("migration_name", { length: 255 }).notNull(), - logs: text("logs"), - rolledBackAt: timestamp("rolled_back_at", { withTimezone: true, mode: 'string' }), - startedAt: timestamp("started_at", { withTimezone: true, mode: 'string' }).defaultNow().notNull(), - appliedStepsCount: integer("applied_steps_count").default(0).notNull(), -}); - -export const emoji = pgTable("Emoji", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - shortcode: text("shortcode").notNull(), - url: text("url").notNull(), - visibleInPicker: boolean("visible_in_picker").notNull(), - instanceId: uuid("instanceId").references(() => instance.id, { onDelete: "cascade", onUpdate: "cascade" } ), - alt: text("alt"), - contentType: text("content_type").notNull(), -}); - -export const like = pgTable("Like", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - likerId: uuid("likerId").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - likedId: uuid("likedId").notNull().references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), - createdAt: timestamp("createdAt", { precision: 3, mode: 'string' }).defaultNow().notNull(), -}); - -export const lysandObject = pgTable("LysandObject", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - remoteId: text("remote_id").notNull(), - type: text("type").notNull(), - uri: text("uri").notNull(), - createdAt: timestamp("created_at", { precision: 3, mode: 'string' }).defaultNow().notNull(), - authorId: uuid("authorId"), - extraData: jsonb("extra_data").notNull(), - extensions: jsonb("extensions").notNull(), -}, -(table) => { - return { - remoteIdKey: uniqueIndex("LysandObject_remote_id_key").on(table.remoteId), - uriKey: uniqueIndex("LysandObject_uri_key").on(table.uri), - lysandObjectAuthorIdFkey: foreignKey({ - columns: [table.authorId], - foreignColumns: [table.id], - name: "LysandObject_authorId_fkey" - }).onUpdate("cascade").onDelete("cascade"), - } -}); - -export const relationship = pgTable("Relationship", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - ownerId: uuid("ownerId").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - subjectId: uuid("subjectId").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - following: boolean("following").notNull(), - showingReblogs: boolean("showingReblogs").notNull(), - notifying: boolean("notifying").notNull(), - followedBy: boolean("followedBy").notNull(), - blocking: boolean("blocking").notNull(), - blockedBy: boolean("blockedBy").notNull(), - muting: boolean("muting").notNull(), - mutingNotifications: boolean("mutingNotifications").notNull(), - requested: boolean("requested").notNull(), - domainBlocking: boolean("domainBlocking").notNull(), - endorsed: boolean("endorsed").notNull(), - languages: text("languages").array(), - note: text("note").notNull(), - createdAt: timestamp("createdAt", { precision: 3, mode: 'string' }).defaultNow().notNull(), - updatedAt: timestamp("updatedAt", { precision: 3, mode: 'string' }).notNull(), -}); - -export const application = pgTable("Application", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - name: text("name").notNull(), - website: text("website"), - vapidKey: text("vapid_key"), - clientId: text("client_id").notNull(), - secret: text("secret").notNull(), - scopes: text("scopes").notNull(), - redirectUris: text("redirect_uris").notNull(), -}, -(table) => { - return { - clientIdKey: uniqueIndex("Application_client_id_key").on(table.clientId), - } -}); - -export const token = pgTable("Token", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - tokenType: text("token_type").notNull(), - scope: text("scope").notNull(), - accessToken: text("access_token").notNull(), - code: text("code").notNull(), - createdAt: timestamp("created_at", { precision: 3, mode: 'string' }).defaultNow().notNull(), - userId: uuid("userId").references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - applicationId: uuid("applicationId").references(() => application.id, { onDelete: "cascade", onUpdate: "cascade" } ), -}); - -export const emojiToUser = pgTable("_EmojiToUser", { - a: uuid("A").notNull().references(() => emoji.id, { onDelete: "cascade", onUpdate: "cascade" } ), - b: uuid("B").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), -}, -(table) => { - return { - abUnique: uniqueIndex("_EmojiToUser_AB_unique").on(table.a, table.b), - bIdx: index().on(table.b), - } -}); - -export const emojiToStatus = pgTable("_EmojiToStatus", { - a: uuid("A").notNull().references(() => emoji.id, { onDelete: "cascade", onUpdate: "cascade" } ), - b: uuid("B").notNull().references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), -}, -(table) => { - return { - abUnique: uniqueIndex("_EmojiToStatus_AB_unique").on(table.a, table.b), - bIdx: index().on(table.b), - } -}); - -export const statusToUser = pgTable("_StatusToUser", { - a: uuid("A").notNull().references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), - b: uuid("B").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), -}, -(table) => { - return { - abUnique: uniqueIndex("_StatusToUser_AB_unique").on(table.a, table.b), - bIdx: index().on(table.b), - } -}); - -export const userPinnedNotes = pgTable("_UserPinnedNotes", { - a: uuid("A").notNull().references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), - b: uuid("B").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), -}, -(table) => { - return { - abUnique: uniqueIndex("_UserPinnedNotes_AB_unique").on(table.a, table.b), - bIdx: index().on(table.b), - } -}); - -export const attachment = pgTable("Attachment", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - url: text("url").notNull(), - remoteUrl: text("remote_url"), - thumbnailUrl: text("thumbnail_url"), - mimeType: text("mime_type").notNull(), - description: text("description"), - blurhash: text("blurhash"), - sha256: text("sha256"), - fps: integer("fps"), - duration: integer("duration"), - width: integer("width"), - height: integer("height"), - size: integer("size"), - statusId: uuid("statusId").references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), -}); - -export const notification = pgTable("Notification", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - type: text("type").notNull(), - createdAt: timestamp("createdAt", { precision: 3, mode: 'string' }).defaultNow().notNull(), - notifiedId: uuid("notifiedId").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - accountId: uuid("accountId").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - statusId: uuid("statusId").references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), -}); - -export const status = pgTable("Status", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - uri: text("uri"), - authorId: uuid("authorId").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - createdAt: timestamp("createdAt", { precision: 3, mode: 'string' }).defaultNow().notNull(), - updatedAt: timestamp("updatedAt", { precision: 3, mode: 'string' }).notNull(), - reblogId: uuid("reblogId"), - content: text("content").default('').notNull(), - contentType: text("contentType").default('text/plain').notNull(), - visibility: text("visibility").notNull(), - inReplyToPostId: uuid("inReplyToPostId"), - quotingPostId: uuid("quotingPostId"), - instanceId: uuid("instanceId").references(() => instance.id, { onDelete: "cascade", onUpdate: "cascade" } ), - sensitive: boolean("sensitive").notNull(), - spoilerText: text("spoilerText").default('').notNull(), - applicationId: uuid("applicationId").references(() => application.id, { onDelete: "set null", onUpdate: "cascade" } ), - contentSource: text("contentSource").default('').notNull(), -}, -(table) => { - return { - uriKey: uniqueIndex("Status_uri_key").on(table.uri), - statusReblogIdFkey: foreignKey({ - columns: [table.reblogId], - foreignColumns: [table.id], - name: "Status_reblogId_fkey" - }).onUpdate("cascade").onDelete("cascade"), - statusInReplyToPostIdFkey: foreignKey({ - columns: [table.inReplyToPostId], - foreignColumns: [table.id], - name: "Status_inReplyToPostId_fkey" - }).onUpdate("cascade").onDelete("set null"), - statusQuotingPostIdFkey: foreignKey({ - columns: [table.quotingPostId], - foreignColumns: [table.id], - name: "Status_quotingPostId_fkey" - }).onUpdate("cascade").onDelete("set null"), - } -}); - -export const instance = pgTable("Instance", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - baseUrl: text("base_url").notNull(), - name: text("name").notNull(), - version: text("version").notNull(), - logo: jsonb("logo").notNull(), - disableAutomoderation: boolean("disableAutomoderation").default(false).notNull(), -}); - -export const openIdAccount = pgTable("OpenIdAccount", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - userId: uuid("userId").references(() => user.id, { onDelete: "set null", onUpdate: "cascade" } ), - serverId: text("serverId").notNull(), - issuerId: text("issuerId").notNull(), -}); - -export const user = pgTable("User", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - uri: text("uri"), - username: text("username").notNull(), - displayName: text("displayName").notNull(), - password: text("password"), - email: text("email"), - note: text("note").default('').notNull(), - isAdmin: boolean("isAdmin").default(false).notNull(), - endpoints: jsonb("endpoints"), - source: jsonb("source").notNull(), - avatar: text("avatar").notNull(), - header: text("header").notNull(), - createdAt: timestamp("createdAt", { precision: 3, mode: 'string' }).defaultNow().notNull(), - updatedAt: timestamp("updatedAt", { precision: 3, mode: 'string' }).notNull(), - isBot: boolean("isBot").default(false).notNull(), - isLocked: boolean("isLocked").default(false).notNull(), - isDiscoverable: boolean("isDiscoverable").default(false).notNull(), - sanctions: text("sanctions").default('RRAY[').array(), - publicKey: text("publicKey").notNull(), - privateKey: text("privateKey"), - instanceId: uuid("instanceId").references(() => instance.id, { onDelete: "cascade", onUpdate: "cascade" } ), - disableAutomoderation: boolean("disableAutomoderation").default(false).notNull(), -}, -(table) => { - return { - uriKey: uniqueIndex("User_uri_key").on(table.uri), - usernameKey: uniqueIndex("User_username_key").on(table.username), - emailKey: uniqueIndex("User_email_key").on(table.email), - } -}); - -export const openIdLoginFlow = pgTable("OpenIdLoginFlow", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - codeVerifier: text("codeVerifier").notNull(), - applicationId: uuid("applicationId").references(() => application.id, { onDelete: "cascade", onUpdate: "cascade" } ), - issuerId: text("issuerId").notNull(), -}); - -export const flag = pgTable("Flag", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - flagType: text("flagType").default('other').notNull(), - createdAt: timestamp("createdAt", { precision: 3, mode: 'string' }).defaultNow().notNull(), - flaggeStatusId: uuid("flaggeStatusId").references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), - flaggedUserId: uuid("flaggedUserId").references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), -}); - -export const modNote = pgTable("ModNote", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - notedStatusId: uuid("notedStatusId").references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), - notedUserId: uuid("notedUserId").references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - modId: uuid("modId").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - note: text("note").notNull(), - createdAt: timestamp("createdAt", { precision: 3, mode: 'string' }).defaultNow().notNull(), -}); - -export const modTag = pgTable("ModTag", { - id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), - taggedStatusId: uuid("taggedStatusId").references(() => status.id, { onDelete: "cascade", onUpdate: "cascade" } ), - taggedUserId: uuid("taggedUserId").references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - modId: uuid("modId").notNull().references(() => user.id, { onDelete: "cascade", onUpdate: "cascade" } ), - tag: text("tag").notNull(), - createdAt: timestamp("createdAt", { precision: 3, mode: 'string' }).defaultNow().notNull(), -}); \ No newline at end of file diff --git a/drizzle.config.ts b/drizzle.config.ts index 7550d926..2deb46bb 100644 --- a/drizzle.config.ts +++ b/drizzle.config.ts @@ -1,5 +1,5 @@ -import type { Config } from "drizzle-kit"; import { config } from "config-manager"; +import type { Config } from "drizzle-kit"; export default { driver: "pg", diff --git a/drizzle/db.ts b/drizzle/db.ts index 29ca4545..f92fa5d1 100644 --- a/drizzle/db.ts +++ b/drizzle/db.ts @@ -1,6 +1,6 @@ -import { Client } from "pg"; import { config } from "config-manager"; import { drizzle } from "drizzle-orm/node-postgres"; +import { Client } from "pg"; import * as schema from "./schema"; export const client = new Client({ diff --git a/drizzle/meta/0000_snapshot.json b/drizzle/meta/0000_snapshot.json index a014f406..ebb3a289 100644 --- a/drizzle/meta/0000_snapshot.json +++ b/drizzle/meta/0000_snapshot.json @@ -1,1867 +1,1685 @@ { - "id": "00000000-0000-0000-0000-000000000000", - "prevId": "", - "version": "5", - "dialect": "pg", - "tables": { - "_prisma_migrations": { - "name": "_prisma_migrations", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "varchar(36)", - "primaryKey": true, - "notNull": true + "id": "00000000-0000-0000-0000-000000000000", + "prevId": "", + "version": "5", + "dialect": "pg", + "tables": { + "_prisma_migrations": { + "name": "_prisma_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(36)", + "primaryKey": true, + "notNull": true + }, + "checksum": { + "name": "checksum", + "type": "varchar(64)", + "primaryKey": false, + "notNull": true + }, + "finished_at": { + "name": "finished_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "migration_name": { + "name": "migration_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "logs": { + "name": "logs", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rolled_back_at": { + "name": "rolled_back_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "applied_steps_count": { + "name": "applied_steps_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "checksum": { - "name": "checksum", - "type": "varchar(64)", - "primaryKey": false, - "notNull": true + "Emoji": { + "name": "Emoji", + "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 + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "alt": { + "name": "alt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "Emoji_instanceId_fkey": { + "name": "Emoji_instanceId_fkey", + "tableFrom": "Emoji", + "tableTo": "Instance", + "schemaTo": "public", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "finished_at": { - "name": "finished_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false + "Like": { + "name": "Like", + "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": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "Like_likerId_fkey": { + "name": "Like_likerId_fkey", + "tableFrom": "Like", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["likerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Like_likedId_fkey": { + "name": "Like_likedId_fkey", + "tableFrom": "Like", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["likedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "migration_name": { - "name": "migration_name", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true + "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": "CURRENT_TIMESTAMP" + }, + "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_key": { + "name": "LysandObject_remote_id_key", + "columns": ["remote_id"], + "isUnique": true + }, + "LysandObject_uri_key": { + "name": "LysandObject_uri_key", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "LysandObject_authorId_fkey": { + "name": "LysandObject_authorId_fkey", + "tableFrom": "LysandObject", + "tableTo": "LysandObject", + "schemaTo": "public", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "logs": { - "name": "logs", - "type": "text", - "primaryKey": false, - "notNull": false + "Relationship": { + "name": "Relationship", + "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 + }, + "showingReblogs": { + "name": "showingReblogs", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "notifying": { + "name": "notifying", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "followedBy": { + "name": "followedBy", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blocking": { + "name": "blocking", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "blockedBy": { + "name": "blockedBy", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "muting": { + "name": "muting", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "mutingNotifications": { + "name": "mutingNotifications", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "requested": { + "name": "requested", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "domainBlocking": { + "name": "domainBlocking", + "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 + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "Relationship_ownerId_fkey": { + "name": "Relationship_ownerId_fkey", + "tableFrom": "Relationship", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["ownerId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Relationship_subjectId_fkey": { + "name": "Relationship_subjectId_fkey", + "tableFrom": "Relationship", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["subjectId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "rolled_back_at": { - "name": "rolled_back_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": false + "Application": { + "name": "Application", + "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": { + "Application_client_id_key": { + "name": "Application_client_id_key", + "columns": ["client_id"], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "started_at": { - "name": "started_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true, - "default": "now()" + "Token": { + "name": "Token", + "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": "CURRENT_TIMESTAMP" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Token_userId_fkey": { + "name": "Token_userId_fkey", + "tableFrom": "Token", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Token_applicationId_fkey": { + "name": "Token_applicationId_fkey", + "tableFrom": "Token", + "tableTo": "Application", + "schemaTo": "public", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} }, - "applied_steps_count": { - "name": "applied_steps_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 + "_EmojiToUser": { + "name": "_EmojiToUser", + "schema": "", + "columns": { + "A": { + "name": "A", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "B": { + "name": "B", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_EmojiToUser_AB_unique": { + "name": "_EmojiToUser_AB_unique", + "columns": ["A", "B"], + "isUnique": true + }, + "_EmojiToUser_B_index": { + "name": "_EmojiToUser_B_index", + "columns": ["B"], + "isUnique": false + } + }, + "foreignKeys": { + "_EmojiToUser_A_fkey": { + "name": "_EmojiToUser_A_fkey", + "tableFrom": "_EmojiToUser", + "tableTo": "Emoji", + "schemaTo": "public", + "columnsFrom": ["A"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "_EmojiToUser_B_fkey": { + "name": "_EmojiToUser_B_fkey", + "tableFrom": "_EmojiToUser", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["B"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "_EmojiToStatus": { + "name": "_EmojiToStatus", + "schema": "", + "columns": { + "A": { + "name": "A", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "B": { + "name": "B", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_EmojiToStatus_AB_unique": { + "name": "_EmojiToStatus_AB_unique", + "columns": ["A", "B"], + "isUnique": true + }, + "_EmojiToStatus_B_index": { + "name": "_EmojiToStatus_B_index", + "columns": ["B"], + "isUnique": false + } + }, + "foreignKeys": { + "_EmojiToStatus_A_fkey": { + "name": "_EmojiToStatus_A_fkey", + "tableFrom": "_EmojiToStatus", + "tableTo": "Emoji", + "schemaTo": "public", + "columnsFrom": ["A"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "_EmojiToStatus_B_fkey": { + "name": "_EmojiToStatus_B_fkey", + "tableFrom": "_EmojiToStatus", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["B"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "_StatusToUser": { + "name": "_StatusToUser", + "schema": "", + "columns": { + "A": { + "name": "A", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "B": { + "name": "B", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_StatusToUser_AB_unique": { + "name": "_StatusToUser_AB_unique", + "columns": ["A", "B"], + "isUnique": true + }, + "_StatusToUser_B_index": { + "name": "_StatusToUser_B_index", + "columns": ["B"], + "isUnique": false + } + }, + "foreignKeys": { + "_StatusToUser_A_fkey": { + "name": "_StatusToUser_A_fkey", + "tableFrom": "_StatusToUser", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["A"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "_StatusToUser_B_fkey": { + "name": "_StatusToUser_B_fkey", + "tableFrom": "_StatusToUser", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["B"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "_UserPinnedNotes": { + "name": "_UserPinnedNotes", + "schema": "", + "columns": { + "A": { + "name": "A", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "B": { + "name": "B", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "_UserPinnedNotes_AB_unique": { + "name": "_UserPinnedNotes_AB_unique", + "columns": ["A", "B"], + "isUnique": true + }, + "_UserPinnedNotes_B_index": { + "name": "_UserPinnedNotes_B_index", + "columns": ["B"], + "isUnique": false + } + }, + "foreignKeys": { + "_UserPinnedNotes_A_fkey": { + "name": "_UserPinnedNotes_A_fkey", + "tableFrom": "_UserPinnedNotes", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["A"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "_UserPinnedNotes_B_fkey": { + "name": "_UserPinnedNotes_B_fkey", + "tableFrom": "_UserPinnedNotes", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["B"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Attachment": { + "name": "Attachment", + "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 + }, + "statusId": { + "name": "statusId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Attachment_statusId_fkey": { + "name": "Attachment_statusId_fkey", + "tableFrom": "Attachment", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["statusId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Notification": { + "name": "Notification", + "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": "CURRENT_TIMESTAMP" + }, + "notifiedId": { + "name": "notifiedId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "accountId": { + "name": "accountId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "statusId": { + "name": "statusId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Notification_notifiedId_fkey": { + "name": "Notification_notifiedId_fkey", + "tableFrom": "Notification", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["notifiedId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notification_accountId_fkey": { + "name": "Notification_accountId_fkey", + "tableFrom": "Notification", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["accountId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Notification_statusId_fkey": { + "name": "Notification_statusId_fkey", + "tableFrom": "Notification", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["statusId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Status": { + "name": "Status", + "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": "CURRENT_TIMESTAMP" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true + }, + "reblogId": { + "name": "reblogId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "contentType": { + "name": "contentType", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text/plain'" + }, + "visibility": { + "name": "visibility", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "inReplyToPostId": { + "name": "inReplyToPostId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "quotingPostId": { + "name": "quotingPostId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "sensitive": { + "name": "sensitive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "spoilerText": { + "name": "spoilerText", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "contentSource": { + "name": "contentSource", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + } + }, + "indexes": { + "Status_uri_key": { + "name": "Status_uri_key", + "columns": ["uri"], + "isUnique": true + } + }, + "foreignKeys": { + "Status_authorId_fkey": { + "name": "Status_authorId_fkey", + "tableFrom": "Status", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["authorId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Status_reblogId_fkey": { + "name": "Status_reblogId_fkey", + "tableFrom": "Status", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["reblogId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Status_inReplyToPostId_fkey": { + "name": "Status_inReplyToPostId_fkey", + "tableFrom": "Status", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["inReplyToPostId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Status_quotingPostId_fkey": { + "name": "Status_quotingPostId_fkey", + "tableFrom": "Status", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["quotingPostId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + }, + "Status_instanceId_fkey": { + "name": "Status_instanceId_fkey", + "tableFrom": "Status", + "tableTo": "Instance", + "schemaTo": "public", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Status_applicationId_fkey": { + "name": "Status_applicationId_fkey", + "tableFrom": "Status", + "tableTo": "Application", + "schemaTo": "public", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Instance": { + "name": "Instance", + "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 + }, + "disableAutomoderation": { + "name": "disableAutomoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdAccount": { + "name": "OpenIdAccount", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "userId": { + "name": "userId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "serverId": { + "name": "serverId", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "issuerId": { + "name": "issuerId", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdAccount_userId_fkey": { + "name": "OpenIdAccount_userId_fkey", + "tableFrom": "OpenIdAccount", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["userId"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "User": { + "name": "User", + "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 + }, + "displayName": { + "name": "displayName", + "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": "''" + }, + "isAdmin": { + "name": "isAdmin", + "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 + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updatedAt": { + "name": "updatedAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true + }, + "isBot": { + "name": "isBot", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "isLocked": { + "name": "isLocked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "isDiscoverable": { + "name": "isDiscoverable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sanctions": { + "name": "sanctions", + "type": "text[]", + "primaryKey": false, + "notNull": false, + "default": "'RRAY['" + }, + "publicKey": { + "name": "publicKey", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "privateKey": { + "name": "privateKey", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "instanceId": { + "name": "instanceId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "disableAutomoderation": { + "name": "disableAutomoderation", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "User_uri_key": { + "name": "User_uri_key", + "columns": ["uri"], + "isUnique": true + }, + "User_username_key": { + "name": "User_username_key", + "columns": ["username"], + "isUnique": true + }, + "User_email_key": { + "name": "User_email_key", + "columns": ["email"], + "isUnique": true + } + }, + "foreignKeys": { + "User_instanceId_fkey": { + "name": "User_instanceId_fkey", + "tableFrom": "User", + "tableTo": "Instance", + "schemaTo": "public", + "columnsFrom": ["instanceId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "OpenIdLoginFlow": { + "name": "OpenIdLoginFlow", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "codeVerifier": { + "name": "codeVerifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applicationId": { + "name": "applicationId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "issuerId": { + "name": "issuerId", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "OpenIdLoginFlow_applicationId_fkey": { + "name": "OpenIdLoginFlow_applicationId_fkey", + "tableFrom": "OpenIdLoginFlow", + "tableTo": "Application", + "schemaTo": "public", + "columnsFrom": ["applicationId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "Flag": { + "name": "Flag", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "flagType": { + "name": "flagType", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "flaggeStatusId": { + "name": "flaggeStatusId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "flaggedUserId": { + "name": "flaggedUserId", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "Flag_flaggeStatusId_fkey": { + "name": "Flag_flaggeStatusId_fkey", + "tableFrom": "Flag", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["flaggeStatusId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "Flag_flaggedUserId_fkey": { + "name": "Flag_flaggedUserId_fkey", + "tableFrom": "Flag", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["flaggedUserId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModNote": { + "name": "ModNote", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "notedStatusId": { + "name": "notedStatusId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "notedUserId": { + "name": "notedUserId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "note": { + "name": "note", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "ModNote_notedStatusId_fkey": { + "name": "ModNote_notedStatusId_fkey", + "tableFrom": "ModNote", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["notedStatusId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNote_notedUserId_fkey": { + "name": "ModNote_notedUserId_fkey", + "tableFrom": "ModNote", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["notedUserId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModNote_modId_fkey": { + "name": "ModNote_modId_fkey", + "tableFrom": "ModNote", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "ModTag": { + "name": "ModTag", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "uuid_generate_v7()" + }, + "taggedStatusId": { + "name": "taggedStatusId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "taggedUserId": { + "name": "taggedUserId", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "modId": { + "name": "modId", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "createdAt": { + "name": "createdAt", + "type": "timestamp(3)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "ModTag_taggedStatusId_fkey": { + "name": "ModTag_taggedStatusId_fkey", + "tableFrom": "ModTag", + "tableTo": "Status", + "schemaTo": "public", + "columnsFrom": ["taggedStatusId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTag_taggedUserId_fkey": { + "name": "ModTag_taggedUserId_fkey", + "tableFrom": "ModTag", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["taggedUserId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + }, + "ModTag_modId_fkey": { + "name": "ModTag_modId_fkey", + "tableFrom": "ModTag", + "tableTo": "User", + "schemaTo": "public", + "columnsFrom": ["modId"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "cascade" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} }, - "Emoji": { - "name": "Emoji", - "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 - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "alt": { - "name": "alt", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "content_type": { - "name": "content_type", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "Emoji_instanceId_fkey": { - "name": "Emoji_instanceId_fkey", - "tableFrom": "Emoji", - "tableTo": "Instance", - "schemaTo": "public", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Like": { - "name": "Like", - "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": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": { - "Like_likerId_fkey": { - "name": "Like_likerId_fkey", - "tableFrom": "Like", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "likerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Like_likedId_fkey": { - "name": "Like_likedId_fkey", - "tableFrom": "Like", - "tableTo": "Status", - "schemaTo": "public", - "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": "CURRENT_TIMESTAMP" - }, - "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_key": { - "name": "LysandObject_remote_id_key", - "columns": [ - "remote_id" - ], - "isUnique": true - }, - "LysandObject_uri_key": { - "name": "LysandObject_uri_key", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "LysandObject_authorId_fkey": { - "name": "LysandObject_authorId_fkey", - "tableFrom": "LysandObject", - "tableTo": "LysandObject", - "schemaTo": "public", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Relationship": { - "name": "Relationship", - "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 - }, - "showingReblogs": { - "name": "showingReblogs", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "notifying": { - "name": "notifying", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "followedBy": { - "name": "followedBy", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blocking": { - "name": "blocking", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "blockedBy": { - "name": "blockedBy", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "muting": { - "name": "muting", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "mutingNotifications": { - "name": "mutingNotifications", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "requested": { - "name": "requested", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "domainBlocking": { - "name": "domainBlocking", - "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 - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "Relationship_ownerId_fkey": { - "name": "Relationship_ownerId_fkey", - "tableFrom": "Relationship", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "ownerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Relationship_subjectId_fkey": { - "name": "Relationship_subjectId_fkey", - "tableFrom": "Relationship", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "subjectId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Application": { - "name": "Application", - "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": { - "Application_client_id_key": { - "name": "Application_client_id_key", - "columns": [ - "client_id" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Token": { - "name": "Token", - "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": "CURRENT_TIMESTAMP" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Token_userId_fkey": { - "name": "Token_userId_fkey", - "tableFrom": "Token", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Token_applicationId_fkey": { - "name": "Token_applicationId_fkey", - "tableFrom": "Token", - "tableTo": "Application", - "schemaTo": "public", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "_EmojiToUser": { - "name": "_EmojiToUser", - "schema": "", - "columns": { - "A": { - "name": "A", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "B": { - "name": "B", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "_EmojiToUser_AB_unique": { - "name": "_EmojiToUser_AB_unique", - "columns": [ - "A", - "B" - ], - "isUnique": true - }, - "_EmojiToUser_B_index": { - "name": "_EmojiToUser_B_index", - "columns": [ - "B" - ], - "isUnique": false - } - }, - "foreignKeys": { - "_EmojiToUser_A_fkey": { - "name": "_EmojiToUser_A_fkey", - "tableFrom": "_EmojiToUser", - "tableTo": "Emoji", - "schemaTo": "public", - "columnsFrom": [ - "A" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "_EmojiToUser_B_fkey": { - "name": "_EmojiToUser_B_fkey", - "tableFrom": "_EmojiToUser", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "B" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "_EmojiToStatus": { - "name": "_EmojiToStatus", - "schema": "", - "columns": { - "A": { - "name": "A", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "B": { - "name": "B", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "_EmojiToStatus_AB_unique": { - "name": "_EmojiToStatus_AB_unique", - "columns": [ - "A", - "B" - ], - "isUnique": true - }, - "_EmojiToStatus_B_index": { - "name": "_EmojiToStatus_B_index", - "columns": [ - "B" - ], - "isUnique": false - } - }, - "foreignKeys": { - "_EmojiToStatus_A_fkey": { - "name": "_EmojiToStatus_A_fkey", - "tableFrom": "_EmojiToStatus", - "tableTo": "Emoji", - "schemaTo": "public", - "columnsFrom": [ - "A" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "_EmojiToStatus_B_fkey": { - "name": "_EmojiToStatus_B_fkey", - "tableFrom": "_EmojiToStatus", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "B" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "_StatusToUser": { - "name": "_StatusToUser", - "schema": "", - "columns": { - "A": { - "name": "A", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "B": { - "name": "B", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "_StatusToUser_AB_unique": { - "name": "_StatusToUser_AB_unique", - "columns": [ - "A", - "B" - ], - "isUnique": true - }, - "_StatusToUser_B_index": { - "name": "_StatusToUser_B_index", - "columns": [ - "B" - ], - "isUnique": false - } - }, - "foreignKeys": { - "_StatusToUser_A_fkey": { - "name": "_StatusToUser_A_fkey", - "tableFrom": "_StatusToUser", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "A" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "_StatusToUser_B_fkey": { - "name": "_StatusToUser_B_fkey", - "tableFrom": "_StatusToUser", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "B" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "_UserPinnedNotes": { - "name": "_UserPinnedNotes", - "schema": "", - "columns": { - "A": { - "name": "A", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "B": { - "name": "B", - "type": "uuid", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "_UserPinnedNotes_AB_unique": { - "name": "_UserPinnedNotes_AB_unique", - "columns": [ - "A", - "B" - ], - "isUnique": true - }, - "_UserPinnedNotes_B_index": { - "name": "_UserPinnedNotes_B_index", - "columns": [ - "B" - ], - "isUnique": false - } - }, - "foreignKeys": { - "_UserPinnedNotes_A_fkey": { - "name": "_UserPinnedNotes_A_fkey", - "tableFrom": "_UserPinnedNotes", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "A" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "_UserPinnedNotes_B_fkey": { - "name": "_UserPinnedNotes_B_fkey", - "tableFrom": "_UserPinnedNotes", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "B" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Attachment": { - "name": "Attachment", - "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 - }, - "statusId": { - "name": "statusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Attachment_statusId_fkey": { - "name": "Attachment_statusId_fkey", - "tableFrom": "Attachment", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "statusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Notification": { - "name": "Notification", - "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": "CURRENT_TIMESTAMP" - }, - "notifiedId": { - "name": "notifiedId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "accountId": { - "name": "accountId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "statusId": { - "name": "statusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Notification_notifiedId_fkey": { - "name": "Notification_notifiedId_fkey", - "tableFrom": "Notification", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "notifiedId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notification_accountId_fkey": { - "name": "Notification_accountId_fkey", - "tableFrom": "Notification", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "accountId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Notification_statusId_fkey": { - "name": "Notification_statusId_fkey", - "tableFrom": "Notification", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "statusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Status": { - "name": "Status", - "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": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true - }, - "reblogId": { - "name": "reblogId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "contentType": { - "name": "contentType", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'text/plain'" - }, - "visibility": { - "name": "visibility", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "inReplyToPostId": { - "name": "inReplyToPostId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "quotingPostId": { - "name": "quotingPostId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "sensitive": { - "name": "sensitive", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "spoilerText": { - "name": "spoilerText", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "contentSource": { - "name": "contentSource", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "''" - } - }, - "indexes": { - "Status_uri_key": { - "name": "Status_uri_key", - "columns": [ - "uri" - ], - "isUnique": true - } - }, - "foreignKeys": { - "Status_authorId_fkey": { - "name": "Status_authorId_fkey", - "tableFrom": "Status", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "authorId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Status_reblogId_fkey": { - "name": "Status_reblogId_fkey", - "tableFrom": "Status", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "reblogId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Status_inReplyToPostId_fkey": { - "name": "Status_inReplyToPostId_fkey", - "tableFrom": "Status", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "inReplyToPostId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Status_quotingPostId_fkey": { - "name": "Status_quotingPostId_fkey", - "tableFrom": "Status", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "quotingPostId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - }, - "Status_instanceId_fkey": { - "name": "Status_instanceId_fkey", - "tableFrom": "Status", - "tableTo": "Instance", - "schemaTo": "public", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Status_applicationId_fkey": { - "name": "Status_applicationId_fkey", - "tableFrom": "Status", - "tableTo": "Application", - "schemaTo": "public", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Instance": { - "name": "Instance", - "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 - }, - "disableAutomoderation": { - "name": "disableAutomoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdAccount": { - "name": "OpenIdAccount", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "userId": { - "name": "userId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "serverId": { - "name": "serverId", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "issuerId": { - "name": "issuerId", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdAccount_userId_fkey": { - "name": "OpenIdAccount_userId_fkey", - "tableFrom": "OpenIdAccount", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "userId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "set null", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "User": { - "name": "User", - "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 - }, - "displayName": { - "name": "displayName", - "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": "''" - }, - "isAdmin": { - "name": "isAdmin", - "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 - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - }, - "updatedAt": { - "name": "updatedAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true - }, - "isBot": { - "name": "isBot", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "isLocked": { - "name": "isLocked", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "isDiscoverable": { - "name": "isDiscoverable", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "sanctions": { - "name": "sanctions", - "type": "text[]", - "primaryKey": false, - "notNull": false, - "default": "'RRAY['" - }, - "publicKey": { - "name": "publicKey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "privateKey": { - "name": "privateKey", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "instanceId": { - "name": "instanceId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "disableAutomoderation": { - "name": "disableAutomoderation", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": { - "User_uri_key": { - "name": "User_uri_key", - "columns": [ - "uri" - ], - "isUnique": true - }, - "User_username_key": { - "name": "User_username_key", - "columns": [ - "username" - ], - "isUnique": true - }, - "User_email_key": { - "name": "User_email_key", - "columns": [ - "email" - ], - "isUnique": true - } - }, - "foreignKeys": { - "User_instanceId_fkey": { - "name": "User_instanceId_fkey", - "tableFrom": "User", - "tableTo": "Instance", - "schemaTo": "public", - "columnsFrom": [ - "instanceId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "OpenIdLoginFlow": { - "name": "OpenIdLoginFlow", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "codeVerifier": { - "name": "codeVerifier", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "applicationId": { - "name": "applicationId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "issuerId": { - "name": "issuerId", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "OpenIdLoginFlow_applicationId_fkey": { - "name": "OpenIdLoginFlow_applicationId_fkey", - "tableFrom": "OpenIdLoginFlow", - "tableTo": "Application", - "schemaTo": "public", - "columnsFrom": [ - "applicationId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "Flag": { - "name": "Flag", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "flagType": { - "name": "flagType", - "type": "text", - "primaryKey": false, - "notNull": true, - "default": "'other'" - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - }, - "flaggeStatusId": { - "name": "flaggeStatusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "flaggedUserId": { - "name": "flaggedUserId", - "type": "uuid", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "Flag_flaggeStatusId_fkey": { - "name": "Flag_flaggeStatusId_fkey", - "tableFrom": "Flag", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "flaggeStatusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "Flag_flaggedUserId_fkey": { - "name": "Flag_flaggedUserId_fkey", - "tableFrom": "Flag", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "flaggedUserId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModNote": { - "name": "ModNote", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "notedStatusId": { - "name": "notedStatusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "notedUserId": { - "name": "notedUserId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "note": { - "name": "note", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": { - "ModNote_notedStatusId_fkey": { - "name": "ModNote_notedStatusId_fkey", - "tableFrom": "ModNote", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "notedStatusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNote_notedUserId_fkey": { - "name": "ModNote_notedUserId_fkey", - "tableFrom": "ModNote", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "notedUserId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModNote_modId_fkey": { - "name": "ModNote_modId_fkey", - "tableFrom": "ModNote", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "ModTag": { - "name": "ModTag", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "uuid_generate_v7()" - }, - "taggedStatusId": { - "name": "taggedStatusId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "taggedUserId": { - "name": "taggedUserId", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "modId": { - "name": "modId", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "tag": { - "name": "tag", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "createdAt": { - "name": "createdAt", - "type": "timestamp(3)", - "primaryKey": false, - "notNull": true, - "default": "CURRENT_TIMESTAMP" - } - }, - "indexes": {}, - "foreignKeys": { - "ModTag_taggedStatusId_fkey": { - "name": "ModTag_taggedStatusId_fkey", - "tableFrom": "ModTag", - "tableTo": "Status", - "schemaTo": "public", - "columnsFrom": [ - "taggedStatusId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTag_taggedUserId_fkey": { - "name": "ModTag_taggedUserId_fkey", - "tableFrom": "ModTag", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "taggedUserId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - }, - "ModTag_modId_fkey": { - "name": "ModTag_modId_fkey", - "tableFrom": "ModTag", - "tableTo": "User", - "schemaTo": "public", - "columnsFrom": [ - "modId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "cascade", - "onUpdate": "cascade" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { + "enums": {}, "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 2a8db486..e80d9a91 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -1,13 +1,13 @@ { - "version": "5", - "dialect": "pg", - "entries": [ - { - "idx": 0, - "version": "5", - "when": 1712805159664, - "tag": "0000_illegal_living_lightning", - "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 + } + ] +} diff --git a/drizzle/schema.ts b/drizzle/schema.ts index d146ea14..76a68579 100644 --- a/drizzle/schema.ts +++ b/drizzle/schema.ts @@ -1,16 +1,16 @@ -import { - pgTable, - timestamp, - text, - integer, - foreignKey, - uuid, - boolean, - uniqueIndex, - jsonb, - index, -} from "drizzle-orm/pg-core"; import { relations, sql } from "drizzle-orm"; +import { + boolean, + foreignKey, + index, + integer, + jsonb, + pgTable, + text, + timestamp, + uniqueIndex, + uuid, +} from "drizzle-orm/pg-core"; export const emoji = pgTable("Emoji", { id: uuid("id").default(sql`uuid_generate_v7()`).primaryKey().notNull(), diff --git a/index.ts b/index.ts index 6277261c..808e4471 100644 --- a/index.ts +++ b/index.ts @@ -4,11 +4,11 @@ import { connectMeili } from "@meilisearch"; import { moduleIsEntry } from "@module"; import { initializeRedisCache } from "@redis"; import { config } from "config-manager"; +import { count, sql } from "drizzle-orm"; import { LogLevel, LogManager, MultiLogManager } from "log-manager"; -import { createServer } from "~server"; import { db, client as pgClient } from "~drizzle/db"; import { status } from "~drizzle/schema"; -import { count, sql } from "drizzle-orm"; +import { createServer } from "~server"; await pgClient.connect(); const timeAtStart = performance.now(); diff --git a/package.json b/package.json index 5ce39c19..1eb534eb 100644 --- a/package.json +++ b/package.json @@ -1,139 +1,139 @@ { - "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", + "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", + "migrate-dev": "bun prisma migrate dev", + "migrate": "bun prisma migrate deploy", + "lint": "bunx --bun eslint --config .eslintrc.cjs --ext .ts .", + "prod-build": "bun run build.ts", + "prisma": "DATABASE_URL=$(bun run prisma.ts) bunx prisma", + "generate": "bun prisma generate", + "benchmark:timeline": "bun run benchmarks/timelines.ts", + "cloc": "cloc . --exclude-dir node_modules,dist", + "cli": "bun run cli.ts" + }, + "trustedDependencies": [ + "@biomejs/biome", + "@fortawesome/fontawesome-common-types", + "@fortawesome/free-regular-svg-icons", + "@fortawesome/free-solid-svg-icons", + "@prisma/client", + "@prisma/engines", + "es5-ext", + "esbuild", + "json-editor-vue", + "msgpackr-extract", + "nuxt-app", + "prisma", + "sharp", + "vue-demi" + ], + "devDependencies": { + "@biomejs/biome": "1.6.4", + "@img/sharp-wasm32": "^0.33.3", + "@julr/unocss-preset-forms": "^0.1.0", + "@nuxtjs/seo": "^2.0.0-rc.10", + "@nuxtjs/tailwindcss": "^6.11.4", + "@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", + "@typescript-eslint/eslint-plugin": "latest", + "@unocss/cli": "latest", + "@unocss/transformer-directives": "^0.59.0", + "@vitejs/plugin-vue": "latest", + "@vueuse/head": "^2.0.0", + "activitypub-types": "^1.0.3", + "bun-types": "latest", + "drizzle-kit": "^0.20.14", + "shiki": "^1.2.4", + "typescript": "latest", + "unocss": "latest", + "untyped": "^1.4.2", + "vite": "^5.2.8", + "vite-ssr": "^0.17.1", + "vue": "^3.3.9", + "vue-router": "^4.2.5", + "vue-tsc": "latest" + }, + "peerDependencies": { + "typescript": "^5.3.2" + }, + "dependencies": { + "@aws-sdk/client-s3": "^3.461.0", + "@iarna/toml": "^2.2.5", + "@json2csv/plainjs": "^7.0.6", + "@prisma/client": "^5.6.0", + "blurhash": "^2.0.5", + "bullmq": "latest", + "chalk": "^5.3.0", + "cli-parser": "workspace:*", + "cli-table": "^0.3.11", + "config-manager": "workspace:*", + "drizzle-orm": "^0.30.7", + "eventemitter3": "^5.0.1", + "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", + "jsonld": "^8.3.1", + "linkify-html": "^4.1.3", + "linkify-string": "^4.1.3", + "linkifyjs": "^4.1.3", + "log-manager": "workspace:*", + "marked": "latest", + "media-manager": "workspace:*", + "megalodon": "^10.0.0", + "meilisearch": "latest", + "merge-deep-ts": "^1.2.6", + "mime-types": "^2.1.35", + "next-route-matcher": "^1.0.1", + "oauth4webapi": "^2.4.0", + "pg": "^8.11.5", + "prisma": "^5.6.0", + "prisma-json-types-generator": "^3.0.4", + "prisma-redis-middleware": "^4.8.0", + "request-parser": "workspace:*", + "semver": "^7.5.4", + "sharp": "^0.33.3", + "strip-ansi": "^7.1.0" } - ], - "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", - "migrate-dev": "bun prisma migrate dev", - "migrate": "bun prisma migrate deploy", - "lint": "bunx --bun eslint --config .eslintrc.cjs --ext .ts .", - "prod-build": "bun run build.ts", - "prisma": "DATABASE_URL=$(bun run prisma.ts) bunx prisma", - "generate": "bun prisma generate", - "benchmark:timeline": "bun run benchmarks/timelines.ts", - "cloc": "cloc . --exclude-dir node_modules,dist", - "cli": "bun run cli.ts" - }, - "trustedDependencies": [ - "@biomejs/biome", - "@fortawesome/fontawesome-common-types", - "@fortawesome/free-regular-svg-icons", - "@fortawesome/free-solid-svg-icons", - "@prisma/client", - "@prisma/engines", - "es5-ext", - "esbuild", - "json-editor-vue", - "msgpackr-extract", - "nuxt-app", - "prisma", - "sharp", - "vue-demi" - ], - "devDependencies": { - "@biomejs/biome": "1.6.4", - "@img/sharp-wasm32": "^0.33.3", - "@julr/unocss-preset-forms": "^0.1.0", - "@nuxtjs/seo": "^2.0.0-rc.10", - "@nuxtjs/tailwindcss": "^6.11.4", - "@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", - "@typescript-eslint/eslint-plugin": "latest", - "@unocss/cli": "latest", - "@unocss/transformer-directives": "^0.59.0", - "@vitejs/plugin-vue": "latest", - "@vueuse/head": "^2.0.0", - "activitypub-types": "^1.0.3", - "bun-types": "latest", - "drizzle-kit": "^0.20.14", - "shiki": "^1.2.4", - "typescript": "latest", - "unocss": "latest", - "untyped": "^1.4.2", - "vite": "^5.2.8", - "vite-ssr": "^0.17.1", - "vue": "^3.3.9", - "vue-router": "^4.2.5", - "vue-tsc": "latest" - }, - "peerDependencies": { - "typescript": "^5.3.2" - }, - "dependencies": { - "@aws-sdk/client-s3": "^3.461.0", - "@iarna/toml": "^2.2.5", - "@json2csv/plainjs": "^7.0.6", - "@prisma/client": "^5.6.0", - "blurhash": "^2.0.5", - "bullmq": "latest", - "chalk": "^5.3.0", - "cli-parser": "workspace:*", - "cli-table": "^0.3.11", - "config-manager": "workspace:*", - "drizzle-orm": "^0.30.7", - "eventemitter3": "^5.0.1", - "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", - "jsonld": "^8.3.1", - "linkify-html": "^4.1.3", - "linkify-string": "^4.1.3", - "linkifyjs": "^4.1.3", - "log-manager": "workspace:*", - "marked": "latest", - "media-manager": "workspace:*", - "megalodon": "^10.0.0", - "meilisearch": "latest", - "merge-deep-ts": "^1.2.6", - "mime-types": "^2.1.35", - "next-route-matcher": "^1.0.1", - "oauth4webapi": "^2.4.0", - "pg": "^8.11.5", - "prisma": "^5.6.0", - "prisma-json-types-generator": "^3.0.4", - "prisma-redis-middleware": "^4.8.0", - "request-parser": "workspace:*", - "semver": "^7.5.4", - "sharp": "^0.33.3", - "strip-ansi": "^7.1.0" - } } diff --git a/packages/frontend/emails/welcome.vue b/packages/frontend/emails/welcome.vue index 8e2611b7..4973afc6 100644 --- a/packages/frontend/emails/welcome.vue +++ b/packages/frontend/emails/welcome.vue @@ -1,5 +1,5 @@