diff --git a/packages/frontpage/drizzle.config.ts b/packages/frontpage/drizzle.config.ts index eb4bbb1b..f985f6c6 100644 --- a/packages/frontpage/drizzle.config.ts +++ b/packages/frontpage/drizzle.config.ts @@ -1,21 +1,24 @@ -import { defineConfig } from "drizzle-kit"; import { loadEnvConfig } from "@next/env"; +import { defineConfig } from "drizzle-kit"; + +// Load environment variables +loadEnvConfig(process.cwd()); -const projectDir = process.cwd(); -loadEnvConfig(projectDir); +const URL = process.env.TURSO_CONNECTION_URL!; +const AUTH_TOKEN = process.env.TURSO_AUTH_TOKEN!; -const POSTGRES_URL = process.env.POSTGRES_URL; -if (!POSTGRES_URL) { - throw new Error("POSTGRES_URL is not set"); +if (!URL || !AUTH_TOKEN) { + throw new Error("TURSO_CONNECTION_URL and TURSO_AUTH_TOKEN must be set"); } export default defineConfig({ - dialect: "postgresql", schema: "./lib/schema.ts", out: "./drizzle", + dialect: "sqlite", + driver: "turso", strict: true, - verbose: true, dbCredentials: { - url: POSTGRES_URL, + url: URL, + authToken: AUTH_TOKEN, }, }); diff --git a/packages/frontpage/drizzle/0000_numerous_imperial_guard.sql b/packages/frontpage/drizzle/0000_numerous_imperial_guard.sql deleted file mode 100644 index 0f4345d9..00000000 --- a/packages/frontpage/drizzle/0000_numerous_imperial_guard.sql +++ /dev/null @@ -1,49 +0,0 @@ -CREATE TABLE IF NOT EXISTS "comments" ( - "id" serial PRIMARY KEY NOT NULL, - "cid" text NOT NULL, - "post_id" integer NOT NULL, - "body" text NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "author_did" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "comment_votes" ( - "id" serial PRIMARY KEY NOT NULL, - "comment_id" integer NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "author_did" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "posts" ( - "id" serial PRIMARY KEY NOT NULL, - "cid" text NOT NULL, - "title" text NOT NULL, - "url" text NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "author_did" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "post_votes" ( - "id" serial PRIMARY KEY NOT NULL, - "post_id" integer NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "author_did" text NOT NULL -); ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "comments" ADD CONSTRAINT "comments_post_id_posts_id_fk" FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "comment_votes" ADD CONSTRAINT "comment_votes_comment_id_comments_id_fk" FOREIGN KEY ("comment_id") REFERENCES "public"."comments"("id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "post_votes" ADD CONSTRAINT "post_votes_post_id_posts_id_fk" FOREIGN KEY ("post_id") REFERENCES "public"."posts"("id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/packages/frontpage/drizzle/0000_sturdy_rage.sql b/packages/frontpage/drizzle/0000_sturdy_rage.sql new file mode 100644 index 00000000..439cdc82 --- /dev/null +++ b/packages/frontpage/drizzle/0000_sturdy_rage.sql @@ -0,0 +1,66 @@ +CREATE TABLE `beta_users` ( + `id` integer PRIMARY KEY NOT NULL, + `created_at` text DEFAULT (CURRENT_DATE) NOT NULL, + `did` text NOT NULL +); +--> statement-breakpoint +CREATE TABLE `comments` ( + `id` integer PRIMARY KEY NOT NULL, + `rkey` text NOT NULL, + `cid` text NOT NULL, + `post_id` integer NOT NULL, + `body` text(10000) NOT NULL, + `created_at` text DEFAULT (CURRENT_DATE) NOT NULL, + `author_did` text NOT NULL, + `status` text DEFAULT 'live', + `parent_comment_id` integer, + FOREIGN KEY (`post_id`) REFERENCES `posts`(`id`) ON UPDATE no action ON DELETE no action, + FOREIGN KEY (`parent_comment_id`) REFERENCES `comments`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `comment_votes` ( + `id` integer PRIMARY KEY NOT NULL, + `comment_id` integer NOT NULL, + `created_at` text DEFAULT (CURRENT_DATE) NOT NULL, + `author_did` text NOT NULL, + `cid` text NOT NULL, + `rkey` text NOT NULL, + FOREIGN KEY (`comment_id`) REFERENCES `comments`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE TABLE `consumed_offsets` ( + `offset` integer PRIMARY KEY NOT NULL +); +--> statement-breakpoint +CREATE TABLE `posts` ( + `id` integer PRIMARY KEY NOT NULL, + `rkey` text NOT NULL, + `cid` text NOT NULL, + `title` text(300) NOT NULL, + `url` text(255) NOT NULL, + `created_at` text DEFAULT (CURRENT_DATE) NOT NULL, + `author_did` text NOT NULL, + `status` text DEFAULT 'live' +); +--> statement-breakpoint +CREATE TABLE `post_votes` ( + `id` integer PRIMARY KEY NOT NULL, + `post_id` integer NOT NULL, + `created_at` text DEFAULT (CURRENT_DATE) NOT NULL, + `author_did` text NOT NULL, + `cid` text NOT NULL, + `rkey` text NOT NULL, + FOREIGN KEY (`post_id`) REFERENCES `posts`(`id`) ON UPDATE no action ON DELETE no action +); +--> statement-breakpoint +CREATE UNIQUE INDEX `beta_users_did_unique` ON `beta_users` (`did`);--> statement-breakpoint +CREATE UNIQUE INDEX `comments_cid_unique` ON `comments` (`cid`);--> statement-breakpoint +CREATE UNIQUE INDEX `comments_author_did_rkey_unique` ON `comments` (`author_did`,`rkey`);--> statement-breakpoint +CREATE UNIQUE INDEX `comment_votes_cid_unique` ON `comment_votes` (`cid`);--> statement-breakpoint +CREATE UNIQUE INDEX `comment_votes_author_did_rkey_unique` ON `comment_votes` (`author_did`,`rkey`);--> statement-breakpoint +CREATE UNIQUE INDEX `comment_votes_author_did_comment_id_unique` ON `comment_votes` (`author_did`,`comment_id`);--> statement-breakpoint +CREATE UNIQUE INDEX `posts_cid_unique` ON `posts` (`cid`);--> statement-breakpoint +CREATE UNIQUE INDEX `posts_author_did_rkey_unique` ON `posts` (`author_did`,`rkey`);--> statement-breakpoint +CREATE UNIQUE INDEX `post_votes_cid_unique` ON `post_votes` (`cid`);--> statement-breakpoint +CREATE UNIQUE INDEX `post_votes_author_did_rkey_unique` ON `post_votes` (`author_did`,`rkey`);--> statement-breakpoint +CREATE UNIQUE INDEX `post_votes_author_did_post_id_unique` ON `post_votes` (`author_did`,`post_id`); \ No newline at end of file diff --git a/packages/frontpage/drizzle/0001_nice_magma.sql b/packages/frontpage/drizzle/0001_nice_magma.sql deleted file mode 100644 index f5a1f782..00000000 --- a/packages/frontpage/drizzle/0001_nice_magma.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE IF NOT EXISTS "beta_users" ( - "id" serial PRIMARY KEY NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "did" text NOT NULL, - CONSTRAINT "beta_users_did_unique" UNIQUE("did") -); diff --git a/packages/frontpage/drizzle/0002_dizzy_juggernaut.sql b/packages/frontpage/drizzle/0002_dizzy_juggernaut.sql deleted file mode 100644 index 90927dc2..00000000 --- a/packages/frontpage/drizzle/0002_dizzy_juggernaut.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE IF NOT EXISTS "consumed_offsets" ( - "offset" bigint PRIMARY KEY NOT NULL -); diff --git a/packages/frontpage/drizzle/0003_nervous_violations.sql b/packages/frontpage/drizzle/0003_nervous_violations.sql deleted file mode 100644 index f7ba5b91..00000000 --- a/packages/frontpage/drizzle/0003_nervous_violations.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE "comments" ADD COLUMN "rkey" text NOT NULL;--> statement-breakpoint -ALTER TABLE "posts" ADD COLUMN "rkey" text NOT NULL;--> statement-breakpoint -ALTER TABLE "comments" DROP COLUMN IF EXISTS "cid";--> statement-breakpoint -ALTER TABLE "comments" ADD CONSTRAINT "comments_rkey_unique" UNIQUE("rkey");--> statement-breakpoint -ALTER TABLE "posts" ADD CONSTRAINT "posts_rkey_unique" UNIQUE("rkey");--> statement-breakpoint -ALTER TABLE "posts" ADD CONSTRAINT "posts_cid_unique" UNIQUE("cid"); \ No newline at end of file diff --git a/packages/frontpage/drizzle/0004_demonic_the_spike.sql b/packages/frontpage/drizzle/0004_demonic_the_spike.sql deleted file mode 100644 index c7b6a264..00000000 --- a/packages/frontpage/drizzle/0004_demonic_the_spike.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "comments" ADD COLUMN "cid" text NOT NULL;--> statement-breakpoint -ALTER TABLE "comments" ADD CONSTRAINT "comments_cid_unique" UNIQUE("cid"); \ No newline at end of file diff --git a/packages/frontpage/drizzle/0005_colorful_turbo.sql b/packages/frontpage/drizzle/0005_colorful_turbo.sql deleted file mode 100644 index 95c8de75..00000000 --- a/packages/frontpage/drizzle/0005_colorful_turbo.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE "comment_votes" ADD COLUMN "cid" text NOT NULL;--> statement-breakpoint -ALTER TABLE "comment_votes" ADD COLUMN "rkey" text NOT NULL;--> statement-breakpoint -ALTER TABLE "post_votes" ADD COLUMN "cid" text NOT NULL;--> statement-breakpoint -ALTER TABLE "post_votes" ADD COLUMN "rkey" text NOT NULL;--> statement-breakpoint -ALTER TABLE "comment_votes" ADD CONSTRAINT "comment_votes_cid_unique" UNIQUE("cid");--> statement-breakpoint -ALTER TABLE "comment_votes" ADD CONSTRAINT "comment_votes_rkey_unique" UNIQUE("rkey");--> statement-breakpoint -ALTER TABLE "post_votes" ADD CONSTRAINT "post_votes_cid_unique" UNIQUE("cid");--> statement-breakpoint -ALTER TABLE "post_votes" ADD CONSTRAINT "post_votes_rkey_unique" UNIQUE("rkey"); \ No newline at end of file diff --git a/packages/frontpage/drizzle/0006_short_adam_destine.sql b/packages/frontpage/drizzle/0006_short_adam_destine.sql deleted file mode 100644 index 859651d2..00000000 --- a/packages/frontpage/drizzle/0006_short_adam_destine.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE "comment_votes" - ADD CONSTRAINT "comment_votes_author_did_rkey_unique" UNIQUE ("author_did", "rkey"); - ---> statement-breakpoint -ALTER TABLE "post_votes" - ADD CONSTRAINT "post_votes_author_did_rkey_unique" UNIQUE ("author_did", "rkey"); diff --git a/packages/frontpage/drizzle/0007_smiling_betty_ross.sql b/packages/frontpage/drizzle/0007_smiling_betty_ross.sql deleted file mode 100644 index 65a407fa..00000000 --- a/packages/frontpage/drizzle/0007_smiling_betty_ross.sql +++ /dev/null @@ -1,20 +0,0 @@ -DO $$ -BEGIN - CREATE TYPE "public"."submission_status" AS ENUM( - 'live', - 'deleted', - 'moderator_hidden' -); -EXCEPTION - WHEN duplicate_object THEN - NULL; -END -$$; - ---> statement-breakpoint -ALTER TABLE "comments" - ADD COLUMN "status" "submission_status" DEFAULT 'live'; - ---> statement-breakpoint -ALTER TABLE "posts" - ADD COLUMN "status" "submission_status" DEFAULT 'live'; diff --git a/packages/frontpage/drizzle/0008_oval_master_mold.sql b/packages/frontpage/drizzle/0008_oval_master_mold.sql deleted file mode 100644 index f84191d5..00000000 --- a/packages/frontpage/drizzle/0008_oval_master_mold.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE "comments" ADD COLUMN "parent_comment_id" integer;--> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "comments" ADD CONSTRAINT "parent_comment_id_fkey" FOREIGN KEY ("parent_comment_id") REFERENCES "public"."comments"("id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/packages/frontpage/drizzle/0009_lying_zeigeist.sql b/packages/frontpage/drizzle/0009_lying_zeigeist.sql deleted file mode 100644 index 09ccd190..00000000 --- a/packages/frontpage/drizzle/0009_lying_zeigeist.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "comments" - ADD CONSTRAINT "comments_author_did_rkey_unique" UNIQUE ("author_did", "rkey"); diff --git a/packages/frontpage/drizzle/0010_regular_roxanne_simpson.sql b/packages/frontpage/drizzle/0010_regular_roxanne_simpson.sql deleted file mode 100644 index e95dee44..00000000 --- a/packages/frontpage/drizzle/0010_regular_roxanne_simpson.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE "comments" DROP CONSTRAINT "comments_rkey_unique";--> statement-breakpoint -ALTER TABLE "comment_votes" DROP CONSTRAINT "comment_votes_rkey_unique";--> statement-breakpoint -ALTER TABLE "posts" DROP CONSTRAINT "posts_rkey_unique";--> statement-breakpoint -ALTER TABLE "post_votes" DROP CONSTRAINT "post_votes_rkey_unique";--> statement-breakpoint -ALTER TABLE "posts" ADD CONSTRAINT "posts_author_did_rkey_unique" UNIQUE("author_did","rkey"); diff --git a/packages/frontpage/drizzle/0011_wooden_mattie_franklin.sql b/packages/frontpage/drizzle/0011_wooden_mattie_franklin.sql deleted file mode 100644 index aeb79006..00000000 --- a/packages/frontpage/drizzle/0011_wooden_mattie_franklin.sql +++ /dev/null @@ -1,10 +0,0 @@ -ALTER TABLE "comments" - ALTER COLUMN "body" SET DATA TYPE varchar(10000); - ---> statement-breakpoint -ALTER TABLE "posts" - ALTER COLUMN "title" SET DATA TYPE varchar(300); - ---> statement-breakpoint -ALTER TABLE "posts" - ALTER COLUMN "url" SET DATA TYPE varchar(255); diff --git a/packages/frontpage/drizzle/0012_nebulous_vin_gonzales.sql b/packages/frontpage/drizzle/0012_nebulous_vin_gonzales.sql deleted file mode 100644 index dfed7dfb..00000000 --- a/packages/frontpage/drizzle/0012_nebulous_vin_gonzales.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE "comment_votes" - ADD CONSTRAINT "comment_votes_author_did_comment_id_unique" UNIQUE ("author_did", "comment_id"); - ---> statement-breakpoint -ALTER TABLE "post_votes" - ADD CONSTRAINT "post_votes_author_did_post_id_unique" UNIQUE ("author_did", "post_id"); diff --git a/packages/frontpage/drizzle/meta/0000_snapshot.json b/packages/frontpage/drizzle/meta/0000_snapshot.json index 52a02694..b0c11fd0 100644 --- a/packages/frontpage/drizzle/meta/0000_snapshot.json +++ b/packages/frontpage/drizzle/meta/0000_snapshot.json @@ -1,52 +1,134 @@ { - "id": "5e8e33d8-dde1-44fa-8f06-5d03c394551e", + "version": "6", + "dialect": "sqlite", + "id": "b13e6740-b488-43a0-a373-49d5657df2bc", "prevId": "00000000-0000-0000-0000-000000000000", - "version": "7", - "dialect": "postgresql", "tables": { - "public.comments": { + "beta_users": { + "name": "beta_users", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_DATE)" + }, + "did": { + "name": "did", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "beta_users_did_unique": { + "name": "beta_users_did_unique", + "columns": [ + "did" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "comments": { "name": "comments", - "schema": "", "columns": { "id": { "name": "id", - "type": "serial", + "type": "integer", "primaryKey": true, - "notNull": true + "notNull": true, + "autoincrement": false + }, + "rkey": { + "name": "rkey", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false }, "cid": { "name": "cid", "type": "text", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false }, "post_id": { "name": "post_id", "type": "integer", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false }, "body": { "name": "body", - "type": "text", + "type": "text(10000)", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false }, "created_at": { "name": "created_at", - "type": "timestamp", + "type": "text", "primaryKey": false, "notNull": true, - "default": "now()" + "autoincrement": false, + "default": "(CURRENT_DATE)" }, "author_did": { "name": "author_did", "type": "text", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'live'" + }, + "parent_comment_id": { + "name": "parent_comment_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "comments_cid_unique": { + "name": "comments_cid_unique", + "columns": [ + "cid" + ], + "isUnique": true + }, + "comments_author_did_rkey_unique": { + "name": "comments_author_did_rkey_unique", + "columns": [ + "author_did", + "rkey" + ], + "isUnique": true } }, - "indexes": {}, "foreignKeys": { "comments_post_id_posts_id_fk": { "name": "comments_post_id_posts_id_fk", @@ -60,42 +142,96 @@ ], "onDelete": "no action", "onUpdate": "no action" + }, + "parent_comment_id_fkey": { + "name": "parent_comment_id_fkey", + "tableFrom": "comments", + "tableTo": "comments", + "columnsFrom": [ + "parent_comment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "public.comment_votes": { + "comment_votes": { "name": "comment_votes", - "schema": "", "columns": { "id": { "name": "id", - "type": "serial", + "type": "integer", "primaryKey": true, - "notNull": true + "notNull": true, + "autoincrement": false }, "comment_id": { "name": "comment_id", "type": "integer", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false }, "created_at": { "name": "created_at", - "type": "timestamp", + "type": "text", "primaryKey": false, "notNull": true, - "default": "now()" + "autoincrement": false, + "default": "(CURRENT_DATE)" }, "author_did": { "name": "author_did", "type": "text", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false + }, + "cid": { + "name": "cid", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "rkey": { + "name": "rkey", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "comment_votes_cid_unique": { + "name": "comment_votes_cid_unique", + "columns": [ + "cid" + ], + "isUnique": true + }, + "comment_votes_author_did_rkey_unique": { + "name": "comment_votes_author_did_rkey_unique", + "columns": [ + "author_did", + "rkey" + ], + "isUnique": true + }, + "comment_votes_author_did_comment_id_unique": { + "name": "comment_votes_author_did_comment_id_unique", + "columns": [ + "author_did", + "comment_id" + ], + "isUnique": true } }, - "indexes": {}, "foreignKeys": { "comment_votes_comment_id_comments_id_fk": { "name": "comment_votes_comment_id_comments_id_fk", @@ -114,84 +250,177 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "public.posts": { + "consumed_offsets": { + "name": "consumed_offsets", + "columns": { + "offset": { + "name": "offset", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "posts": { "name": "posts", - "schema": "", "columns": { "id": { "name": "id", - "type": "serial", + "type": "integer", "primaryKey": true, - "notNull": true + "notNull": true, + "autoincrement": false + }, + "rkey": { + "name": "rkey", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false }, "cid": { "name": "cid", "type": "text", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false }, "title": { "name": "title", - "type": "text", + "type": "text(300)", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false }, "url": { "name": "url", - "type": "text", + "type": "text(255)", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false }, "created_at": { "name": "created_at", - "type": "timestamp", + "type": "text", "primaryKey": false, "notNull": true, - "default": "now()" + "autoincrement": false, + "default": "(CURRENT_DATE)" }, "author_did": { "name": "author_did", "type": "text", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'live'" + } + }, + "indexes": { + "posts_cid_unique": { + "name": "posts_cid_unique", + "columns": [ + "cid" + ], + "isUnique": true + }, + "posts_author_did_rkey_unique": { + "name": "posts_author_did_rkey_unique", + "columns": [ + "author_did", + "rkey" + ], + "isUnique": true } }, - "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "public.post_votes": { + "post_votes": { "name": "post_votes", - "schema": "", "columns": { "id": { "name": "id", - "type": "serial", + "type": "integer", "primaryKey": true, - "notNull": true + "notNull": true, + "autoincrement": false }, "post_id": { "name": "post_id", "type": "integer", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false }, "created_at": { "name": "created_at", - "type": "timestamp", + "type": "text", "primaryKey": false, "notNull": true, - "default": "now()" + "autoincrement": false, + "default": "(CURRENT_DATE)" }, "author_did": { "name": "author_did", "type": "text", "primaryKey": false, - "notNull": true + "notNull": true, + "autoincrement": false + }, + "cid": { + "name": "cid", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "rkey": { + "name": "rkey", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "post_votes_cid_unique": { + "name": "post_votes_cid_unique", + "columns": [ + "cid" + ], + "isUnique": true + }, + "post_votes_author_did_rkey_unique": { + "name": "post_votes_author_did_rkey_unique", + "columns": [ + "author_did", + "rkey" + ], + "isUnique": true + }, + "post_votes_author_did_post_id_unique": { + "name": "post_votes_author_did_post_id_unique", + "columns": [ + "author_did", + "post_id" + ], + "isUnique": true } }, - "indexes": {}, "foreignKeys": { "post_votes_post_id_posts_id_fk": { "name": "post_votes_post_id_posts_id_fk", @@ -212,10 +441,12 @@ } }, "enums": {}, - "schemas": {}, "_meta": { - "columns": {}, "schemas": {}, - "tables": {} + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} } } \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0001_snapshot.json b/packages/frontpage/drizzle/meta/0001_snapshot.json deleted file mode 100644 index a5dd01b1..00000000 --- a/packages/frontpage/drizzle/meta/0001_snapshot.json +++ /dev/null @@ -1,258 +0,0 @@ -{ - "id": "41765f63-868a-467b-b267-b8e85339af72", - "prevId": "5e8e33d8-dde1-44fa-8f06-5d03c394551e", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0002_snapshot.json b/packages/frontpage/drizzle/meta/0002_snapshot.json deleted file mode 100644 index 6c4bdffa..00000000 --- a/packages/frontpage/drizzle/meta/0002_snapshot.json +++ /dev/null @@ -1,274 +0,0 @@ -{ - "id": "107d74e1-b7bb-41f1-bf31-6407d6f80d5b", - "prevId": "41765f63-868a-467b-b267-b8e85339af72", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0003_snapshot.json b/packages/frontpage/drizzle/meta/0003_snapshot.json deleted file mode 100644 index cb3dcb99..00000000 --- a/packages/frontpage/drizzle/meta/0003_snapshot.json +++ /dev/null @@ -1,303 +0,0 @@ -{ - "id": "0ebd0e60-5364-4fa5-88cc-8c409da515c8", - "prevId": "107d74e1-b7bb-41f1-bf31-6407d6f80d5b", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_rkey_unique": { - "name": "comments_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_rkey_unique": { - "name": "posts_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0004_snapshot.json b/packages/frontpage/drizzle/meta/0004_snapshot.json deleted file mode 100644 index fa24060d..00000000 --- a/packages/frontpage/drizzle/meta/0004_snapshot.json +++ /dev/null @@ -1,316 +0,0 @@ -{ - "id": "d7f95fd0-d64e-40c0-b8e1-6787505ca5b8", - "prevId": "0ebd0e60-5364-4fa5-88cc-8c409da515c8", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_rkey_unique": { - "name": "comments_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_rkey_unique": { - "name": "posts_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0005_snapshot.json b/packages/frontpage/drizzle/meta/0005_snapshot.json deleted file mode 100644 index 4c75b6bf..00000000 --- a/packages/frontpage/drizzle/meta/0005_snapshot.json +++ /dev/null @@ -1,370 +0,0 @@ -{ - "id": "268dc4a3-4d20-4012-9687-e8280d6897c4", - "prevId": "d7f95fd0-d64e-40c0-b8e1-6787505ca5b8", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_rkey_unique": { - "name": "comments_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comment_votes_cid_unique": { - "name": "comment_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comment_votes_rkey_unique": { - "name": "comment_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - } - } - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_rkey_unique": { - "name": "posts_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "post_votes_cid_unique": { - "name": "post_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "post_votes_rkey_unique": { - "name": "post_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0006_snapshot.json b/packages/frontpage/drizzle/meta/0006_snapshot.json deleted file mode 100644 index 949731e0..00000000 --- a/packages/frontpage/drizzle/meta/0006_snapshot.json +++ /dev/null @@ -1,386 +0,0 @@ -{ - "id": "1bfb5bf5-85f8-41f7-a5ca-d4f2edf85676", - "prevId": "268dc4a3-4d20-4012-9687-e8280d6897c4", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_rkey_unique": { - "name": "comments_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comment_votes_cid_unique": { - "name": "comment_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comment_votes_rkey_unique": { - "name": "comment_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comment_votes_author_did_rkey_unique": { - "name": "comment_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_rkey_unique": { - "name": "posts_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "post_votes_cid_unique": { - "name": "post_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "post_votes_rkey_unique": { - "name": "post_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "post_votes_author_did_rkey_unique": { - "name": "post_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0007_snapshot.json b/packages/frontpage/drizzle/meta/0007_snapshot.json deleted file mode 100644 index cca78208..00000000 --- a/packages/frontpage/drizzle/meta/0007_snapshot.json +++ /dev/null @@ -1,412 +0,0 @@ -{ - "id": "d32b923f-e206-4559-aeee-40b6bad22050", - "prevId": "1bfb5bf5-85f8-41f7-a5ca-d4f2edf85676", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_rkey_unique": { - "name": "comments_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comment_votes_cid_unique": { - "name": "comment_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comment_votes_rkey_unique": { - "name": "comment_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comment_votes_author_did_rkey_unique": { - "name": "comment_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_rkey_unique": { - "name": "posts_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "post_votes_cid_unique": { - "name": "post_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "post_votes_rkey_unique": { - "name": "post_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "post_votes_author_did_rkey_unique": { - "name": "post_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - } - }, - "enums": { - "public.submission_status": { - "name": "submission_status", - "schema": "public", - "values": [ - "live", - "deleted", - "moderator_hidden" - ] - } - }, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0008_snapshot.json b/packages/frontpage/drizzle/meta/0008_snapshot.json deleted file mode 100644 index 7174c7e6..00000000 --- a/packages/frontpage/drizzle/meta/0008_snapshot.json +++ /dev/null @@ -1,431 +0,0 @@ -{ - "id": "51abf310-f9c5-4375-893b-459711ca3a9a", - "prevId": "d32b923f-e206-4559-aeee-40b6bad22050", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - }, - "parent_comment_id": { - "name": "parent_comment_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "parent_comment_id_fkey": { - "name": "parent_comment_id_fkey", - "tableFrom": "comments", - "tableTo": "comments", - "columnsFrom": [ - "parent_comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_rkey_unique": { - "name": "comments_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comment_votes_cid_unique": { - "name": "comment_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comment_votes_rkey_unique": { - "name": "comment_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comment_votes_author_did_rkey_unique": { - "name": "comment_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_rkey_unique": { - "name": "posts_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "post_votes_cid_unique": { - "name": "post_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "post_votes_rkey_unique": { - "name": "post_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "post_votes_author_did_rkey_unique": { - "name": "post_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - } - }, - "enums": { - "public.submission_status": { - "name": "submission_status", - "schema": "public", - "values": [ - "live", - "deleted", - "moderator_hidden" - ] - } - }, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0009_snapshot.json b/packages/frontpage/drizzle/meta/0009_snapshot.json deleted file mode 100644 index 0c5f5619..00000000 --- a/packages/frontpage/drizzle/meta/0009_snapshot.json +++ /dev/null @@ -1,439 +0,0 @@ -{ - "id": "62c7b5c2-fbac-4b17-9045-9a1041b2dec1", - "prevId": "51abf310-f9c5-4375-893b-459711ca3a9a", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - }, - "parent_comment_id": { - "name": "parent_comment_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "parent_comment_id_fkey": { - "name": "parent_comment_id_fkey", - "tableFrom": "comments", - "tableTo": "comments", - "columnsFrom": [ - "parent_comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_rkey_unique": { - "name": "comments_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comments_author_did_rkey_unique": { - "name": "comments_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comment_votes_cid_unique": { - "name": "comment_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comment_votes_rkey_unique": { - "name": "comment_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "comment_votes_author_did_rkey_unique": { - "name": "comment_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_rkey_unique": { - "name": "posts_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "post_votes_cid_unique": { - "name": "post_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "post_votes_rkey_unique": { - "name": "post_votes_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "rkey" - ] - }, - "post_votes_author_did_rkey_unique": { - "name": "post_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - } - }, - "enums": { - "public.submission_status": { - "name": "submission_status", - "schema": "public", - "values": [ - "live", - "deleted", - "moderator_hidden" - ] - } - }, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0010_snapshot.json b/packages/frontpage/drizzle/meta/0010_snapshot.json deleted file mode 100644 index 25311f58..00000000 --- a/packages/frontpage/drizzle/meta/0010_snapshot.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "id": "97fd112c-986d-46a8-90b3-da880b4a9cd4", - "prevId": "62c7b5c2-fbac-4b17-9045-9a1041b2dec1", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - }, - "parent_comment_id": { - "name": "parent_comment_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "parent_comment_id_fkey": { - "name": "parent_comment_id_fkey", - "tableFrom": "comments", - "tableTo": "comments", - "columnsFrom": [ - "parent_comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comments_author_did_rkey_unique": { - "name": "comments_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comment_votes_cid_unique": { - "name": "comment_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comment_votes_author_did_rkey_unique": { - "name": "comment_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "posts_author_did_rkey_unique": { - "name": "posts_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "post_votes_cid_unique": { - "name": "post_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "post_votes_author_did_rkey_unique": { - "name": "post_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - } - }, - "enums": { - "public.submission_status": { - "name": "submission_status", - "schema": "public", - "values": [ - "live", - "deleted", - "moderator_hidden" - ] - } - }, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0011_snapshot.json b/packages/frontpage/drizzle/meta/0011_snapshot.json deleted file mode 100644 index f0cf8696..00000000 --- a/packages/frontpage/drizzle/meta/0011_snapshot.json +++ /dev/null @@ -1,419 +0,0 @@ -{ - "id": "92ae65f6-1660-45d4-87b1-230866b6938f", - "prevId": "97fd112c-986d-46a8-90b3-da880b4a9cd4", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "varchar(10000)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - }, - "parent_comment_id": { - "name": "parent_comment_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "parent_comment_id_fkey": { - "name": "parent_comment_id_fkey", - "tableFrom": "comments", - "tableTo": "comments", - "columnsFrom": [ - "parent_comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comments_author_did_rkey_unique": { - "name": "comments_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comment_votes_cid_unique": { - "name": "comment_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comment_votes_author_did_rkey_unique": { - "name": "comment_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(300)", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "posts_author_did_rkey_unique": { - "name": "posts_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "post_votes_cid_unique": { - "name": "post_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "post_votes_author_did_rkey_unique": { - "name": "post_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - } - }, - "enums": { - "public.submission_status": { - "name": "submission_status", - "schema": "public", - "values": [ - "live", - "deleted", - "moderator_hidden" - ] - } - }, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/0012_snapshot.json b/packages/frontpage/drizzle/meta/0012_snapshot.json deleted file mode 100644 index 174ddc53..00000000 --- a/packages/frontpage/drizzle/meta/0012_snapshot.json +++ /dev/null @@ -1,435 +0,0 @@ -{ - "id": "ddd970b0-60e4-4205-b314-5786984f89c3", - "prevId": "92ae65f6-1660-45d4-87b1-230866b6938f", - "version": "7", - "dialect": "postgresql", - "tables": { - "public.beta_users": { - "name": "beta_users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "did": { - "name": "did", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "beta_users_did_unique": { - "name": "beta_users_did_unique", - "nullsNotDistinct": false, - "columns": [ - "did" - ] - } - } - }, - "public.comments": { - "name": "comments", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "varchar(10000)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - }, - "parent_comment_id": { - "name": "parent_comment_id", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "comments_post_id_posts_id_fk": { - "name": "comments_post_id_posts_id_fk", - "tableFrom": "comments", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "parent_comment_id_fkey": { - "name": "parent_comment_id_fkey", - "tableFrom": "comments", - "tableTo": "comments", - "columnsFrom": [ - "parent_comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comments_cid_unique": { - "name": "comments_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comments_author_did_rkey_unique": { - "name": "comments_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.comment_votes": { - "name": "comment_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "comment_id": { - "name": "comment_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "comment_votes_comment_id_comments_id_fk": { - "name": "comment_votes_comment_id_comments_id_fk", - "tableFrom": "comment_votes", - "tableTo": "comments", - "columnsFrom": [ - "comment_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "comment_votes_cid_unique": { - "name": "comment_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "comment_votes_author_did_rkey_unique": { - "name": "comment_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - }, - "comment_votes_author_did_comment_id_unique": { - "name": "comment_votes_author_did_comment_id_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "comment_id" - ] - } - } - }, - "public.consumed_offsets": { - "name": "consumed_offsets", - "schema": "", - "columns": { - "offset": { - "name": "offset", - "type": "bigint", - "primaryKey": true, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "public.posts": { - "name": "posts", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "title": { - "name": "title", - "type": "varchar(300)", - "primaryKey": false, - "notNull": true - }, - "url": { - "name": "url", - "type": "varchar(255)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "submission_status", - "typeSchema": "public", - "primaryKey": false, - "notNull": false, - "default": "'live'" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "posts_cid_unique": { - "name": "posts_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "posts_author_did_rkey_unique": { - "name": "posts_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - } - } - }, - "public.post_votes": { - "name": "post_votes", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "serial", - "primaryKey": true, - "notNull": true - }, - "post_id": { - "name": "post_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "author_did": { - "name": "author_did", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "cid": { - "name": "cid", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rkey": { - "name": "rkey", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "post_votes_post_id_posts_id_fk": { - "name": "post_votes_post_id_posts_id_fk", - "tableFrom": "post_votes", - "tableTo": "posts", - "columnsFrom": [ - "post_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "post_votes_cid_unique": { - "name": "post_votes_cid_unique", - "nullsNotDistinct": false, - "columns": [ - "cid" - ] - }, - "post_votes_author_did_rkey_unique": { - "name": "post_votes_author_did_rkey_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "rkey" - ] - }, - "post_votes_author_did_post_id_unique": { - "name": "post_votes_author_did_post_id_unique", - "nullsNotDistinct": false, - "columns": [ - "author_did", - "post_id" - ] - } - } - } - }, - "enums": { - "public.submission_status": { - "name": "submission_status", - "schema": "public", - "values": [ - "live", - "deleted", - "moderator_hidden" - ] - } - }, - "schemas": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/packages/frontpage/drizzle/meta/_journal.json b/packages/frontpage/drizzle/meta/_journal.json index 541df139..e06a2c9b 100644 --- a/packages/frontpage/drizzle/meta/_journal.json +++ b/packages/frontpage/drizzle/meta/_journal.json @@ -1,96 +1,12 @@ { "version": "7", - "dialect": "postgresql", + "dialect": "sqlite", "entries": [ { "idx": 0, - "version": "7", - "when": 1718288572804, - "tag": "0000_numerous_imperial_guard", - "breakpoints": true - }, - { - "idx": 1, - "version": "7", - "when": 1718312518825, - "tag": "0001_nice_magma", - "breakpoints": true - }, - { - "idx": 2, - "version": "7", - "when": 1718316283733, - "tag": "0002_dizzy_juggernaut", - "breakpoints": true - }, - { - "idx": 3, - "version": "7", - "when": 1718358344831, - "tag": "0003_nervous_violations", - "breakpoints": true - }, - { - "idx": 4, - "version": "7", - "when": 1718358380881, - "tag": "0004_demonic_the_spike", - "breakpoints": true - }, - { - "idx": 5, - "version": "7", - "when": 1718645631396, - "tag": "0005_colorful_turbo", - "breakpoints": true - }, - { - "idx": 6, - "version": "7", - "when": 1718656372587, - "tag": "0006_short_adam_destine", - "breakpoints": true - }, - { - "idx": 7, - "version": "7", - "when": 1718662931500, - "tag": "0007_smiling_betty_ross", - "breakpoints": true - }, - { - "idx": 8, - "version": "7", - "when": 1718922181653, - "tag": "0008_oval_master_mold", - "breakpoints": true - }, - { - "idx": 9, - "version": "7", - "when": 1719050407535, - "tag": "0009_lying_zeigeist", - "breakpoints": true - }, - { - "idx": 10, - "version": "7", - "when": 1719351325903, - "tag": "0010_regular_roxanne_simpson", - "breakpoints": true - }, - { - "idx": 11, - "version": "7", - "when": 1719617343757, - "tag": "0011_wooden_mattie_franklin", - "breakpoints": true - }, - { - "idx": 12, - "version": "7", - "when": 1719674721438, - "tag": "0012_nebulous_vin_gonzales", + "version": "6", + "when": 1725040407942, + "tag": "0000_sturdy_rage", "breakpoints": true } ] diff --git a/packages/frontpage/lib/data/atproto/event.ts b/packages/frontpage/lib/data/atproto/event.ts index 1e352fd9..04fb4b01 100644 --- a/packages/frontpage/lib/data/atproto/event.ts +++ b/packages/frontpage/lib/data/atproto/event.ts @@ -57,7 +57,12 @@ export const Commit = z.object({ repo: z.string().refine(isDid), seq: z.string().transform((x, ctx) => { try { - return BigInt(x); + const n = parseInt(x); + if (isNaN(n)) { + throw new Error("Invalid BigInt"); + } + + return parseInt(x); } catch (_e) { ctx.addIssue({ code: z.ZodIssueCode.custom, diff --git a/packages/frontpage/lib/data/db/comment.ts b/packages/frontpage/lib/data/db/comment.ts index c515d108..c51c058c 100644 --- a/packages/frontpage/lib/data/db/comment.ts +++ b/packages/frontpage/lib/data/db/comment.ts @@ -64,16 +64,12 @@ export const getCommentsForPost = cache(async (postId: number) => { .as("vote"); const commentRank = sql` - coalesce(${votes.voteCount}, 1) / ( - -- Age - ( - EXTRACT( - EPOCH - FROM - (CURRENT_TIMESTAMP - ${schema.Comment.createdAt}) - ) / 3600 - ) + 2 - ) ^ 1.8 + CAST(COALESCE(${votes.voteCount}, 1) AS REAL) / ( + pow( + (JULIANDAY('now') - JULIANDAY(${schema.Comment.createdAt})) * 24 + 2, + 1.8 + ) + ) ` .mapWith(Number) .as("rank"); diff --git a/packages/frontpage/lib/data/db/post.ts b/packages/frontpage/lib/data/db/post.ts index 25c6a2fb..21f2322c 100644 --- a/packages/frontpage/lib/data/db/post.ts +++ b/packages/frontpage/lib/data/db/post.ts @@ -1,6 +1,6 @@ import "server-only"; -import { cache } from "react"; +import { cache } from "react"; import { db } from "@/lib/db"; import { eq, sql, count, desc, and } from "drizzle-orm"; import * as schema from "@/lib/schema"; @@ -42,18 +42,14 @@ const commentCountSubQuery = db export const getFrontpagePosts = cache(async () => { // This ranking is very naive. I believe it'll need to consider every row in the table even if you limit the results. // We should closely monitor this and consider alternatives if it gets slow over time - const rank = sql` - coalesce(${votesSubQuery.voteCount}, 1) / ( - -- Age - ( - EXTRACT( - EPOCH - FROM - (CURRENT_TIMESTAMP - ${schema.Post.createdAt}) - ) / 3600 - ) + 2 - ) ^ 1.8 - `.as("rank"); + const rank = sql` + CAST(COALESCE(${votesSubQuery.voteCount}, 1) AS REAL) / ( + pow( + (JULIANDAY('now') - JULIANDAY(${schema.Post.createdAt})) * 24 + 2, + 1.8 + ) + ) +`.as("rank"); const userHasVoted = await buildUserHasVotedQuery(); @@ -183,7 +179,7 @@ type CreatePostInput = { authorDid: DID; rkey: string; cid: string; - offset: bigint; + offset: number; }; export async function unauthed_createPost({ @@ -248,7 +244,7 @@ export async function unauthed_createPost({ type DeletePostInput = { rkey: string; - offset: bigint; + offset: number; }; export async function unauthed_deletePost({ rkey, offset }: DeletePostInput) { diff --git a/packages/frontpage/lib/db.ts b/packages/frontpage/lib/db.ts index 53069486..5e60c49b 100644 --- a/packages/frontpage/lib/db.ts +++ b/packages/frontpage/lib/db.ts @@ -1,6 +1,15 @@ import "server-only"; -import { sql } from "@vercel/postgres"; -import { drizzle } from "drizzle-orm/vercel-postgres"; + +import { loadEnvConfig } from "@next/env"; +import { drizzle } from "drizzle-orm/libsql"; +import { createClient } from "@libsql/client"; import * as schema from "./schema"; -export const db = drizzle(sql, { schema }); +loadEnvConfig(process.cwd()); + +const client = createClient({ + url: process.env.TURSO_CONNECTION_URL!, + authToken: process.env.TURSO_AUTH_TOKEN!, +}); + +export const db = drizzle(client, { schema }); diff --git a/packages/frontpage/lib/schema.ts b/packages/frontpage/lib/schema.ts index c1df021b..59c27395 100644 --- a/packages/frontpage/lib/schema.ts +++ b/packages/frontpage/lib/schema.ts @@ -1,16 +1,12 @@ +import { sql } from "drizzle-orm"; import { + sqliteTable, text, - pgTable, - serial, integer, - timestamp, - bigint, + customType, unique, - pgEnum, foreignKey, - customType, - varchar, -} from "drizzle-orm/pg-core"; +} from "drizzle-orm/sqlite-core"; import type { DID } from "./data/atproto/did"; import { MAX_COMMENT_LENGTH, @@ -24,42 +20,51 @@ const did = customType<{ data: DID }>({ }, }); -export const submissionStatus = pgEnum("submission_status", [ - "live", - "deleted", - "moderator_hidden", -]); +const dateIsoText = customType<{ data: Date; driverData: string }>({ + dataType() { + return "text"; + }, + toDriver: (value) => value.toISOString(), + fromDriver: (value) => new Date(value), +}); + +const createStatusColumn = (col: string) => + text(col, { enum: ["live", "deleted", "moderator_hidden"] }).default("live"); -export const Post = pgTable( +export const Post = sqliteTable( "posts", { - id: serial("id").primaryKey(), + id: integer("id").primaryKey(), rkey: text("rkey").notNull(), cid: text("cid").notNull().unique(), - title: varchar("title", { + title: text("title", { length: MAX_POST_TITLE_LENGTH, }).notNull(), - url: varchar("url", { + url: text("url", { length: MAX_POST_URL_LENGTH, }).notNull(), - createdAt: timestamp("created_at").notNull().defaultNow(), + createdAt: dateIsoText("created_at") + .default(sql`(CURRENT_DATE)`) + .notNull(), authorDid: did("author_did").notNull(), // TODO: add notNull once this is rolled out - status: submissionStatus("status").default("live"), + status: createStatusColumn("status"), }, (t) => ({ unique_author_rkey: unique().on(t.authorDid, t.rkey), }), ); -export const PostVote = pgTable( +export const PostVote = sqliteTable( "post_votes", { - id: serial("id").primaryKey(), + id: integer("id").primaryKey(), postId: integer("post_id") .notNull() .references(() => Post.id), - createdAt: timestamp("created_at").notNull().defaultNow(), + createdAt: dateIsoText("created_at") + .default(sql`(CURRENT_DATE)`) + .notNull(), authorDid: did("author_did").notNull(), cid: text("cid").notNull().unique(), rkey: text("rkey").notNull(), @@ -71,22 +76,24 @@ export const PostVote = pgTable( }), ); -export const Comment = pgTable( +export const Comment = sqliteTable( "comments", { - id: serial("id").primaryKey(), + id: integer("id").primaryKey(), rkey: text("rkey").notNull(), cid: text("cid").notNull().unique(), postId: integer("post_id") .notNull() .references(() => Post.id), - body: varchar("body", { + body: text("body", { length: MAX_COMMENT_LENGTH, }).notNull(), - createdAt: timestamp("created_at").notNull().defaultNow(), + createdAt: dateIsoText("created_at") + .default(sql`(CURRENT_DATE)`) + .notNull(), authorDid: did("author_did").notNull(), // TODO: add notNull once this is rolled out - status: submissionStatus("status").default("live"), + status: createStatusColumn("status"), parentCommentId: integer("parent_comment_id"), }, (t) => ({ @@ -99,14 +106,16 @@ export const Comment = pgTable( }), ); -export const CommentVote = pgTable( +export const CommentVote = sqliteTable( "comment_votes", { - id: serial("id").primaryKey(), + id: integer("id").primaryKey(), commentId: integer("comment_id") .notNull() .references(() => Comment.id), - createdAt: timestamp("created_at").notNull().defaultNow(), + createdAt: dateIsoText("created_at") + .default(sql`(CURRENT_DATE)`) + .notNull(), authorDid: did("author_did").notNull(), cid: text("cid").notNull().unique(), rkey: text("rkey").notNull(), @@ -118,14 +127,14 @@ export const CommentVote = pgTable( }), ); -export const BetaUser = pgTable("beta_users", { - id: serial("id").primaryKey(), - createdAt: timestamp("created_at").notNull().defaultNow(), +export const BetaUser = sqliteTable("beta_users", { + id: integer("id").primaryKey(), + createdAt: dateIsoText("created_at") + .default(sql`(CURRENT_DATE)`) + .notNull(), did: did("did").notNull().unique(), }); -export const ConsumedOffset = pgTable("consumed_offsets", { - offset: bigint("offset", { - mode: "bigint", - }).primaryKey(), +export const ConsumedOffset = sqliteTable("consumed_offsets", { + offset: integer("offset").primaryKey(), }); diff --git a/packages/frontpage/package.json b/packages/frontpage/package.json index 0bb8533b..04481cdd 100644 --- a/packages/frontpage/package.json +++ b/packages/frontpage/package.json @@ -12,6 +12,7 @@ "test": "vitest" }, "dependencies": { + "@libsql/client": "^0.9.0", "@next/env": "^14.2.4", "@radix-ui/react-alert-dialog": "^1.1.1", "@radix-ui/react-avatar": "^1.1.0", @@ -25,7 +26,6 @@ "@radix-ui/react-toast": "^1.2.1", "@radix-ui/react-tooltip": "^1.1.1", "@vercel/analytics": "^1.3.1", - "@vercel/postgres": "^0.8.0", "@vercel/speed-insights": "^1.0.12", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f885f11c..949e439d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,6 +102,9 @@ importers: packages/frontpage: dependencies: + '@libsql/client': + specifier: ^0.9.0 + version: 0.9.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) '@next/env': specifier: ^14.2.4 version: 14.2.4 @@ -141,9 +144,6 @@ importers: '@vercel/analytics': specifier: ^1.3.1 version: 1.3.1(next@15.0.0-rc.0(@babel/core@7.24.7)(babel-plugin-react-compiler@0.0.0-experimental-334f00b-20240725)(react-dom@19.0.0-rc-f994737d14-20240522(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522) - '@vercel/postgres': - specifier: ^0.8.0 - version: 0.8.0 '@vercel/speed-insights': specifier: ^1.0.12 version: 1.0.12(next@15.0.0-rc.0(@babel/core@7.24.7)(babel-plugin-react-compiler@0.0.0-experimental-334f00b-20240725)(react-dom@19.0.0-rc-f994737d14-20240522(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522) @@ -158,7 +158,7 @@ importers: version: 3.6.0 drizzle-orm: specifier: ^0.31.2 - version: 0.31.2(@neondatabase/serverless@0.7.2)(@types/better-sqlite3@7.6.10)(@types/pg@8.6.6)(@types/react@18.3.3)(@vercel/postgres@0.8.0)(better-sqlite3@11.0.0)(kysely@0.22.0)(react@19.0.0-rc-f994737d14-20240522) + version: 0.31.2(@libsql/client@0.9.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))(@neondatabase/serverless@0.7.2)(@types/better-sqlite3@7.6.10)(@types/pg@8.6.6)(@types/react@18.3.3)(@vercel/postgres@0.8.0)(better-sqlite3@11.0.0)(kysely@0.22.0)(react@19.0.0-rc-f994737d14-20240522) jose: specifier: ^5.4.0 version: 5.4.0 @@ -1373,6 +1373,92 @@ packages: '@jridgewell/trace-mapping@0.3.25': resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@libsql/client@0.9.0': + resolution: {integrity: sha512-mT+91wtb8pxK9SWd566D5W2VUCemksUMqICRBtf0WXiS7XzNcQhWyrwYOnVrVmTSze/SCCsNNEKIkCRwk/pr2Q==} + + '@libsql/core@0.9.0': + resolution: {integrity: sha512-rCsS/EC32K8ARjDQJGqauGZmkR6orOOY4I7898PyQ/mmltAkMwRgz5kjEmYRZ42o7mP0ayJfbw28qgv7SRFEgg==} + + '@libsql/darwin-arm64@0.3.19': + resolution: {integrity: sha512-rmOqsLcDI65zzxlUOoEiPJLhqmbFsZF6p4UJQ2kMqB+Kc0Rt5/A1OAdOZ/Wo8fQfJWjR1IbkbpEINFioyKf+nQ==} + cpu: [arm64] + os: [darwin] + + '@libsql/darwin-arm64@0.4.1': + resolution: {integrity: sha512-XICT9/OyU8Aa9Iv1xZIHgvM09n/1OQUk3VC+s5uavzdiGHrDMkOWzN47JN7/FiMa/NWrcgoEiDMk3+e7mE53Ig==} + cpu: [arm64] + os: [darwin] + + '@libsql/darwin-x64@0.3.19': + resolution: {integrity: sha512-q9O55B646zU+644SMmOQL3FIfpmEvdWpRpzubwFc2trsa+zoBlSkHuzU9v/C+UNoPHQVRMP7KQctJ455I/h/xw==} + cpu: [x64] + os: [darwin] + + '@libsql/darwin-x64@0.4.1': + resolution: {integrity: sha512-pSKxhRrhu4SsTD+IBRZXcs1SkwMdeAG1tv6Z/Ctp/sOEYrgkU8MDKLqkOr9NsmwpK4S0+JdwjkLMyhTkct/5TQ==} + cpu: [x64] + os: [darwin] + + '@libsql/hrana-client@0.6.2': + resolution: {integrity: sha512-MWxgD7mXLNf9FXXiM0bc90wCjZSpErWKr5mGza7ERy2FJNNMXd7JIOv+DepBA1FQTIfI8TFO4/QDYgaQC0goNw==} + + '@libsql/isomorphic-fetch@0.2.5': + resolution: {integrity: sha512-8s/B2TClEHms2yb+JGpsVRTPBfy1ih/Pq6h6gvyaNcYnMVJvgQRY7wAa8U2nD0dppbCuDU5evTNMEhrQ17ZKKg==} + engines: {node: '>=18.0.0'} + + '@libsql/isomorphic-ws@0.1.5': + resolution: {integrity: sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg==} + + '@libsql/linux-arm64-gnu@0.3.19': + resolution: {integrity: sha512-mgeAUU1oqqh57k7I3cQyU6Trpdsdt607eFyEmH5QO7dv303ti+LjUvh1pp21QWV6WX7wZyjeJV1/VzEImB+jRg==} + cpu: [arm64] + os: [linux] + + '@libsql/linux-arm64-gnu@0.4.1': + resolution: {integrity: sha512-9lpvb24tO2qZd9nq5dlq3ESA3hSKYWBIK7lJjfiCM6f7a70AUwBY9QoPJV9q4gILIyVnR1YBGrlm50nnb+dYgw==} + cpu: [arm64] + os: [linux] + + '@libsql/linux-arm64-musl@0.3.19': + resolution: {integrity: sha512-VEZtxghyK6zwGzU9PHohvNxthruSxBEnRrX7BSL5jQ62tN4n2JNepJ6SdzXp70pdzTfwroOj/eMwiPt94gkVRg==} + cpu: [arm64] + os: [linux] + + '@libsql/linux-arm64-musl@0.4.1': + resolution: {integrity: sha512-lyxi+lFxE+NcBRDMQCxCtDg3c4WcKAbc9u63d5+B23Vm+UgphD9XY4seu+tGrBy1MU2tuNVix7r9S7ECpAaVrA==} + cpu: [arm64] + os: [linux] + + '@libsql/linux-x64-gnu@0.3.19': + resolution: {integrity: sha512-2t/J7LD5w2f63wGihEO+0GxfTyYIyLGEvTFEsMO16XI5o7IS9vcSHrxsvAJs4w2Pf907uDjmc7fUfMg6L82BrQ==} + cpu: [x64] + os: [linux] + + '@libsql/linux-x64-gnu@0.4.1': + resolution: {integrity: sha512-psvuQ3UFBEmDFV8ZHG+WkUHIJiWv+elZ+zIPvOVedlIKdxG1O+8WthWUAhFHOGnbiyzc4sAZ4c3de1oCvyHxyQ==} + cpu: [x64] + os: [linux] + + '@libsql/linux-x64-musl@0.3.19': + resolution: {integrity: sha512-BLsXyJaL8gZD8+3W2LU08lDEd9MIgGds0yPy5iNPp8tfhXx3pV/Fge2GErN0FC+nzt4DYQtjL+A9GUMglQefXQ==} + cpu: [x64] + os: [linux] + + '@libsql/linux-x64-musl@0.4.1': + resolution: {integrity: sha512-PDidJ3AhGDqosGg3OAZzGxMFIbnuOALya4BoezJKl667AFv3x7BBQ30H81Mngsq3Fh8RkJkXSdWfL91+Txb1iA==} + cpu: [x64] + os: [linux] + + '@libsql/win32-x64-msvc@0.3.19': + resolution: {integrity: sha512-ay1X9AobE4BpzG0XPw1gplyLZPGHIgJOovvW23gUrukRegiUP62uzhpRbKNogLlUOynyXeq//prHgPXiebUfWg==} + cpu: [x64] + os: [win32] + + '@libsql/win32-x64-msvc@0.4.1': + resolution: {integrity: sha512-IdODVqV/PrdOnHA/004uWyorZQuRsB7U7bCRCE3vXgABj3eJLJGc6cv2C6ksEaEoVxJbD8k53H4VVAGrtYwXzQ==} + cpu: [x64] + os: [win32] + '@markdoc/markdoc@0.4.0': resolution: {integrity: sha512-fSh4P3Y4E7oaKYc2oNzSIJVPDto7SMzAuQN1Iyx53UxzleA6QzRdNWRxmiPqtVDaDi5dELd2yICoG91csrGrAw==} engines: {node: '>=14.7.0'} @@ -1391,6 +1477,9 @@ packages: '@microsoft/tsdoc@0.14.2': resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} + '@neon-rs/load@0.0.4': + resolution: {integrity: sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==} + '@neondatabase/serverless@0.7.2': resolution: {integrity: sha512-wU3WA2uTyNO7wjPs3Mg0G01jztAxUxzd9/mskMmtPwPTjf7JKWi9AW5/puOGXLxmZ9PVgRFeBVRVYq5nBPhsCg==} @@ -2262,6 +2351,9 @@ packages: '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} + '@types/ws@8.5.12': + resolution: {integrity: sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==} + '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} @@ -2887,6 +2979,10 @@ packages: damerau-levenshtein@1.0.8: resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} + data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + data-urls@5.0.0: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} @@ -2989,6 +3085,10 @@ packages: resolution: {integrity: sha512-Mc7QhQ8s+cLrnUfU/Ji94vG/r8M26m8f++vyres4ZoojaRDpZ1eSIh/EpzLNwlWuvzSZ3UbDFspjFvTDXe6e/g==} engines: {node: '>=12.20'} + detect-libc@2.0.2: + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} + engines: {node: '>=8'} + detect-libc@2.0.3: resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} engines: {node: '>=8'} @@ -3506,6 +3606,10 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + file-entry-cache@6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -3560,6 +3664,10 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} + formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -4002,6 +4110,9 @@ packages: jose@5.4.0: resolution: {integrity: sha512-6rpxTHPAQyWMb9A35BroFl1Sp0ST3DpPcm5EVIxZxdH+e0Hv9fwhyB3XLKFUcHNpdSDnETmBfuPPTTlYz5+USw==} + js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -4082,6 +4193,14 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + libsql@0.3.19: + resolution: {integrity: sha512-Aj5cQ5uk/6fHdmeW0TiXK42FqUlwx7ytmMLPSaUQPin5HKKKuUPD62MAbN4OEweGBBI7q1BekoEN4gPUEL6MZA==} + os: [darwin, linux, win32] + + libsql@0.4.1: + resolution: {integrity: sha512-qZlR9Yu1zMBeLChzkE/cKfoKV3Esp9cn9Vx5Zirn4AVhDWPcjYhKwbtJcMuHehgk3mH+fJr9qW+3vesBWbQpBg==} + os: [darwin, linux, win32] + lilconfig@2.1.0: resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} engines: {node: '>=10'} @@ -4291,6 +4410,14 @@ packages: node-addon-api@6.1.0: resolution: {integrity: sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==} + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + node-gyp-build-optional-packages@5.1.1: resolution: {integrity: sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw==} hasBin: true @@ -4644,6 +4771,9 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} + promise-limit@2.7.0: + resolution: {integrity: sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw==} + prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -5537,6 +5667,10 @@ packages: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'} + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + webidl-conversions@7.0.0: resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} engines: {node: '>=12'} @@ -5933,8 +6067,8 @@ snapshots: dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sso-oidc': 3.588.0(@aws-sdk/client-sts@3.588.0) - '@aws-sdk/client-sts': 3.588.0 + '@aws-sdk/client-sso-oidc': 3.588.0 + '@aws-sdk/client-sts': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0) '@aws-sdk/core': 3.588.0 '@aws-sdk/credential-provider-node': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0)(@aws-sdk/client-sts@3.588.0) '@aws-sdk/middleware-host-header': 3.577.0 @@ -5982,8 +6116,8 @@ snapshots: dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sso-oidc': 3.588.0(@aws-sdk/client-sts@3.588.0) - '@aws-sdk/client-sts': 3.588.0 + '@aws-sdk/client-sso-oidc': 3.588.0 + '@aws-sdk/client-sts': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0) '@aws-sdk/core': 3.588.0 '@aws-sdk/credential-provider-node': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0)(@aws-sdk/client-sts@3.588.0) '@aws-sdk/middleware-host-header': 3.577.0 @@ -6029,8 +6163,8 @@ snapshots: '@aws-crypto/sha1-browser': 3.0.0 '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sso-oidc': 3.588.0(@aws-sdk/client-sts@3.588.0) - '@aws-sdk/client-sts': 3.588.0 + '@aws-sdk/client-sso-oidc': 3.588.0 + '@aws-sdk/client-sts': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0) '@aws-sdk/core': 3.588.0 '@aws-sdk/credential-provider-node': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0)(@aws-sdk/client-sts@3.588.0) '@aws-sdk/middleware-bucket-endpoint': 3.587.0 @@ -6087,11 +6221,11 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sso-oidc@3.588.0(@aws-sdk/client-sts@3.588.0)': + '@aws-sdk/client-sso-oidc@3.588.0': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sts': 3.588.0 + '@aws-sdk/client-sts': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0) '@aws-sdk/core': 3.588.0 '@aws-sdk/credential-provider-node': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0)(@aws-sdk/client-sts@3.588.0) '@aws-sdk/middleware-host-header': 3.577.0 @@ -6130,7 +6264,6 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.2 transitivePeerDependencies: - - '@aws-sdk/client-sts' - aws-crt '@aws-sdk/client-sso@3.588.0': @@ -6176,11 +6309,11 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sts@3.588.0': + '@aws-sdk/client-sts@3.588.0(@aws-sdk/client-sso-oidc@3.588.0)': dependencies: '@aws-crypto/sha256-browser': 3.0.0 '@aws-crypto/sha256-js': 3.0.0 - '@aws-sdk/client-sso-oidc': 3.588.0(@aws-sdk/client-sts@3.588.0) + '@aws-sdk/client-sso-oidc': 3.588.0 '@aws-sdk/core': 3.588.0 '@aws-sdk/credential-provider-node': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0)(@aws-sdk/client-sts@3.588.0) '@aws-sdk/middleware-host-header': 3.577.0 @@ -6219,6 +6352,7 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.6.2 transitivePeerDependencies: + - '@aws-sdk/client-sso-oidc' - aws-crt '@aws-sdk/core@3.588.0': @@ -6252,7 +6386,7 @@ snapshots: '@aws-sdk/credential-provider-ini@3.588.0(@aws-sdk/client-sso-oidc@3.588.0)(@aws-sdk/client-sts@3.588.0)': dependencies: - '@aws-sdk/client-sts': 3.588.0 + '@aws-sdk/client-sts': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0) '@aws-sdk/credential-provider-env': 3.587.0 '@aws-sdk/credential-provider-http': 3.587.0 '@aws-sdk/credential-provider-process': 3.587.0 @@ -6310,7 +6444,7 @@ snapshots: '@aws-sdk/credential-provider-web-identity@3.587.0(@aws-sdk/client-sts@3.588.0)': dependencies: - '@aws-sdk/client-sts': 3.588.0 + '@aws-sdk/client-sts': 3.588.0(@aws-sdk/client-sso-oidc@3.588.0) '@aws-sdk/types': 3.577.0 '@smithy/property-provider': 3.1.0 '@smithy/types': 3.0.0 @@ -6437,7 +6571,7 @@ snapshots: '@aws-sdk/token-providers@3.587.0(@aws-sdk/client-sso-oidc@3.588.0)': dependencies: - '@aws-sdk/client-sso-oidc': 3.588.0(@aws-sdk/client-sts@3.588.0) + '@aws-sdk/client-sso-oidc': 3.588.0 '@aws-sdk/types': 3.577.0 '@smithy/property-provider': 3.1.0 '@smithy/shared-ini-file-loader': 3.1.0 @@ -7127,6 +7261,83 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.4.15 + '@libsql/client@0.9.0(bufferutil@4.0.8)(utf-8-validate@6.0.3)': + dependencies: + '@libsql/core': 0.9.0 + '@libsql/hrana-client': 0.6.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) + js-base64: 3.7.7 + libsql: 0.4.1 + promise-limit: 2.7.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@libsql/core@0.9.0': + dependencies: + js-base64: 3.7.7 + + '@libsql/darwin-arm64@0.3.19': + optional: true + + '@libsql/darwin-arm64@0.4.1': + optional: true + + '@libsql/darwin-x64@0.3.19': + optional: true + + '@libsql/darwin-x64@0.4.1': + optional: true + + '@libsql/hrana-client@0.6.2(bufferutil@4.0.8)(utf-8-validate@6.0.3)': + dependencies: + '@libsql/isomorphic-fetch': 0.2.5 + '@libsql/isomorphic-ws': 0.1.5(bufferutil@4.0.8)(utf-8-validate@6.0.3) + js-base64: 3.7.7 + node-fetch: 3.3.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@libsql/isomorphic-fetch@0.2.5': {} + + '@libsql/isomorphic-ws@0.1.5(bufferutil@4.0.8)(utf-8-validate@6.0.3)': + dependencies: + '@types/ws': 8.5.12 + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@libsql/linux-arm64-gnu@0.3.19': + optional: true + + '@libsql/linux-arm64-gnu@0.4.1': + optional: true + + '@libsql/linux-arm64-musl@0.3.19': + optional: true + + '@libsql/linux-arm64-musl@0.4.1': + optional: true + + '@libsql/linux-x64-gnu@0.3.19': + optional: true + + '@libsql/linux-x64-gnu@0.4.1': + optional: true + + '@libsql/linux-x64-musl@0.3.19': + optional: true + + '@libsql/linux-x64-musl@0.4.1': + optional: true + + '@libsql/win32-x64-msvc@0.3.19': + optional: true + + '@libsql/win32-x64-msvc@0.4.1': + optional: true + '@markdoc/markdoc@0.4.0(@types/react@18.3.3)(react@19.0.0-rc-3563387fe3-20240621)': optionalDependencies: '@types/markdown-it': 12.2.3 @@ -7142,9 +7353,12 @@ snapshots: '@microsoft/tsdoc@0.14.2': {} + '@neon-rs/load@0.0.4': {} + '@neondatabase/serverless@0.7.2': dependencies: '@types/pg': 8.6.6 + optional: true '@next/env@14.2.4': {} @@ -8083,6 +8297,7 @@ snapshots: '@types/node': 20.13.0 pg-protocol: 1.6.1 pg-types: 2.2.0 + optional: true '@types/prop-types@15.7.12': {} @@ -8097,6 +8312,10 @@ snapshots: '@types/semver@7.5.8': {} + '@types/ws@8.5.12': + dependencies: + '@types/node': 20.13.0 + '@types/yargs-parser@21.0.3': {} '@types/yargs@13.0.12': @@ -8308,6 +8527,7 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 6.0.3 ws: 8.14.2(bufferutil@4.0.8)(utf-8-validate@6.0.3) + optional: true '@vercel/speed-insights@1.0.12(next@15.0.0-rc.0(@babel/core@7.24.7)(babel-plugin-react-compiler@0.0.0-experimental-334f00b-20240725)(react-dom@19.0.0-rc-f994737d14-20240522(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522))(react@19.0.0-rc-f994737d14-20240522)': optionalDependencies: @@ -8702,6 +8922,7 @@ snapshots: bufferutil@4.0.8: dependencies: node-gyp-build: 4.8.1 + optional: true builtin-modules@3.3.0: {} @@ -8883,6 +9104,8 @@ snapshots: damerau-levenshtein@1.0.8: {} + data-uri-to-buffer@4.0.1: {} + data-urls@5.0.0: dependencies: whatwg-mimetype: 4.0.0 @@ -8960,6 +9183,8 @@ snapshots: detect-indent@7.0.1: {} + detect-libc@2.0.2: {} + detect-libc@2.0.3: {} detect-newline@4.0.1: {} @@ -9014,8 +9239,9 @@ snapshots: transitivePeerDependencies: - supports-color - drizzle-orm@0.31.2(@neondatabase/serverless@0.7.2)(@types/better-sqlite3@7.6.10)(@types/pg@8.6.6)(@types/react@18.3.3)(@vercel/postgres@0.8.0)(better-sqlite3@11.0.0)(kysely@0.22.0)(react@19.0.0-rc-f994737d14-20240522): + drizzle-orm@0.31.2(@libsql/client@0.9.0(bufferutil@4.0.8)(utf-8-validate@6.0.3))(@neondatabase/serverless@0.7.2)(@types/better-sqlite3@7.6.10)(@types/pg@8.6.6)(@types/react@18.3.3)(@vercel/postgres@0.8.0)(better-sqlite3@11.0.0)(kysely@0.22.0)(react@19.0.0-rc-f994737d14-20240522): optionalDependencies: + '@libsql/client': 0.9.0(bufferutil@4.0.8)(utf-8-validate@6.0.3) '@neondatabase/serverless': 0.7.2 '@types/better-sqlite3': 7.6.10 '@types/pg': 8.6.6 @@ -9255,8 +9481,8 @@ snapshots: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-react: 7.34.2(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -9291,8 +9517,8 @@ snapshots: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-react: 7.34.2(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -9340,6 +9566,23 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 4.3.5 + enhanced-resolve: 5.16.1 + eslint: 8.57.0 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + fast-glob: 3.3.2 + get-tsconfig: 4.7.5 + is-core-module: 2.13.1 + is-glob: 4.0.3 + transitivePeerDependencies: + - '@typescript-eslint/parser' + - eslint-import-resolver-node + - eslint-import-resolver-webpack + - supports-color + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): dependencies: debug: 4.3.5 @@ -9357,13 +9600,13 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 4.3.5 enhanced-resolve: 5.16.1 eslint: 8.57.0 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) fast-glob: 3.3.2 get-tsconfig: 4.7.5 is-core-module: 2.13.1 @@ -9385,6 +9628,17 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 @@ -9396,14 +9650,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0): + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.2) eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0) transitivePeerDependencies: - supports-color @@ -9440,6 +9694,33 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.13.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.4.5) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.4.5))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0): dependencies: array-includes: 3.1.8 @@ -9467,6 +9748,33 @@ snapshots: - eslint-import-resolver-webpack - supports-color + eslint-plugin-import@2.29.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0): + dependencies: + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@7.2.0(eslint@8.57.0)(typescript@5.5.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0) + hasown: 2.0.2 + is-core-module: 2.13.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 7.2.0(eslint@8.57.0)(typescript@5.5.2) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + eslint-plugin-jest@27.9.0(@typescript-eslint/eslint-plugin@7.14.1(@typescript-eslint/parser@7.14.1(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2))(eslint@8.57.0)(typescript@5.5.2): dependencies: '@typescript-eslint/utils': 5.62.0(eslint@8.57.0)(typescript@5.5.2) @@ -9766,6 +10074,11 @@ snapshots: dependencies: reusify: 1.0.4 + fetch-blob@3.2.0: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + file-entry-cache@6.0.1: dependencies: flat-cache: 3.2.0 @@ -9829,6 +10142,10 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + formdata-polyfill@4.0.10: + dependencies: + fetch-blob: 3.2.0 + forwarded@0.2.0: {} fresh@0.5.2: {} @@ -10276,6 +10593,8 @@ snapshots: jose@5.4.0: {} + js-base64@3.7.7: {} + js-tokens@4.0.0: {} js-yaml@4.1.0: @@ -10365,6 +10684,33 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + libsql@0.3.19: + dependencies: + '@neon-rs/load': 0.0.4 + detect-libc: 2.0.2 + optionalDependencies: + '@libsql/darwin-arm64': 0.3.19 + '@libsql/darwin-x64': 0.3.19 + '@libsql/linux-arm64-gnu': 0.3.19 + '@libsql/linux-arm64-musl': 0.3.19 + '@libsql/linux-x64-gnu': 0.3.19 + '@libsql/linux-x64-musl': 0.3.19 + '@libsql/win32-x64-msvc': 0.3.19 + + libsql@0.4.1: + dependencies: + '@neon-rs/load': 0.0.4 + detect-libc: 2.0.2 + libsql: 0.3.19 + optionalDependencies: + '@libsql/darwin-arm64': 0.4.1 + '@libsql/darwin-x64': 0.4.1 + '@libsql/linux-arm64-gnu': 0.4.1 + '@libsql/linux-arm64-musl': 0.4.1 + '@libsql/linux-x64-gnu': 0.4.1 + '@libsql/linux-x64-musl': 0.4.1 + '@libsql/win32-x64-msvc': 0.4.1 + lilconfig@2.1.0: {} lilconfig@3.1.1: {} @@ -10559,12 +10905,21 @@ snapshots: node-addon-api@6.1.0: {} + node-domexception@1.0.0: {} + + node-fetch@3.3.2: + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + node-gyp-build-optional-packages@5.1.1: dependencies: detect-libc: 2.0.3 optional: true - node-gyp-build@4.8.1: {} + node-gyp-build@4.8.1: + optional: true node-releases@2.0.14: {} @@ -10739,9 +11094,11 @@ snapshots: peek-readable@4.1.0: {} - pg-int8@1.0.1: {} + pg-int8@1.0.1: + optional: true - pg-protocol@1.6.1: {} + pg-protocol@1.6.1: + optional: true pg-types@2.2.0: dependencies: @@ -10750,6 +11107,7 @@ snapshots: postgres-bytea: 1.0.0 postgres-date: 1.0.7 postgres-interval: 1.2.0 + optional: true picocolors@1.0.1: {} @@ -10840,15 +11198,19 @@ snapshots: picocolors: 1.0.1 source-map-js: 1.2.0 - postgres-array@2.0.0: {} + postgres-array@2.0.0: + optional: true - postgres-bytea@1.0.0: {} + postgres-bytea@1.0.0: + optional: true - postgres-date@1.0.7: {} + postgres-date@1.0.7: + optional: true postgres-interval@1.2.0: dependencies: xtend: 4.0.2 + optional: true preact-render-to-string@5.2.3(preact@10.11.3): dependencies: @@ -10902,6 +11264,8 @@ snapshots: process@0.11.10: {} + promise-limit@2.7.0: {} + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 @@ -11808,6 +12172,7 @@ snapshots: utf-8-validate@6.0.3: dependencies: node-gyp-build: 4.8.1 + optional: true util-deprecate@1.0.2: {} @@ -11898,6 +12263,8 @@ snapshots: dependencies: xml-name-validator: 5.0.0 + web-streams-polyfill@3.3.3: {} + webidl-conversions@7.0.0: {} whatwg-encoding@3.1.1: @@ -11980,6 +12347,7 @@ snapshots: optionalDependencies: bufferutil: 4.0.8 utf-8-validate: 6.0.3 + optional: true ws@8.17.0(bufferutil@4.0.8)(utf-8-validate@6.0.3): optionalDependencies: @@ -11995,7 +12363,8 @@ snapshots: xmlchars@2.2.0: {} - xtend@4.0.2: {} + xtend@4.0.2: + optional: true yallist@3.1.1: {} diff --git a/turbo.json b/turbo.json index 6640a60e..274ecb9b 100644 --- a/turbo.json +++ b/turbo.json @@ -6,7 +6,9 @@ "env": [ "DRAINPIPE_CONSUMER_SECRET", "POSTGRES_URL", - "DISCORD_WEBHOOK_URL" + "DISCORD_WEBHOOK_URL", + "TURSO_CONNECTION_URL", + "TURSO_AUTH_TOKEN" ] }, "type-check": {},