Removing nanoid, changing main id to uuid for all schemas, adding display cuid2, and adding rate limiter to login and signup.

This commit is contained in:
Bradley Shellnut 2024-03-12 11:34:39 -07:00
parent 527906b451
commit ed36285c2f
45 changed files with 3762 additions and 17269 deletions

View file

@ -1,233 +0,0 @@
CREATE TABLE IF NOT EXISTS "artists" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"name" varchar(255),
"slug" varchar(255),
"external_id" integer,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "artists_to_games" (
"artist_id" varchar(255),
"game_id" varchar(255)
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "categories" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"name" varchar(255),
"slug" varchar(255),
"external_id" integer,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "categories_to_games" (
"category_id" varchar(255),
"game_id" varchar(255)
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "collection_items" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"collection_id" varchar(255) NOT NULL,
"game_id" varchar(255) NOT NULL,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "collections" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"user_id" varchar(255) NOT NULL,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "designers" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"name" varchar(255),
"slug" varchar(255),
"external_id" integer,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "designers_to_games" (
"designer_id" varchar(255),
"game_id" varchar(255)
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "expansions" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"base_game_id" varchar(255) NOT NULL,
"game_id" varchar(255) NOT NULL,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "games" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"name" varchar(255),
"slug" varchar(255),
"description" text,
"year_published" integer,
"min_players" integer,
"max_players" integer,
"playtime" integer,
"min_playtime" integer,
"max_playtime" integer,
"min_age" integer,
"image_url" varchar(255),
"thumb_url" varchar(255),
"url" varchar(255),
"external_id" integer,
"last_sync_at" timestamp with time zone,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6)),
CONSTRAINT "games_external_id_unique" UNIQUE("external_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "mechanics" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"name" varchar(255),
"slug" varchar(255),
"external_id" integer,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "mechanics_to_games" (
"mechanic_id" varchar(255),
"game_id" varchar(255)
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "publishers" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"name" varchar(255),
"slug" varchar(255),
"external_id" integer,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "publishers_to_games" (
"publisher_id" varchar(255),
"game_id" varchar(255)
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "roles" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"name" varchar(255),
CONSTRAINT "roles_name_unique" UNIQUE("name")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "sessions" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"user_id" varchar(255) NOT NULL,
"expires_at" timestamp with time zone NOT NULL,
"ip_country" varchar(255),
"ip_address" varchar(255)
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "user_roles" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"user_id" varchar(255) NOT NULL,
"role_id" varchar(255) NOT NULL,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "users" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"username" varchar(255),
"hashed_password" varchar(255),
"email" varchar(255),
"first_name" varchar(255),
"last_name" varchar(255),
"verified" boolean DEFAULT false,
"receive_email" boolean DEFAULT false,
"theme" varchar(255) DEFAULT 'system',
"created_at" timestamp DEFAULT (now(6)),
"updated_at" timestamp DEFAULT (now(6)),
CONSTRAINT "users_username_unique" UNIQUE("username"),
CONSTRAINT "users_email_unique" UNIQUE("email")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "wishlist_items" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"wishlist_id" varchar(255) NOT NULL,
"game_id" varchar(255) NOT NULL,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "wishlists" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"user_id" varchar(255) NOT NULL,
"created_at" timestamp with time zone DEFAULT (now(6)),
"updated_at" timestamp with time zone DEFAULT (now(6))
);
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "collection_items" ADD CONSTRAINT "collection_items_collection_id_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "collections"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "collection_items" ADD CONSTRAINT "collection_items_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "collections" ADD CONSTRAINT "collections_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "expansions" ADD CONSTRAINT "expansions_base_game_id_games_id_fk" FOREIGN KEY ("base_game_id") REFERENCES "games"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "expansions" ADD CONSTRAINT "expansions_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_role_id_roles_id_fk" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "wishlist_items" ADD CONSTRAINT "wishlist_items_wishlist_id_wishlists_id_fk" FOREIGN KEY ("wishlist_id") REFERENCES "wishlists"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "wishlist_items" ADD CONSTRAINT "wishlist_items_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "wishlists" ADD CONSTRAINT "wishlists_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;

View file

@ -0,0 +1,365 @@
DO $$ BEGIN
CREATE TYPE "external_id_type" AS ENUM('game', 'category', 'mechanic', 'publisher', 'designer', 'artist');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "categories" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"name" text,
"slug" text,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "categories_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "categories_to_external_ids" (
"category_id" uuid NOT NULL,
"external_id" uuid NOT NULL,
CONSTRAINT "categories_to_external_ids_category_id_external_id_pk" PRIMARY KEY("category_id","external_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "categories_to_games" (
"category_id" uuid NOT NULL,
"game_id" uuid NOT NULL,
CONSTRAINT "categories_to_games_category_id_game_id_pk" PRIMARY KEY("category_id","game_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "collection_items" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"collection_id" text NOT NULL,
"game_id" text NOT NULL,
"times_played" integer DEFAULT 0,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "collection_items_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "collections" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"user_id" text NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "collections_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "expansions" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"base_game_id" text NOT NULL,
"game_id" text NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "expansions_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "external_ids" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"type" "external_id_type" NOT NULL,
"external_id" text NOT NULL,
CONSTRAINT "external_ids_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "games" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"name" text,
"slug" text,
"description" text,
"year_published" integer,
"min_players" integer,
"max_players" integer,
"playtime" integer,
"min_playtime" integer,
"max_playtime" integer,
"min_age" integer,
"image_url" text,
"thumb_url" text,
"url" text,
"text_searchable_index" "tsvector",
"last_sync_at" timestamp (6) with time zone,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "games_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "games_to_external_ids" (
"game_id" uuid NOT NULL,
"external_id" uuid NOT NULL,
CONSTRAINT "games_to_external_ids_game_id_external_id_pk" PRIMARY KEY("game_id","external_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "mechanics" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"name" text,
"slug" text,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "mechanics_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "mechanics_to_external_ids" (
"mechanic_id" uuid NOT NULL,
"external_id" uuid NOT NULL,
CONSTRAINT "mechanics_to_external_ids_mechanic_id_external_id_pk" PRIMARY KEY("mechanic_id","external_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "mechanics_to_games" (
"mechanic_id" uuid NOT NULL,
"game_id" uuid NOT NULL,
CONSTRAINT "mechanics_to_games_mechanic_id_game_id_pk" PRIMARY KEY("mechanic_id","game_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "password_reset_tokens" (
"id" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"expires_at" timestamp (6) with time zone,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "publishers" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"name" text,
"slug" text,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "publishers_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "publishers_to_external_ids" (
"publisher_id" uuid NOT NULL,
"external_id" uuid NOT NULL,
CONSTRAINT "publishers_to_external_ids_publisher_id_external_id_pk" PRIMARY KEY("publisher_id","external_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "publishers_to_games" (
"publisher_id" uuid NOT NULL,
"game_id" uuid NOT NULL,
CONSTRAINT "publishers_to_games_publisher_id_game_id_pk" PRIMARY KEY("publisher_id","game_id")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "roles" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"name" text,
CONSTRAINT "roles_cuid_unique" UNIQUE("cuid"),
CONSTRAINT "roles_name_unique" UNIQUE("name")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "sessions" (
"id" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"expires_at" timestamp with time zone NOT NULL,
"ip_country" text,
"ip_address" text
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "user_roles" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"user_id" text NOT NULL,
"role_id" text NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "user_roles_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "users" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"username" text,
"hashed_password" text,
"email" text,
"first_name" text,
"last_name" text,
"verified" boolean DEFAULT false,
"receive_email" boolean DEFAULT false,
"theme" text DEFAULT 'system',
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "users_cuid_unique" UNIQUE("cuid"),
CONSTRAINT "users_username_unique" UNIQUE("username"),
CONSTRAINT "users_email_unique" UNIQUE("email")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "wishlist_items" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"wishlist_id" text NOT NULL,
"game_id" text NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "wishlist_items_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "wishlists" (
"id" uuid PRIMARY KEY NOT NULL,
"cuid" text,
"user_id" text NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "wishlists_cuid_unique" UNIQUE("cuid")
);
--> statement-breakpoint
CREATE INDEX IF NOT EXISTS "text_searchable_idx" ON "games" ("text_searchable_index");--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_external_ids" ADD CONSTRAINT "categories_to_external_ids_category_id_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "categories"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_external_ids" ADD CONSTRAINT "categories_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_games" ADD CONSTRAINT "categories_to_games_category_id_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "categories"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_games" ADD CONSTRAINT "categories_to_games_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "collection_items" ADD CONSTRAINT "collection_items_collection_id_collections_id_fk" FOREIGN KEY ("collection_id") REFERENCES "collections"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "collection_items" ADD CONSTRAINT "collection_items_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "collections" ADD CONSTRAINT "collections_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "expansions" ADD CONSTRAINT "expansions_base_game_id_games_id_fk" FOREIGN KEY ("base_game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "expansions" ADD CONSTRAINT "expansions_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "games_to_external_ids" ADD CONSTRAINT "games_to_external_ids_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "games_to_external_ids" ADD CONSTRAINT "games_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_external_ids" ADD CONSTRAINT "mechanics_to_external_ids_mechanic_id_mechanics_id_fk" FOREIGN KEY ("mechanic_id") REFERENCES "mechanics"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_external_ids" ADD CONSTRAINT "mechanics_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_games" ADD CONSTRAINT "mechanics_to_games_mechanic_id_mechanics_id_fk" FOREIGN KEY ("mechanic_id") REFERENCES "mechanics"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_games" ADD CONSTRAINT "mechanics_to_games_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "password_reset_tokens" ADD CONSTRAINT "password_reset_tokens_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_external_ids" ADD CONSTRAINT "publishers_to_external_ids_publisher_id_publishers_id_fk" FOREIGN KEY ("publisher_id") REFERENCES "publishers"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_external_ids" ADD CONSTRAINT "publishers_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_games" ADD CONSTRAINT "publishers_to_games_publisher_id_publishers_id_fk" FOREIGN KEY ("publisher_id") REFERENCES "publishers"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_games" ADD CONSTRAINT "publishers_to_games_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_role_id_roles_id_fk" FOREIGN KEY ("role_id") REFERENCES "roles"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "wishlist_items" ADD CONSTRAINT "wishlist_items_wishlist_id_wishlists_id_fk" FOREIGN KEY ("wishlist_id") REFERENCES "wishlists"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "wishlist_items" ADD CONSTRAINT "wishlist_items_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "wishlists" ADD CONSTRAINT "wishlists_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;

View file

@ -1,51 +0,0 @@
ALTER TABLE "artists" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "artists" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "artists" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "artists" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "categories" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "categories" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "categories" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "categories" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "collection_items" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "collection_items" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "collection_items" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "collection_items" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "collections" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "collections" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "collections" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "collections" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "designers" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "designers" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "designers" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "designers" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "expansions" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "expansions" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "expansions" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "expansions" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "games" ALTER COLUMN "last_sync_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "games" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "games" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "games" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "games" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "mechanics" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "mechanics" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "mechanics" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "mechanics" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "publishers" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "publishers" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "publishers" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "publishers" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "user_roles" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "user_roles" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "user_roles" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "user_roles" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "users" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "users" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "wishlist_items" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "wishlist_items" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "wishlist_items" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "wishlist_items" ALTER COLUMN "updated_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "wishlists" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "wishlists" ALTER COLUMN "created_at" SET DEFAULT (now());--> statement-breakpoint
ALTER TABLE "wishlists" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "wishlists" ALTER COLUMN "updated_at" SET DEFAULT (now());

View file

@ -0,0 +1,6 @@
ALTER TABLE "collection_items" ALTER COLUMN "collection_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "collection_items" ALTER COLUMN "game_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "expansions" ALTER COLUMN "base_game_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "expansions" ALTER COLUMN "game_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "wishlist_items" ALTER COLUMN "wishlist_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "wishlist_items" ALTER COLUMN "game_id" SET DATA TYPE uuid;

View file

@ -1,27 +0,0 @@
ALTER TABLE "artists" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "artists" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "categories" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "categories" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "collection_items" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "collection_items" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "collections" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "collections" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "designers" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "designers" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "expansions" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "expansions" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "games" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "games" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "mechanics" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "mechanics" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "publishers" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "publishers" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "user_roles" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "user_roles" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "users" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "users" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "wishlist_items" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "wishlist_items" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "wishlists" ALTER COLUMN "created_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "wishlists" ALTER COLUMN "updated_at" SET DEFAULT now();--> statement-breakpoint
ALTER TABLE "games" ADD COLUMN "text_searchable_index" "tsvector";

View file

@ -0,0 +1,5 @@
ALTER TABLE "collections" ALTER COLUMN "user_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "password_reset_tokens" ALTER COLUMN "user_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "sessions" ALTER COLUMN "user_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "user_roles" ALTER COLUMN "user_id" SET DATA TYPE uuid;--> statement-breakpoint
ALTER TABLE "wishlists" ALTER COLUMN "user_id" SET DATA TYPE uuid;

View file

@ -0,0 +1 @@
ALTER TABLE "user_roles" ALTER COLUMN "role_id" SET DATA TYPE uuid;

View file

@ -1 +0,0 @@
CREATE INDEX IF NOT EXISTS "text_searchable_idx" ON "games" ("text_searchable_index");

View file

@ -1,30 +0,0 @@
DO $$ BEGIN
CREATE TYPE "external_id_type" AS ENUM('game', 'category', 'mechanic', 'publisher', 'designer', 'artist');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "external_ids" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"type" varchar(255),
"external_id" varchar(255)
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "game_external_ids" (
"game_id" varchar(255) NOT NULL,
"external_id" varchar(255) NOT NULL
);
--> statement-breakpoint
ALTER TABLE "games" DROP CONSTRAINT "games_external_id_unique";--> statement-breakpoint
ALTER TABLE "games" DROP COLUMN IF EXISTS "external_id";--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "game_external_ids" ADD CONSTRAINT "game_external_ids_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "game_external_ids" ADD CONSTRAINT "game_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;

View file

@ -1,16 +0,0 @@
ALTER TABLE "game_external_ids" RENAME TO "games_to_external_ids";--> statement-breakpoint
ALTER TABLE "games_to_external_ids" DROP CONSTRAINT "game_external_ids_game_id_games_id_fk";
--> statement-breakpoint
ALTER TABLE "games_to_external_ids" DROP CONSTRAINT "game_external_ids_external_id_external_ids_id_fk";
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "games_to_external_ids" ADD CONSTRAINT "games_to_external_ids_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "games_to_external_ids" ADD CONSTRAINT "games_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;

View file

@ -1,2 +0,0 @@
ALTER TABLE "external_ids" ALTER COLUMN "type" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "external_ids" ALTER COLUMN "external_id" SET NOT NULL;

View file

@ -1,71 +0,0 @@
CREATE TABLE IF NOT EXISTS "categories_to_external_ids" (
"category_id" varchar(255) NOT NULL,
"external_id" varchar(255) NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "expansions_to_external_ids" (
"expansion_id" varchar(255) NOT NULL,
"external_id" varchar(255) NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "mechanics_to_external_ids" (
"mechanic_id" varchar(255) NOT NULL,
"external_id" varchar(255) NOT NULL
);
--> statement-breakpoint
CREATE TABLE IF NOT EXISTS "publishers_to_external_ids" (
"publisher_id" varchar(255) NOT NULL,
"external_id" varchar(255) NOT NULL
);
--> statement-breakpoint
DROP TABLE "artists";--> statement-breakpoint
DROP TABLE "artists_to_games";--> statement-breakpoint
DROP TABLE "designers";--> statement-breakpoint
DROP TABLE "designers_to_games";--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_external_ids" ADD CONSTRAINT "categories_to_external_ids_category_id_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "categories"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_external_ids" ADD CONSTRAINT "categories_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "expansions_to_external_ids" ADD CONSTRAINT "expansions_to_external_ids_expansion_id_expansions_id_fk" FOREIGN KEY ("expansion_id") REFERENCES "expansions"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "expansions_to_external_ids" ADD CONSTRAINT "expansions_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_external_ids" ADD CONSTRAINT "mechanics_to_external_ids_mechanic_id_mechanics_id_fk" FOREIGN KEY ("mechanic_id") REFERENCES "mechanics"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_external_ids" ADD CONSTRAINT "mechanics_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_external_ids" ADD CONSTRAINT "publishers_to_external_ids_publisher_id_publishers_id_fk" FOREIGN KEY ("publisher_id") REFERENCES "publishers"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_external_ids" ADD CONSTRAINT "publishers_to_external_ids_external_id_external_ids_id_fk" FOREIGN KEY ("external_id") REFERENCES "external_ids"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;

View file

@ -1,7 +0,0 @@
DO $$ BEGIN
CREATE TYPE "type" AS ENUM('game', 'category', 'mechanic', 'publisher', 'designer', 'artist');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
ALTER TABLE "external_ids" ALTER COLUMN "type" SET DATA TYPE type;

View file

@ -1,7 +0,0 @@
DO $$ BEGIN
CREATE TYPE "external_id_type" AS ENUM('game', 'category', 'mechanic', 'publisher', 'designer', 'artist');
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
ALTER TABLE "external_ids" ALTER COLUMN "type" SET DATA TYPE external_id_type;

View file

@ -1 +0,0 @@
ALTER TABLE "collection_items" ADD COLUMN "times_played" integer DEFAULT 0;

View file

@ -1,97 +0,0 @@
ALTER TABLE "categories_to_external_ids" DROP CONSTRAINT "categories_to_external_ids_category_id_categories_id_fk";
--> statement-breakpoint
ALTER TABLE "expansions" DROP CONSTRAINT "expansions_base_game_id_games_id_fk";
--> statement-breakpoint
ALTER TABLE "expansions_to_external_ids" DROP CONSTRAINT "expansions_to_external_ids_expansion_id_expansions_id_fk";
--> statement-breakpoint
ALTER TABLE "games_to_external_ids" DROP CONSTRAINT "games_to_external_ids_game_id_games_id_fk";
--> statement-breakpoint
ALTER TABLE "mechanics_to_external_ids" DROP CONSTRAINT "mechanics_to_external_ids_mechanic_id_mechanics_id_fk";
--> statement-breakpoint
ALTER TABLE "publishers_to_external_ids" DROP CONSTRAINT "publishers_to_external_ids_publisher_id_publishers_id_fk";
--> statement-breakpoint
ALTER TABLE "categories_to_games" ALTER COLUMN "category_id" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "categories_to_games" ALTER COLUMN "game_id" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "mechanics_to_games" ALTER COLUMN "mechanic_id" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "mechanics_to_games" ALTER COLUMN "game_id" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "publishers_to_games" ALTER COLUMN "publisher_id" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "publishers_to_games" ALTER COLUMN "game_id" SET NOT NULL;--> statement-breakpoint
ALTER TABLE "categories_to_external_ids" ADD CONSTRAINT "categories_to_external_ids_category_id_external_id_pk" PRIMARY KEY("category_id","external_id");--> statement-breakpoint
ALTER TABLE "categories_to_games" ADD CONSTRAINT "categories_to_games_category_id_game_id_pk" PRIMARY KEY("category_id","game_id");--> statement-breakpoint
ALTER TABLE "expansions_to_external_ids" ADD CONSTRAINT "expansions_to_external_ids_expansion_id_external_id_pk" PRIMARY KEY("expansion_id","external_id");--> statement-breakpoint
ALTER TABLE "games_to_external_ids" ADD CONSTRAINT "games_to_external_ids_game_id_external_id_pk" PRIMARY KEY("game_id","external_id");--> statement-breakpoint
ALTER TABLE "mechanics_to_external_ids" ADD CONSTRAINT "mechanics_to_external_ids_mechanic_id_external_id_pk" PRIMARY KEY("mechanic_id","external_id");--> statement-breakpoint
ALTER TABLE "mechanics_to_games" ADD CONSTRAINT "mechanics_to_games_mechanic_id_game_id_pk" PRIMARY KEY("mechanic_id","game_id");--> statement-breakpoint
ALTER TABLE "publishers_to_external_ids" ADD CONSTRAINT "publishers_to_external_ids_publisher_id_external_id_pk" PRIMARY KEY("publisher_id","external_id");--> statement-breakpoint
ALTER TABLE "publishers_to_games" ADD CONSTRAINT "publishers_to_games_publisher_id_game_id_pk" PRIMARY KEY("publisher_id","game_id");--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_external_ids" ADD CONSTRAINT "categories_to_external_ids_category_id_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "categories"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_games" ADD CONSTRAINT "categories_to_games_category_id_categories_id_fk" FOREIGN KEY ("category_id") REFERENCES "categories"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "categories_to_games" ADD CONSTRAINT "categories_to_games_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "expansions" ADD CONSTRAINT "expansions_base_game_id_games_id_fk" FOREIGN KEY ("base_game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "expansions_to_external_ids" ADD CONSTRAINT "expansions_to_external_ids_expansion_id_expansions_id_fk" FOREIGN KEY ("expansion_id") REFERENCES "expansions"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "games_to_external_ids" ADD CONSTRAINT "games_to_external_ids_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_external_ids" ADD CONSTRAINT "mechanics_to_external_ids_mechanic_id_mechanics_id_fk" FOREIGN KEY ("mechanic_id") REFERENCES "mechanics"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_games" ADD CONSTRAINT "mechanics_to_games_mechanic_id_mechanics_id_fk" FOREIGN KEY ("mechanic_id") REFERENCES "mechanics"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "mechanics_to_games" ADD CONSTRAINT "mechanics_to_games_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_external_ids" ADD CONSTRAINT "publishers_to_external_ids_publisher_id_publishers_id_fk" FOREIGN KEY ("publisher_id") REFERENCES "publishers"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_games" ADD CONSTRAINT "publishers_to_games_publisher_id_publishers_id_fk" FOREIGN KEY ("publisher_id") REFERENCES "publishers"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "publishers_to_games" ADD CONSTRAINT "publishers_to_games_game_id_games_id_fk" FOREIGN KEY ("game_id") REFERENCES "games"("id") ON DELETE restrict ON UPDATE cascade;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;

View file

@ -1,2 +0,0 @@
ALTER TABLE "users" ALTER COLUMN "created_at" SET DATA TYPE timestamp (6) with time zone;--> statement-breakpoint
ALTER TABLE "users" ALTER COLUMN "updated_at" SET DATA TYPE timestamp (6) with time zone;

View file

@ -1,3 +0,0 @@
ALTER TABLE "categories" DROP COLUMN IF EXISTS "external_id";--> statement-breakpoint
ALTER TABLE "mechanics" DROP COLUMN IF EXISTS "external_id";--> statement-breakpoint
ALTER TABLE "publishers" DROP COLUMN IF EXISTS "external_id";

View file

@ -1 +0,0 @@
DROP TABLE "expansions_to_external_ids";

View file

@ -1,12 +0,0 @@
CREATE TABLE IF NOT EXISTS "password_reset_tokens" (
"id" varchar(255) PRIMARY KEY NOT NULL,
"user_id" varchar(255) NOT NULL,
"expires_at" timestamp (6) with time zone,
"created_at" timestamp (6) with time zone DEFAULT now()
);
--> statement-breakpoint
DO $$ BEGIN
ALTER TABLE "password_reset_tokens" ADD CONSTRAINT "password_reset_tokens_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade ON UPDATE no action;
EXCEPTION
WHEN duplicate_object THEN null;
END $$;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -5,113 +5,29 @@
{ {
"idx": 0, "idx": 0,
"version": "5", "version": "5",
"when": 1707437865821, "when": 1710268038944,
"tag": "0000_oval_wolverine", "tag": "0000_tricky_hitman",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 1, "idx": 1,
"version": "5", "version": "5",
"when": 1707438055782, "when": 1710268191378,
"tag": "0001_giant_tomorrow_man", "tag": "0001_numerous_dragon_man",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 2, "idx": 2,
"version": "5", "version": "5",
"when": 1707524139123, "when": 1710268300740,
"tag": "0002_sour_silverclaw", "tag": "0002_thick_lyja",
"breakpoints": true "breakpoints": true
}, },
{ {
"idx": 3, "idx": 3,
"version": "5", "version": "5",
"when": 1707526808124, "when": 1710268371021,
"tag": "0003_thick_tinkerer", "tag": "0003_mushy_madame_masque",
"breakpoints": true
},
{
"idx": 4,
"version": "5",
"when": 1707932397672,
"tag": "0004_fancy_umar",
"breakpoints": true
},
{
"idx": 5,
"version": "5",
"when": 1707932466413,
"tag": "0005_uneven_lifeguard",
"breakpoints": true
},
{
"idx": 6,
"version": "5",
"when": 1707932522909,
"tag": "0006_light_corsair",
"breakpoints": true
},
{
"idx": 7,
"version": "5",
"when": 1707951501716,
"tag": "0007_same_valeria_richards",
"breakpoints": true
},
{
"idx": 8,
"version": "5",
"when": 1708105454143,
"tag": "0008_complete_manta",
"breakpoints": true
},
{
"idx": 9,
"version": "5",
"when": 1708105890146,
"tag": "0009_equal_christian_walker",
"breakpoints": true
},
{
"idx": 10,
"version": "5",
"when": 1708243232524,
"tag": "0010_flat_mister_sinister",
"breakpoints": true
},
{
"idx": 11,
"version": "5",
"when": 1708330668971,
"tag": "0011_gigantic_mister_sinister",
"breakpoints": true
},
{
"idx": 12,
"version": "5",
"when": 1708330799655,
"tag": "0012_dizzy_lethal_legion",
"breakpoints": true
},
{
"idx": 13,
"version": "5",
"when": 1708453431550,
"tag": "0013_clever_monster_badoon",
"breakpoints": true
},
{
"idx": 14,
"version": "5",
"when": 1708479971410,
"tag": "0014_organic_morlocks",
"breakpoints": true
},
{
"idx": 15,
"version": "5",
"when": 1709344835732,
"tag": "0015_awesome_gabe_jones",
"breakpoints": true "breakpoints": true
} }
] ]

View file

@ -22,15 +22,15 @@
}, },
"devDependencies": { "devDependencies": {
"@melt-ui/pp": "^0.3.0", "@melt-ui/pp": "^0.3.0",
"@melt-ui/svelte": "^0.75.3", "@melt-ui/svelte": "^0.76.0",
"@playwright/test": "^1.42.0", "@playwright/test": "^1.42.1",
"@resvg/resvg-js": "^2.6.0", "@resvg/resvg-js": "^2.6.0",
"@sveltejs/adapter-auto": "^3.1.1", "@sveltejs/adapter-auto": "^3.1.1",
"@sveltejs/enhanced-img": "^0.1.8", "@sveltejs/enhanced-img": "^0.1.8",
"@sveltejs/kit": "^2.5.3", "@sveltejs/kit": "^2.5.3",
"@sveltejs/vite-plugin-svelte": "^3.0.2", "@sveltejs/vite-plugin-svelte": "^3.0.2",
"@types/cookie": "^0.6.0", "@types/cookie": "^0.6.0",
"@types/node": "^20.11.25", "@types/node": "^20.11.26",
"@types/pg": "^8.11.2", "@types/pg": "^8.11.2",
"@typescript-eslint/eslint-plugin": "^6.21.0", "@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0", "@typescript-eslint/parser": "^6.21.0",
@ -64,7 +64,7 @@
"tslib": "^2.6.1", "tslib": "^2.6.1",
"tsx": "^4.7.1", "tsx": "^4.7.1",
"typescript": "^5.4.2", "typescript": "^5.4.2",
"vite": "^5.1.5", "vite": "^5.1.6",
"vitest": "^1.3.1", "vitest": "^1.3.1",
"zod": "^3.22.4" "zod": "^3.22.4"
}, },
@ -83,10 +83,10 @@
"@paralleldrive/cuid2": "^2.2.2", "@paralleldrive/cuid2": "^2.2.2",
"@planetscale/database": "^1.16.0", "@planetscale/database": "^1.16.0",
"@sentry/sveltekit": "^7.100.1", "@sentry/sveltekit": "^7.100.1",
"@sveltejs/adapter-vercel": "^5.1.0", "@sveltejs/adapter-vercel": "^5.1.1",
"@types/feather-icons": "^4.29.4", "@types/feather-icons": "^4.29.4",
"@vercel/og": "^0.5.20", "@vercel/og": "^0.5.20",
"bits-ui": "^0.19.5", "bits-ui": "^0.19.6",
"boardgamegeekclient": "^1.9.1", "boardgamegeekclient": "^1.9.1",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"clsx": "^2.1.0", "clsx": "^2.1.0",
@ -99,9 +99,7 @@
"just-kebab-case": "^4.2.0", "just-kebab-case": "^4.2.0",
"loader": "^2.1.1", "loader": "^2.1.1",
"lucia": "3.1.1", "lucia": "3.1.1",
"lucide-svelte": "^0.354.0", "lucide-svelte": "^0.356.0",
"mysql2": "^3.9.2",
"nanoid": "^5.0.6",
"open-props": "^1.6.21", "open-props": "^1.6.21",
"oslo": "^1.1.3", "oslo": "^1.1.3",
"pg": "^8.11.3", "pg": "^8.11.3",

View file

@ -33,8 +33,8 @@ dependencies:
specifier: ^7.100.1 specifier: ^7.100.1
version: 7.100.1(@sveltejs/kit@2.5.3)(svelte@4.2.12) version: 7.100.1(@sveltejs/kit@2.5.3)(svelte@4.2.12)
'@sveltejs/adapter-vercel': '@sveltejs/adapter-vercel':
specifier: ^5.1.0 specifier: ^5.1.1
version: 5.1.0(@sveltejs/kit@2.5.3) version: 5.1.1(@sveltejs/kit@2.5.3)
'@types/feather-icons': '@types/feather-icons':
specifier: ^4.29.4 specifier: ^4.29.4
version: 4.29.4 version: 4.29.4
@ -42,8 +42,8 @@ dependencies:
specifier: ^0.5.20 specifier: ^0.5.20
version: 0.5.20 version: 0.5.20
bits-ui: bits-ui:
specifier: ^0.19.5 specifier: ^0.19.6
version: 0.19.5(svelte@4.2.12) version: 0.19.6(svelte@4.2.12)
boardgamegeekclient: boardgamegeekclient:
specifier: ^1.9.1 specifier: ^1.9.1
version: 1.9.1 version: 1.9.1
@ -58,7 +58,7 @@ dependencies:
version: 0.6.0 version: 0.6.0
drizzle-orm: drizzle-orm:
specifier: ^0.30.1 specifier: ^0.30.1
version: 0.30.1(@neondatabase/serverless@0.9.0)(@planetscale/database@1.16.0)(@types/pg@8.11.2)(mysql2@3.9.2)(pg@8.11.3)(postgres@3.4.3) version: 0.30.1(@neondatabase/serverless@0.9.0)(@planetscale/database@1.16.0)(@types/pg@8.11.2)(pg@8.11.3)(postgres@3.4.3)
feather-icons: feather-icons:
specifier: ^4.29.1 specifier: ^4.29.1
version: 4.29.1 version: 4.29.1
@ -81,14 +81,8 @@ dependencies:
specifier: 3.1.1 specifier: 3.1.1
version: 3.1.1 version: 3.1.1
lucide-svelte: lucide-svelte:
specifier: ^0.354.0 specifier: ^0.356.0
version: 0.354.0(svelte@4.2.12) version: 0.356.0(svelte@4.2.12)
mysql2:
specifier: ^3.9.2
version: 3.9.2
nanoid:
specifier: ^5.0.6
version: 5.0.6
open-props: open-props:
specifier: ^1.6.21 specifier: ^1.6.21
version: 1.6.21 version: 1.6.21
@ -126,13 +120,13 @@ dependencies:
devDependencies: devDependencies:
'@melt-ui/pp': '@melt-ui/pp':
specifier: ^0.3.0 specifier: ^0.3.0
version: 0.3.0(@melt-ui/svelte@0.75.3)(svelte@4.2.12) version: 0.3.0(@melt-ui/svelte@0.76.0)(svelte@4.2.12)
'@melt-ui/svelte': '@melt-ui/svelte':
specifier: ^0.75.3 specifier: ^0.76.0
version: 0.75.3(svelte@4.2.12) version: 0.76.0(svelte@4.2.12)
'@playwright/test': '@playwright/test':
specifier: ^1.42.0 specifier: ^1.42.1
version: 1.42.0 version: 1.42.1
'@resvg/resvg-js': '@resvg/resvg-js':
specifier: ^2.6.0 specifier: ^2.6.0
version: 2.6.0 version: 2.6.0
@ -144,16 +138,16 @@ devDependencies:
version: 0.1.8(svelte@4.2.12) version: 0.1.8(svelte@4.2.12)
'@sveltejs/kit': '@sveltejs/kit':
specifier: ^2.5.3 specifier: ^2.5.3
version: 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5) version: 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6)
'@sveltejs/vite-plugin-svelte': '@sveltejs/vite-plugin-svelte':
specifier: ^3.0.2 specifier: ^3.0.2
version: 3.0.2(svelte@4.2.12)(vite@5.1.5) version: 3.0.2(svelte@4.2.12)(vite@5.1.6)
'@types/cookie': '@types/cookie':
specifier: ^0.6.0 specifier: ^0.6.0
version: 0.6.0 version: 0.6.0
'@types/node': '@types/node':
specifier: ^20.11.25 specifier: ^20.11.26
version: 20.11.25 version: 20.11.26
'@types/pg': '@types/pg':
specifier: ^8.11.2 specifier: ^8.11.2
version: 8.11.2 version: 8.11.2
@ -243,7 +237,7 @@ devDependencies:
version: 3.4.1(ts-node@10.9.2) version: 3.4.1(ts-node@10.9.2)
ts-node: ts-node:
specifier: ^10.9.2 specifier: ^10.9.2
version: 10.9.2(@types/node@20.11.25)(typescript@5.4.2) version: 10.9.2(@types/node@20.11.26)(typescript@5.4.2)
tslib: tslib:
specifier: ^2.6.1 specifier: ^2.6.1
version: 2.6.2 version: 2.6.2
@ -254,11 +248,11 @@ devDependencies:
specifier: ^5.4.2 specifier: ^5.4.2
version: 5.4.2 version: 5.4.2
vite: vite:
specifier: ^5.1.5 specifier: ^5.1.6
version: 5.1.5(@types/node@20.11.25)(sass@1.71.1) version: 5.1.6(@types/node@20.11.26)(sass@1.71.1)
vitest: vitest:
specifier: ^1.3.1 specifier: ^1.3.1
version: 1.3.1(@types/node@20.11.25)(sass@1.71.1) version: 1.3.1(@types/node@20.11.26)(sass@1.71.1)
zod: zod:
specifier: ^3.22.4 specifier: ^3.22.4
version: 3.22.4 version: 3.22.4
@ -787,6 +781,7 @@ packages:
cpu: [ppc64] cpu: [ppc64]
os: [aix] os: [aix]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/aix-ppc64@0.19.12: /@esbuild/aix-ppc64@0.19.12:
@ -820,6 +815,7 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/android-arm64@0.19.12: /@esbuild/android-arm64@0.19.12:
@ -853,6 +849,7 @@ packages:
cpu: [arm] cpu: [arm]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/android-arm@0.19.12: /@esbuild/android-arm@0.19.12:
@ -886,6 +883,7 @@ packages:
cpu: [x64] cpu: [x64]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/android-x64@0.19.12: /@esbuild/android-x64@0.19.12:
@ -919,6 +917,7 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/darwin-arm64@0.19.12: /@esbuild/darwin-arm64@0.19.12:
@ -952,6 +951,7 @@ packages:
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/darwin-x64@0.19.12: /@esbuild/darwin-x64@0.19.12:
@ -985,6 +985,7 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [freebsd] os: [freebsd]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/freebsd-arm64@0.19.12: /@esbuild/freebsd-arm64@0.19.12:
@ -1018,6 +1019,7 @@ packages:
cpu: [x64] cpu: [x64]
os: [freebsd] os: [freebsd]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/freebsd-x64@0.19.12: /@esbuild/freebsd-x64@0.19.12:
@ -1051,6 +1053,7 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-arm64@0.19.12: /@esbuild/linux-arm64@0.19.12:
@ -1084,6 +1087,7 @@ packages:
cpu: [arm] cpu: [arm]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-arm@0.19.12: /@esbuild/linux-arm@0.19.12:
@ -1117,6 +1121,7 @@ packages:
cpu: [ia32] cpu: [ia32]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-ia32@0.19.12: /@esbuild/linux-ia32@0.19.12:
@ -1150,6 +1155,7 @@ packages:
cpu: [loong64] cpu: [loong64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-loong64@0.19.12: /@esbuild/linux-loong64@0.19.12:
@ -1183,6 +1189,7 @@ packages:
cpu: [mips64el] cpu: [mips64el]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-mips64el@0.19.12: /@esbuild/linux-mips64el@0.19.12:
@ -1216,6 +1223,7 @@ packages:
cpu: [ppc64] cpu: [ppc64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-ppc64@0.19.12: /@esbuild/linux-ppc64@0.19.12:
@ -1249,6 +1257,7 @@ packages:
cpu: [riscv64] cpu: [riscv64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-riscv64@0.19.12: /@esbuild/linux-riscv64@0.19.12:
@ -1282,6 +1291,7 @@ packages:
cpu: [s390x] cpu: [s390x]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-s390x@0.19.12: /@esbuild/linux-s390x@0.19.12:
@ -1315,6 +1325,7 @@ packages:
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/linux-x64@0.19.12: /@esbuild/linux-x64@0.19.12:
@ -1348,6 +1359,7 @@ packages:
cpu: [x64] cpu: [x64]
os: [netbsd] os: [netbsd]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/netbsd-x64@0.19.12: /@esbuild/netbsd-x64@0.19.12:
@ -1381,6 +1393,7 @@ packages:
cpu: [x64] cpu: [x64]
os: [openbsd] os: [openbsd]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/openbsd-x64@0.19.12: /@esbuild/openbsd-x64@0.19.12:
@ -1414,6 +1427,7 @@ packages:
cpu: [x64] cpu: [x64]
os: [sunos] os: [sunos]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/sunos-x64@0.19.12: /@esbuild/sunos-x64@0.19.12:
@ -1447,6 +1461,7 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/win32-arm64@0.19.12: /@esbuild/win32-arm64@0.19.12:
@ -1480,6 +1495,7 @@ packages:
cpu: [ia32] cpu: [ia32]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/win32-ia32@0.19.12: /@esbuild/win32-ia32@0.19.12:
@ -1513,6 +1529,7 @@ packages:
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
dev: true
optional: true optional: true
/@esbuild/win32-x64@0.19.12: /@esbuild/win32-x64@0.19.12:
@ -1958,28 +1975,28 @@ packages:
nopt: 5.0.0 nopt: 5.0.0
npmlog: 5.0.1 npmlog: 5.0.1
rimraf: 3.0.2 rimraf: 3.0.2
semver: 7.5.4 semver: 7.6.0
tar: 6.2.0 tar: 6.2.0
transitivePeerDependencies: transitivePeerDependencies:
- encoding - encoding
- supports-color - supports-color
dev: false dev: false
/@melt-ui/pp@0.3.0(@melt-ui/svelte@0.75.3)(svelte@4.2.12): /@melt-ui/pp@0.3.0(@melt-ui/svelte@0.76.0)(svelte@4.2.12):
resolution: {integrity: sha512-b07Bdh8l2KcwKVCXOY+SoBw1dk9eWvQfMSi6SoacpRVyVmmfpi0kV4oGt3HYF0tUCB3sEmVicxse50ZzZxEzEA==} resolution: {integrity: sha512-b07Bdh8l2KcwKVCXOY+SoBw1dk9eWvQfMSi6SoacpRVyVmmfpi0kV4oGt3HYF0tUCB3sEmVicxse50ZzZxEzEA==}
engines: {pnpm: '>=8.6.3'} engines: {pnpm: '>=8.6.3'}
peerDependencies: peerDependencies:
'@melt-ui/svelte': '>= 0.29.0' '@melt-ui/svelte': '>= 0.29.0'
svelte: ^3.55.0 || ^4.0.0 || ^5.0.0-next.1 svelte: ^3.55.0 || ^4.0.0 || ^5.0.0-next.1
dependencies: dependencies:
'@melt-ui/svelte': 0.75.3(svelte@4.2.12) '@melt-ui/svelte': 0.76.0(svelte@4.2.12)
estree-walker: 3.0.3 estree-walker: 3.0.3
magic-string: 0.30.5 magic-string: 0.30.5
svelte: 4.2.12 svelte: 4.2.12
dev: true dev: true
/@melt-ui/svelte@0.75.3(svelte@4.2.12): /@melt-ui/svelte@0.76.0(svelte@4.2.12):
resolution: {integrity: sha512-EA2IKn7w9qtzO/M7VEENpphQ9A4az+QDMQbA8SJLuKyu+S8NWliln5y9vvmnx9dZF8GtKtUKuxpwRNyPg5LAOg==} resolution: {integrity: sha512-X1ktxKujjLjOBt8LBvfckHGDMrkHWceRt1jdsUTf0EH76ikNPP1ofSoiV0IhlduDoCBV+2YchJ8kXCDfDXfC9Q==}
peerDependencies: peerDependencies:
svelte: '>=3 <5' svelte: '>=3 <5'
dependencies: dependencies:
@ -2635,12 +2652,12 @@ packages:
engines: {node: '>=16'} engines: {node: '>=16'}
dev: false dev: false
/@playwright/test@1.42.0: /@playwright/test@1.42.1:
resolution: {integrity: sha512-2k1HzC28Fs+HiwbJOQDUwrWMttqSLUVdjCqitBOjdCD0svWOMQUVqrXX6iFD7POps6xXAojsX/dGBpKnjZctLA==} resolution: {integrity: sha512-Gq9rmS54mjBL/7/MvBaNOBwbfnh7beHvS6oS4srqXFcQHpQCV1+c8JXWE8VLPyRDhgS3H8x8A7hztqI9VnwrAQ==}
engines: {node: '>=16'} engines: {node: '>=16'}
hasBin: true hasBin: true
dependencies: dependencies:
playwright: 1.42.0 playwright: 1.42.1
dev: true dev: true
/@polka/url@1.0.0-next.25: /@polka/url@1.0.0-next.25:
@ -2805,92 +2822,92 @@ packages:
picomatch: 2.3.1 picomatch: 2.3.1
dev: true dev: true
/@rollup/rollup-android-arm-eabi@4.12.0: /@rollup/rollup-android-arm-eabi@4.12.1:
resolution: {integrity: sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==} resolution: {integrity: sha512-iU2Sya8hNn1LhsYyf0N+L4Gf9Qc+9eBTJJJsaOGUp+7x4n2M9dxTt8UvhJl3oeftSjblSlpCfvjA/IfP3g5VjQ==}
cpu: [arm] cpu: [arm]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-android-arm64@4.12.0: /@rollup/rollup-android-arm64@4.12.1:
resolution: {integrity: sha512-OBqcX2BMe6nvjQ0Nyp7cC90cnumt8PXmO7Dp3gfAju/6YwG0Tj74z1vKrfRz7qAv23nBcYM8BCbhrsWqO7PzQQ==} resolution: {integrity: sha512-wlzcWiH2Ir7rdMELxFE5vuM7D6TsOcJ2Yw0c3vaBR3VOsJFVTx9xvwnAvhgU5Ii8Gd6+I11qNHwndDscIm0HXg==}
cpu: [arm64] cpu: [arm64]
os: [android] os: [android]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-darwin-arm64@4.12.0: /@rollup/rollup-darwin-arm64@4.12.1:
resolution: {integrity: sha512-X64tZd8dRE/QTrBIEs63kaOBG0b5GVEd3ccoLtyf6IdXtHdh8h+I56C2yC3PtC9Ucnv0CpNFJLqKFVgCYe0lOQ==} resolution: {integrity: sha512-YRXa1+aZIFN5BaImK+84B3uNK8C6+ynKLPgvn29X9s0LTVCByp54TB7tdSMHDR7GTV39bz1lOmlLDuedgTwwHg==}
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-darwin-x64@4.12.0: /@rollup/rollup-darwin-x64@4.12.1:
resolution: {integrity: sha512-cc71KUZoVbUJmGP2cOuiZ9HSOP14AzBAThn3OU+9LcA1+IUqswJyR1cAJj3Mg55HbjZP6OLAIscbQsQLrpgTOg==} resolution: {integrity: sha512-opjWJ4MevxeA8FhlngQWPBOvVWYNPFkq6/25rGgG+KOy0r8clYwL1CFd+PGwRqqMFVQ4/Qd3sQu5t7ucP7C/Uw==}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-linux-arm-gnueabihf@4.12.0: /@rollup/rollup-linux-arm-gnueabihf@4.12.1:
resolution: {integrity: sha512-a6w/Y3hyyO6GlpKL2xJ4IOh/7d+APaqLYdMf86xnczU3nurFTaVN9s9jOXQg97BE4nYm/7Ga51rjec5nfRdrvA==} resolution: {integrity: sha512-uBkwaI+gBUlIe+EfbNnY5xNyXuhZbDSx2nzzW8tRMjUmpScd6lCQYKY2V9BATHtv5Ef2OBq6SChEP8h+/cxifQ==}
cpu: [arm] cpu: [arm]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-linux-arm64-gnu@4.12.0: /@rollup/rollup-linux-arm64-gnu@4.12.1:
resolution: {integrity: sha512-0fZBq27b+D7Ar5CQMofVN8sggOVhEtzFUwOwPppQt0k+VR+7UHMZZY4y+64WJ06XOhBTKXtQB/Sv0NwQMXyNAA==} resolution: {integrity: sha512-0bK9aG1kIg0Su7OcFTlexkVeNZ5IzEsnz1ept87a0TUgZ6HplSgkJAnFpEVRW7GRcikT4GlPV0pbtVedOaXHQQ==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-linux-arm64-musl@4.12.0: /@rollup/rollup-linux-arm64-musl@4.12.1:
resolution: {integrity: sha512-eTvzUS3hhhlgeAv6bfigekzWZjaEX9xP9HhxB0Dvrdbkk5w/b+1Sxct2ZuDxNJKzsRStSq1EaEkVSEe7A7ipgQ==} resolution: {integrity: sha512-qB6AFRXuP8bdkBI4D7UPUbE7OQf7u5OL+R94JE42Z2Qjmyj74FtDdLGeriRyBDhm4rQSvqAGCGC01b8Fu2LthQ==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-linux-riscv64-gnu@4.12.0: /@rollup/rollup-linux-riscv64-gnu@4.12.1:
resolution: {integrity: sha512-ix+qAB9qmrCRiaO71VFfY8rkiAZJL8zQRXveS27HS+pKdjwUfEhqo2+YF2oI+H/22Xsiski+qqwIBxVewLK7sw==} resolution: {integrity: sha512-sHig3LaGlpNgDj5o8uPEoGs98RII8HpNIqFtAI8/pYABO8i0nb1QzT0JDoXF/pxzqO+FkxvwkHZo9k0NJYDedg==}
cpu: [riscv64] cpu: [riscv64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-linux-x64-gnu@4.12.0: /@rollup/rollup-linux-x64-gnu@4.12.1:
resolution: {integrity: sha512-TenQhZVOtw/3qKOPa7d+QgkeM6xY0LtwzR8OplmyL5LrgTWIXpTQg2Q2ycBf8jm+SFW2Wt/DTn1gf7nFp3ssVA==} resolution: {integrity: sha512-nD3YcUv6jBJbBNFvSbp0IV66+ba/1teuBcu+fBBPZ33sidxitc6ErhON3JNavaH8HlswhWMC3s5rgZpM4MtPqQ==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-linux-x64-musl@4.12.0: /@rollup/rollup-linux-x64-musl@4.12.1:
resolution: {integrity: sha512-LfFdRhNnW0zdMvdCb5FNuWlls2WbbSridJvxOvYWgSBOYZtgBfW9UGNJG//rwMqTX1xQE9BAodvMH9tAusKDUw==} resolution: {integrity: sha512-7/XVZqgBby2qp/cO0TQ8uJK+9xnSdJ9ct6gSDdEr4MfABrjTyrW6Bau7HQ73a2a5tPB7hno49A0y1jhWGDN9OQ==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-win32-arm64-msvc@4.12.0: /@rollup/rollup-win32-arm64-msvc@4.12.1:
resolution: {integrity: sha512-JPDxovheWNp6d7AHCgsUlkuCKvtu3RB55iNEkaQcf0ttsDU/JZF+iQnYcQJSk/7PtT4mjjVG8N1kpwnI9SLYaw==} resolution: {integrity: sha512-CYc64bnICG42UPL7TrhIwsJW4QcKkIt9gGlj21gq3VV0LL6XNb1yAdHVp1pIi9gkts9gGcT3OfUYHjGP7ETAiw==}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-win32-ia32-msvc@4.12.0: /@rollup/rollup-win32-ia32-msvc@4.12.1:
resolution: {integrity: sha512-fjtuvMWRGJn1oZacG8IPnzIV6GF2/XG+h71FKn76OYFqySXInJtseAqdprVTDTyqPxQOG9Exak5/E9Z3+EJ8ZA==} resolution: {integrity: sha512-LN+vnlZ9g0qlHGlS920GR4zFCqAwbv2lULrR29yGaWP9u7wF5L7GqWu9Ah6/kFZPXPUkpdZwd//TNR+9XC9hvA==}
cpu: [ia32] cpu: [ia32]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
optional: true optional: true
/@rollup/rollup-win32-x64-msvc@4.12.0: /@rollup/rollup-win32-x64-msvc@4.12.1:
resolution: {integrity: sha512-ZYmr5mS2wd4Dew/JjT0Fqi2NPB/ZhZ2VvPp7SmvPZb4Y1CG/LRcS6tcRo2cYU7zLK5A7cdbhWnnWmUjoI4qapg==} resolution: {integrity: sha512-n+vkrSyphvmU0qkQ6QBNXCGr2mKjhP08mPRM/Xp5Ck2FV4NrHU+y6axzDeixUrCBHVUS51TZhjqrKBBsHLKb2Q==}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
requiresBuild: true requiresBuild: true
@ -3053,7 +3070,7 @@ packages:
'@sentry/types': 7.100.1 '@sentry/types': 7.100.1
'@sentry/utils': 7.100.1 '@sentry/utils': 7.100.1
'@sentry/vite-plugin': 0.6.1 '@sentry/vite-plugin': 0.6.1
'@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5) '@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6)
magicast: 0.2.8 magicast: 0.2.8
sorcery: 0.11.0 sorcery: 0.11.0
transitivePeerDependencies: transitivePeerDependencies:
@ -3147,18 +3164,18 @@ packages:
peerDependencies: peerDependencies:
'@sveltejs/kit': ^2.0.0 '@sveltejs/kit': ^2.0.0
dependencies: dependencies:
'@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5) '@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6)
import-meta-resolve: 4.0.0 import-meta-resolve: 4.0.0
dev: true dev: true
/@sveltejs/adapter-vercel@5.1.0(@sveltejs/kit@2.5.3): /@sveltejs/adapter-vercel@5.1.1(@sveltejs/kit@2.5.3):
resolution: {integrity: sha512-Z9yRJ4H2/7LcBlvN2/TKu1H0hWoRGonr8kPhP1GJ23LRW76IbiiX5gs/MLc6+ZGogCZYVJ4USmx6m+RFtvQTRw==} resolution: {integrity: sha512-OBb4/she4MCat+topk8x2EHXX2qX3Ju3xGumHCDtVq4zLEZ3LEomhht79jO+7Q1qia2bKk9o6hYEO0JLZjv7XQ==}
peerDependencies: peerDependencies:
'@sveltejs/kit': ^2.4.0 '@sveltejs/kit': ^2.4.0
dependencies: dependencies:
'@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5) '@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6)
'@vercel/nft': 0.26.2 '@vercel/nft': 0.26.4
esbuild: 0.19.11 esbuild: 0.19.12
transitivePeerDependencies: transitivePeerDependencies:
- encoding - encoding
- supports-color - supports-color
@ -3175,7 +3192,7 @@ packages:
- svelte - svelte
dev: true dev: true
/@sveltejs/kit@2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5): /@sveltejs/kit@2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6):
resolution: {integrity: sha512-s6x7HBn/Fp+UNvyhJohjIA0FcJ+BWHGUDQ4PCg1D0EboUlvbimJQYchINu8G6sspLXYmlcsuNsp8bbcrRk85iw==} resolution: {integrity: sha512-s6x7HBn/Fp+UNvyhJohjIA0FcJ+BWHGUDQ4PCg1D0EboUlvbimJQYchINu8G6sspLXYmlcsuNsp8bbcrRk85iw==}
engines: {node: '>=18.13'} engines: {node: '>=18.13'}
hasBin: true hasBin: true
@ -3185,7 +3202,7 @@ packages:
svelte: ^4.0.0 || ^5.0.0-next.0 svelte: ^4.0.0 || ^5.0.0-next.0
vite: ^5.0.3 vite: ^5.0.3
dependencies: dependencies:
'@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.5) '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.6)
'@types/cookie': 0.6.0 '@types/cookie': 0.6.0
cookie: 0.6.0 cookie: 0.6.0
devalue: 4.3.2 devalue: 4.3.2
@ -3199,9 +3216,9 @@ packages:
sirv: 2.0.4 sirv: 2.0.4
svelte: 4.2.12 svelte: 4.2.12
tiny-glob: 0.2.9 tiny-glob: 0.2.9
vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) vite: 5.1.6(@types/node@20.11.26)(sass@1.71.1)
/@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5): /@sveltejs/vite-plugin-svelte-inspector@2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6):
resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==} resolution: {integrity: sha512-gjr9ZFg1BSlIpfZ4PRewigrvYmHWbDrq2uvvPB1AmTWKuM+dI1JXQSUu2pIrYLb/QncyiIGkFDFKTwJ0XqQZZg==}
engines: {node: ^18.0.0 || >=20} engines: {node: ^18.0.0 || >=20}
peerDependencies: peerDependencies:
@ -3209,29 +3226,29 @@ packages:
svelte: ^4.0.0 || ^5.0.0-next.0 svelte: ^4.0.0 || ^5.0.0-next.0
vite: ^5.0.0 vite: ^5.0.0
dependencies: dependencies:
'@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.5) '@sveltejs/vite-plugin-svelte': 3.0.2(svelte@4.2.12)(vite@5.1.6)
debug: 4.3.4 debug: 4.3.4
svelte: 4.2.12 svelte: 4.2.12
vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) vite: 5.1.6(@types/node@20.11.26)(sass@1.71.1)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
/@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.5): /@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.1.6):
resolution: {integrity: sha512-MpmF/cju2HqUls50WyTHQBZUV3ovV/Uk8k66AN2gwHogNAG8wnW8xtZDhzNBsFJJuvmq1qnzA5kE7YfMJNFv2Q==} resolution: {integrity: sha512-MpmF/cju2HqUls50WyTHQBZUV3ovV/Uk8k66AN2gwHogNAG8wnW8xtZDhzNBsFJJuvmq1qnzA5kE7YfMJNFv2Q==}
engines: {node: ^18.0.0 || >=20} engines: {node: ^18.0.0 || >=20}
peerDependencies: peerDependencies:
svelte: ^4.0.0 || ^5.0.0-next.0 svelte: ^4.0.0 || ^5.0.0-next.0
vite: ^5.0.0 vite: ^5.0.0
dependencies: dependencies:
'@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5) '@sveltejs/vite-plugin-svelte-inspector': 2.0.0(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6)
debug: 4.3.4 debug: 4.3.4
deepmerge: 4.3.1 deepmerge: 4.3.1
kleur: 4.1.5 kleur: 4.1.5
magic-string: 0.30.5 magic-string: 0.30.5
svelte: 4.2.12 svelte: 4.2.12
svelte-hmr: 0.15.3(svelte@4.2.12) svelte-hmr: 0.15.3(svelte@4.2.12)
vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) vite: 5.1.6(@types/node@20.11.26)(sass@1.71.1)
vitefu: 0.2.5(vite@5.1.5) vitefu: 0.2.5(vite@5.1.6)
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
@ -3273,22 +3290,22 @@ packages:
/@types/json-schema@7.0.15: /@types/json-schema@7.0.15:
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
/@types/node@20.11.25: /@types/node@20.11.26:
resolution: {integrity: sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==} resolution: {integrity: sha512-YwOMmyhNnAWijOBQweOJnQPl068Oqd4K3OFbTc6AHJwzweUwwWG3GIFY74OKks2PJUDkQPeddOQES9mLn1CTEQ==}
dependencies: dependencies:
undici-types: 5.26.5 undici-types: 5.26.5
/@types/pg@8.11.2: /@types/pg@8.11.2:
resolution: {integrity: sha512-G2Mjygf2jFMU/9hCaTYxJrwdObdcnuQde1gndooZSOHsNSaCehAuwc7EIuSA34Do8Jx2yZ19KtvW8P0j4EuUXw==} resolution: {integrity: sha512-G2Mjygf2jFMU/9hCaTYxJrwdObdcnuQde1gndooZSOHsNSaCehAuwc7EIuSA34Do8Jx2yZ19KtvW8P0j4EuUXw==}
dependencies: dependencies:
'@types/node': 20.11.25 '@types/node': 20.11.26
pg-protocol: 1.6.0 pg-protocol: 1.6.0
pg-types: 4.0.2 pg-types: 4.0.2
/@types/pg@8.6.6: /@types/pg@8.6.6:
resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==} resolution: {integrity: sha512-O2xNmXebtwVekJDD+02udOncjVcMZQuTEQEMpKJ0ZRf5E7/9JJX3izhKUcUifBkyKpljyUM6BTgy2trmviKlpw==}
dependencies: dependencies:
'@types/node': 20.11.25 '@types/node': 20.11.26
pg-protocol: 1.6.0 pg-protocol: 1.6.0
pg-types: 2.2.0 pg-types: 2.2.0
dev: false dev: false
@ -3442,8 +3459,8 @@ packages:
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
dev: true dev: true
/@vercel/nft@0.26.2: /@vercel/nft@0.26.4:
resolution: {integrity: sha512-bxe2iShmKZi7476xYamyKvhhKwQ6JPEtQ2FSq1AjMUH2buMd8LQMkdoHinTqZYc+1sMTh3G0ARdjzNvV1FEisA==} resolution: {integrity: sha512-j4jCOOXke2t8cHZCIxu1dzKLHLcFmYzC3yqAK6MfZznOL1QIJKd0xcFsXK3zcqzU7ScsE2zWkiMMNHGMHgp+FA==}
engines: {node: '>=16'} engines: {node: '>=16'}
hasBin: true hasBin: true
dependencies: dependencies:
@ -3721,13 +3738,13 @@ packages:
file-uri-to-path: 1.0.0 file-uri-to-path: 1.0.0
dev: false dev: false
/bits-ui@0.19.5(svelte@4.2.12): /bits-ui@0.19.6(svelte@4.2.12):
resolution: {integrity: sha512-jrt0pGZdixtl27VrfzLj5yJxha29CK+6nClZZSoJCL5DlXFT1sluF9NnOSMP48D3kczR5YjpArvCe0BEnGq4jA==} resolution: {integrity: sha512-ZKWHa1Vt8YW7DdooeNleVdtOtk9hxXZIo8El0myqn7r8S8OkJaSPXhQn/jp4/Q6BphYxZ2Tatqb/WLphmrSfUg==}
peerDependencies: peerDependencies:
svelte: ^4.0.0 svelte: ^4.0.0
dependencies: dependencies:
'@internationalized/date': 3.5.2 '@internationalized/date': 3.5.2
'@melt-ui/svelte': 0.75.3(svelte@4.2.12) '@melt-ui/svelte': 0.76.0(svelte@4.2.12)
nanoid: 5.0.6 nanoid: 5.0.6
svelte: 4.2.12 svelte: 4.2.12
dev: false dev: false
@ -4129,11 +4146,6 @@ packages:
resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==}
dev: false dev: false
/denque@2.1.0:
resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==}
engines: {node: '>=0.10'}
dev: false
/dequal@2.0.3: /dequal@2.0.3:
resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
engines: {node: '>=6'} engines: {node: '>=6'}
@ -4219,7 +4231,7 @@ packages:
- supports-color - supports-color
dev: true dev: true
/drizzle-orm@0.30.1(@neondatabase/serverless@0.9.0)(@planetscale/database@1.16.0)(@types/pg@8.11.2)(mysql2@3.9.2)(pg@8.11.3)(postgres@3.4.3): /drizzle-orm@0.30.1(@neondatabase/serverless@0.9.0)(@planetscale/database@1.16.0)(@types/pg@8.11.2)(pg@8.11.3)(postgres@3.4.3):
resolution: {integrity: sha512-5P6CXl4XyWtDDiYOX/jYOJp1HTUmBlXRAwaq+muUOgaSykMEy5sJesCxceMT0oCGvxeWkKfSXo5owLnfKwCIdw==} resolution: {integrity: sha512-5P6CXl4XyWtDDiYOX/jYOJp1HTUmBlXRAwaq+muUOgaSykMEy5sJesCxceMT0oCGvxeWkKfSXo5owLnfKwCIdw==}
peerDependencies: peerDependencies:
'@aws-sdk/client-rds-data': '>=3' '@aws-sdk/client-rds-data': '>=3'
@ -4296,7 +4308,6 @@ packages:
'@neondatabase/serverless': 0.9.0 '@neondatabase/serverless': 0.9.0
'@planetscale/database': 1.16.0 '@planetscale/database': 1.16.0
'@types/pg': 8.11.2 '@types/pg': 8.11.2
mysql2: 3.9.2
pg: 8.11.3 pg: 8.11.3
postgres: 3.4.3 postgres: 3.4.3
dev: false dev: false
@ -4435,6 +4446,7 @@ packages:
'@esbuild/win32-arm64': 0.19.11 '@esbuild/win32-arm64': 0.19.11
'@esbuild/win32-ia32': 0.19.11 '@esbuild/win32-ia32': 0.19.11
'@esbuild/win32-x64': 0.19.11 '@esbuild/win32-x64': 0.19.11
dev: true
/esbuild@0.19.12: /esbuild@0.19.12:
resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==}
@ -4851,12 +4863,6 @@ packages:
wide-align: 1.1.5 wide-align: 1.1.5
dev: false dev: false
/generate-function@2.3.1:
resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==}
dependencies:
is-property: 1.0.2
dev: false
/get-func-name@2.0.2: /get-func-name@2.0.2:
resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==}
dev: true dev: true
@ -5050,13 +5056,6 @@ packages:
'@iconify/types': 2.0.0 '@iconify/types': 2.0.0
dev: false dev: false
/iconv-lite@0.6.3:
resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==}
engines: {node: '>=0.10.0'}
dependencies:
safer-buffer: 2.1.2
dev: false
/ignore@5.3.0: /ignore@5.3.0:
resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==}
engines: {node: '>= 4'} engines: {node: '>= 4'}
@ -5177,10 +5176,6 @@ packages:
resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==}
dev: true dev: true
/is-property@1.0.2:
resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==}
dev: false
/is-reference@3.0.2: /is-reference@3.0.2:
resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==}
dependencies: dependencies:
@ -5374,10 +5369,6 @@ packages:
resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==}
dev: true dev: true
/long@5.2.3:
resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==}
dev: false
/loupe@2.3.7: /loupe@2.3.7:
resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==}
dependencies: dependencies:
@ -5395,16 +5386,6 @@ packages:
dependencies: dependencies:
yallist: 4.0.0 yallist: 4.0.0
/lru-cache@7.18.3:
resolution: {integrity: sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==}
engines: {node: '>=12'}
dev: false
/lru-cache@8.0.5:
resolution: {integrity: sha512-MhWWlVnuab1RG5/zMRRcVGXZLCXrZTgfwMikgzCegsPnG62yDQo5JnqKkrK4jO5iKqDAZGItAqN5CtKBCBWRUA==}
engines: {node: '>=16.14'}
dev: false
/lru-queue@0.1.0: /lru-queue@0.1.0:
resolution: {integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==} resolution: {integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==}
dependencies: dependencies:
@ -5417,8 +5398,8 @@ packages:
oslo: 1.0.1 oslo: 1.0.1
dev: false dev: false
/lucide-svelte@0.354.0(svelte@4.2.12): /lucide-svelte@0.356.0(svelte@4.2.12):
resolution: {integrity: sha512-70SspM/VC9E9OLJj1Jg6IhF40vf22aanW9vhUvtBwORogK4TP2oTd27YkY/3zOgi/Y5OAEOU4ZYtLxsAiOHPjQ==} resolution: {integrity: sha512-aUr+L9uJkRvT15egByH4KLPoIXh47fG7Dm03b4G1Dk2nfTDuuLebloUaBKUzFsBUcVrBKBje+L5/Xnz3OoUyCg==}
peerDependencies: peerDependencies:
svelte: ^3 || ^4 || ^5.0.0-next.42 svelte: ^3 || ^4 || ^5.0.0-next.42
dependencies: dependencies:
@ -5624,20 +5605,6 @@ packages:
/ms@2.1.2: /ms@2.1.2:
resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==}
/mysql2@3.9.2:
resolution: {integrity: sha512-3Cwg/UuRkAv/wm6RhtPE5L7JlPB877vwSF6gfLAS68H+zhH+u5oa3AieqEd0D0/kC3W7qIhYbH419f7O9i/5nw==}
engines: {node: '>= 8.0'}
dependencies:
denque: 2.1.0
generate-function: 2.3.1
iconv-lite: 0.6.3
long: 5.2.3
lru-cache: 8.0.5
named-placeholders: 1.1.3
seq-queue: 0.0.5
sqlstring: 2.3.3
dev: false
/mz@2.7.0: /mz@2.7.0:
resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==}
dependencies: dependencies:
@ -5645,13 +5612,6 @@ packages:
object-assign: 4.1.1 object-assign: 4.1.1
thenify-all: 1.6.0 thenify-all: 1.6.0
/named-placeholders@1.1.3:
resolution: {integrity: sha512-eLoBxg6wE/rZkJPhU/xRX1WTpkFEwDJEN96oxFrTsqBdbT5ec295Q+CoHrL9IT0DipqKhmGcaZmwOt8OON5x1w==}
engines: {node: '>=12.0.0'}
dependencies:
lru-cache: 7.18.3
dev: false
/nanoid@3.3.7: /nanoid@3.3.7:
resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
@ -5995,18 +5955,18 @@ packages:
pathe: 1.1.2 pathe: 1.1.2
dev: true dev: true
/playwright-core@1.42.0: /playwright-core@1.42.1:
resolution: {integrity: sha512-0HD9y8qEVlcbsAjdpBaFjmaTHf+1FeIddy8VJLeiqwhcNqGCBe4Wp2e8knpqiYbzxtxarxiXyNDw2cG8sCaNMQ==} resolution: {integrity: sha512-mxz6zclokgrke9p1vtdy/COWBH+eOZgYUVVU34C73M+4j4HLlQJHtfcqiqqxpP0o8HhMkflvfbquLX5dg6wlfA==}
engines: {node: '>=16'} engines: {node: '>=16'}
hasBin: true hasBin: true
dev: true dev: true
/playwright@1.42.0: /playwright@1.42.1:
resolution: {integrity: sha512-Ko7YRUgj5xBHbntrgt4EIw/nE//XBHOKVKnBjO1KuZkmkhlbgyggTe5s9hjqQ1LpN+Xg+kHsQyt5Pa0Bw5XpvQ==} resolution: {integrity: sha512-PgwB03s2DZBcNRoW+1w9E+VkLBxweib6KTXM0M3tkiT4jVxKSi6PmVJ591J+0u10LUrgxB7dLRbiJqO5s2QPMg==}
engines: {node: '>=16'} engines: {node: '>=16'}
hasBin: true hasBin: true
dependencies: dependencies:
playwright-core: 1.42.0 playwright-core: 1.42.1
optionalDependencies: optionalDependencies:
fsevents: 2.3.2 fsevents: 2.3.2
dev: true dev: true
@ -6237,7 +6197,7 @@ packages:
dependencies: dependencies:
lilconfig: 2.1.0 lilconfig: 2.1.0
postcss: 8.4.35 postcss: 8.4.35
ts-node: 10.9.2(@types/node@20.11.25)(typescript@5.4.2) ts-node: 10.9.2(@types/node@20.11.26)(typescript@5.4.2)
yaml: 1.10.2 yaml: 1.10.2
dev: true dev: true
@ -6255,7 +6215,7 @@ packages:
dependencies: dependencies:
lilconfig: 3.0.0 lilconfig: 3.0.0
postcss: 8.4.35 postcss: 8.4.35
ts-node: 10.9.2(@types/node@20.11.25)(typescript@5.4.2) ts-node: 10.9.2(@types/node@20.11.26)(typescript@5.4.2)
yaml: 2.3.4 yaml: 2.3.4
/postcss-load-config@5.0.3(postcss@8.4.35): /postcss-load-config@5.0.3(postcss@8.4.35):
@ -6676,26 +6636,26 @@ packages:
dependencies: dependencies:
glob: 7.2.3 glob: 7.2.3
/rollup@4.12.0: /rollup@4.12.1:
resolution: {integrity: sha512-wz66wn4t1OHIJw3+XU7mJJQV/2NAfw5OAk6G6Hoo3zcvz/XOfQ52Vgi+AN4Uxoxi0KBBwk2g8zPrTDA4btSB/Q==} resolution: {integrity: sha512-ggqQKvx/PsB0FaWXhIvVkSWh7a/PCLQAsMjBc+nA2M8Rv2/HG0X6zvixAB7KyZBRtifBUhy5k8voQX/mRnABPg==}
engines: {node: '>=18.0.0', npm: '>=8.0.0'} engines: {node: '>=18.0.0', npm: '>=8.0.0'}
hasBin: true hasBin: true
dependencies: dependencies:
'@types/estree': 1.0.5 '@types/estree': 1.0.5
optionalDependencies: optionalDependencies:
'@rollup/rollup-android-arm-eabi': 4.12.0 '@rollup/rollup-android-arm-eabi': 4.12.1
'@rollup/rollup-android-arm64': 4.12.0 '@rollup/rollup-android-arm64': 4.12.1
'@rollup/rollup-darwin-arm64': 4.12.0 '@rollup/rollup-darwin-arm64': 4.12.1
'@rollup/rollup-darwin-x64': 4.12.0 '@rollup/rollup-darwin-x64': 4.12.1
'@rollup/rollup-linux-arm-gnueabihf': 4.12.0 '@rollup/rollup-linux-arm-gnueabihf': 4.12.1
'@rollup/rollup-linux-arm64-gnu': 4.12.0 '@rollup/rollup-linux-arm64-gnu': 4.12.1
'@rollup/rollup-linux-arm64-musl': 4.12.0 '@rollup/rollup-linux-arm64-musl': 4.12.1
'@rollup/rollup-linux-riscv64-gnu': 4.12.0 '@rollup/rollup-linux-riscv64-gnu': 4.12.1
'@rollup/rollup-linux-x64-gnu': 4.12.0 '@rollup/rollup-linux-x64-gnu': 4.12.1
'@rollup/rollup-linux-x64-musl': 4.12.0 '@rollup/rollup-linux-x64-musl': 4.12.1
'@rollup/rollup-win32-arm64-msvc': 4.12.0 '@rollup/rollup-win32-arm64-msvc': 4.12.1
'@rollup/rollup-win32-ia32-msvc': 4.12.0 '@rollup/rollup-win32-ia32-msvc': 4.12.1
'@rollup/rollup-win32-x64-msvc': 4.12.0 '@rollup/rollup-win32-x64-msvc': 4.12.1
fsevents: 2.3.3 fsevents: 2.3.3
/run-parallel@1.2.0: /run-parallel@1.2.0:
@ -6713,10 +6673,6 @@ packages:
resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
dev: false dev: false
/safer-buffer@2.1.2:
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
dev: false
/sander@0.5.1: /sander@0.5.1:
resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==} resolution: {integrity: sha512-3lVqBir7WuKDHGrKRDn/1Ye3kwpXaDOMsiRP1wd6wpZW56gJhsbp5RqQpA6JG/P+pkXizygnr1dKR8vzWaVsfA==}
dependencies: dependencies:
@ -6791,6 +6747,7 @@ packages:
hasBin: true hasBin: true
dependencies: dependencies:
lru-cache: 6.0.0 lru-cache: 6.0.0
dev: true
/semver@7.6.0: /semver@7.6.0:
resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==}
@ -6798,11 +6755,6 @@ packages:
hasBin: true hasBin: true
dependencies: dependencies:
lru-cache: 6.0.0 lru-cache: 6.0.0
dev: true
/seq-queue@0.0.5:
resolution: {integrity: sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==}
dev: false
/set-blocking@2.0.0: /set-blocking@2.0.0:
resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==}
@ -6927,11 +6879,6 @@ packages:
engines: {node: '>= 10.x'} engines: {node: '>= 10.x'}
dev: false dev: false
/sqlstring@2.3.3:
resolution: {integrity: sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==}
engines: {node: '>= 0.6'}
dev: false
/stackback@0.0.2: /stackback@0.0.2:
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
dev: true dev: true
@ -7011,8 +6958,8 @@ packages:
copy-anything: 3.0.5 copy-anything: 3.0.5
dev: true dev: true
/superstruct@1.0.3: /superstruct@1.0.4:
resolution: {integrity: sha512-8iTn3oSS8nRGn+C2pgXSKPI3jmpm6FExNazNpjvqS6ZUJQCej3PUXEKM8NjHBOs54ExM+LPW/FBRhymrdcCiSg==} resolution: {integrity: sha512-7JpaAoX2NGyoFlI9NBh66BQXGONc+uE+MRS5i2iOBKuS4e+ccgMDjATgZldkah+33DakBxDHiss9kvUcGAO8UQ==}
engines: {node: '>=14.0.0'} engines: {node: '>=14.0.0'}
requiresBuild: true requiresBuild: true
optional: true optional: true
@ -7203,7 +7150,7 @@ packages:
'@sveltejs/kit': 1.x || 2.x '@sveltejs/kit': 1.x || 2.x
svelte: 3.x || 4.x || >=5.0.0-next.51 svelte: 3.x || 4.x || >=5.0.0-next.51
dependencies: dependencies:
'@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5) '@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6)
svelte: 4.2.12 svelte: 4.2.12
dev: true dev: true
@ -7213,7 +7160,7 @@ packages:
'@sveltejs/kit': 1.x || 2.x '@sveltejs/kit': 1.x || 2.x
dependencies: dependencies:
'@isaacs/ttlcache': 1.4.1 '@isaacs/ttlcache': 1.4.1
'@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5) '@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6)
dev: true dev: true
/sveltekit-superforms@2.8.1(@sveltejs/kit@2.5.3)(@types/json-schema@7.0.15)(esbuild-runner@2.2.2)(esbuild@0.20.1)(svelte@4.2.12): /sveltekit-superforms@2.8.1(@sveltejs/kit@2.5.3)(@types/json-schema@7.0.15)(esbuild-runner@2.2.2)(esbuild@0.20.1)(svelte@4.2.12):
@ -7222,7 +7169,7 @@ packages:
'@sveltejs/kit': 1.x || 2.x '@sveltejs/kit': 1.x || 2.x
svelte: 3.x || 4.x || >=5.0.0-next.51 svelte: 3.x || 4.x || >=5.0.0-next.51
dependencies: dependencies:
'@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.5) '@sveltejs/kit': 2.5.3(@sveltejs/vite-plugin-svelte@3.0.2)(svelte@4.2.12)(vite@5.1.6)
devalue: 4.3.2 devalue: 4.3.2
just-clone: 6.2.0 just-clone: 6.2.0
memoize-weak: 1.0.2 memoize-weak: 1.0.2
@ -7235,7 +7182,7 @@ packages:
'@vinejs/vine': 1.7.1 '@vinejs/vine': 1.7.1
arktype: 1.0.29-alpha arktype: 1.0.29-alpha
joi: 17.12.2 joi: 17.12.2
superstruct: 1.0.3 superstruct: 1.0.4
valibot: 0.29.0 valibot: 0.29.0
yup: 1.4.0 yup: 1.4.0
zod: 3.22.4 zod: 3.22.4
@ -7413,7 +7360,7 @@ packages:
/ts-interface-checker@0.1.13: /ts-interface-checker@0.1.13:
resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==}
/ts-node@10.9.2(@types/node@20.11.25)(typescript@5.4.2): /ts-node@10.9.2(@types/node@20.11.26)(typescript@5.4.2):
resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -7432,7 +7379,7 @@ packages:
'@tsconfig/node12': 1.0.11 '@tsconfig/node12': 1.0.11
'@tsconfig/node14': 1.0.3 '@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4 '@tsconfig/node16': 1.0.4
'@types/node': 20.11.25 '@types/node': 20.11.26
acorn: 8.11.2 acorn: 8.11.2
acorn-walk: 8.3.0 acorn-walk: 8.3.0
arg: 4.1.3 arg: 4.1.3
@ -7581,7 +7528,7 @@ packages:
- rollup - rollup
dev: true dev: true
/vite-node@1.3.1(@types/node@20.11.25)(sass@1.71.1): /vite-node@1.3.1(@types/node@20.11.26)(sass@1.71.1):
resolution: {integrity: sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==} resolution: {integrity: sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
@ -7590,7 +7537,7 @@ packages:
debug: 4.3.4 debug: 4.3.4
pathe: 1.1.2 pathe: 1.1.2
picocolors: 1.0.0 picocolors: 1.0.0
vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) vite: 5.1.6(@types/node@20.11.26)(sass@1.71.1)
transitivePeerDependencies: transitivePeerDependencies:
- '@types/node' - '@types/node'
- less - less
@ -7602,8 +7549,8 @@ packages:
- terser - terser
dev: true dev: true
/vite@5.1.5(@types/node@20.11.25)(sass@1.71.1): /vite@5.1.6(@types/node@20.11.26)(sass@1.71.1):
resolution: {integrity: sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==} resolution: {integrity: sha512-yYIAZs9nVfRJ/AiOLCA91zzhjsHUgMjB+EigzFb6W2XTLO8JixBCKCjvhKZaye+NKYHCrkv3Oh50dH9EdLU2RA==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -7630,15 +7577,15 @@ packages:
terser: terser:
optional: true optional: true
dependencies: dependencies:
'@types/node': 20.11.25 '@types/node': 20.11.26
esbuild: 0.19.12 esbuild: 0.19.12
postcss: 8.4.35 postcss: 8.4.35
rollup: 4.12.0 rollup: 4.12.1
sass: 1.71.1 sass: 1.71.1
optionalDependencies: optionalDependencies:
fsevents: 2.3.3 fsevents: 2.3.3
/vitefu@0.2.5(vite@5.1.5): /vitefu@0.2.5(vite@5.1.6):
resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==} resolution: {integrity: sha512-SgHtMLoqaeeGnd2evZ849ZbACbnwQCIwRH57t18FxcXoZop0uQu0uzlIhJBlF/eWVzuce0sHeqPcDo+evVcg8Q==}
peerDependencies: peerDependencies:
vite: ^3.0.0 || ^4.0.0 || ^5.0.0 vite: ^3.0.0 || ^4.0.0 || ^5.0.0
@ -7646,9 +7593,9 @@ packages:
vite: vite:
optional: true optional: true
dependencies: dependencies:
vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) vite: 5.1.6(@types/node@20.11.26)(sass@1.71.1)
/vitest@1.3.1(@types/node@20.11.25)(sass@1.71.1): /vitest@1.3.1(@types/node@20.11.26)(sass@1.71.1):
resolution: {integrity: sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==} resolution: {integrity: sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==}
engines: {node: ^18.0.0 || >=20.0.0} engines: {node: ^18.0.0 || >=20.0.0}
hasBin: true hasBin: true
@ -7673,7 +7620,7 @@ packages:
jsdom: jsdom:
optional: true optional: true
dependencies: dependencies:
'@types/node': 20.11.25 '@types/node': 20.11.26
'@vitest/expect': 1.3.1 '@vitest/expect': 1.3.1
'@vitest/runner': 1.3.1 '@vitest/runner': 1.3.1
'@vitest/snapshot': 1.3.1 '@vitest/snapshot': 1.3.1
@ -7691,8 +7638,8 @@ packages:
strip-literal: 2.0.0 strip-literal: 2.0.0
tinybench: 2.6.0 tinybench: 2.6.0
tinypool: 0.8.2 tinypool: 0.8.2
vite: 5.1.5(@types/node@20.11.25)(sass@1.71.1) vite: 5.1.6(@types/node@20.11.26)(sass@1.71.1)
vite-node: 1.3.1(@types/node@20.11.25)(sass@1.71.1) vite-node: 1.3.1(@types/node@20.11.26)(sass@1.71.1)
why-is-node-running: 2.2.2 why-is-node-running: 2.2.2
transitivePeerDependencies: transitivePeerDependencies:
- less - less

View file

@ -1,8 +1,8 @@
import db from "$lib/drizzle"; import db from "$lib/drizzle";
import { eq } from "drizzle-orm"; import { eq } from "drizzle-orm";
import { password_reset_tokens } from "../../schema";
import { generateId } from "lucia"; import { generateId } from "lucia";
import { TimeSpan, createDate } from "oslo"; import { TimeSpan, createDate } from "oslo";
import { password_reset_tokens } from "../../schema";
export async function createPasswordResetToken(userId: string): Promise<string> { export async function createPasswordResetToken(userId: string): Promise<string> {
// optionally invalidate all existing tokens // optionally invalidate all existing tokens

View file

@ -1,7 +1,6 @@
// lib/server/lucia.ts // lib/server/lucia.ts
import { Lucia, TimeSpan } from 'lucia'; import { Lucia, TimeSpan } from 'lucia';
import { DrizzlePostgreSQLAdapter } from "@lucia-auth/adapter-drizzle"; import { DrizzlePostgreSQLAdapter } from "@lucia-auth/adapter-drizzle";
import { dev } from '$app/environment';
import db from '$lib/drizzle'; import db from '$lib/drizzle';
import { sessions, users } from '../../schema'; import { sessions, users } from '../../schema';
@ -29,9 +28,9 @@ export const lucia = new Lucia(adapter, {
expires: false, // session cookies have very long lifespan (2 years) expires: false, // session cookies have very long lifespan (2 years)
attributes: { attributes: {
// set to `true` when using HTTPS // set to `true` when using HTTPS
secure: !dev, secure: process.env.NODE_ENV === 'production',
sameSite: 'strict', sameSite: 'strict',
domain: dev ? 'localhost' : 'boredgame.vercel.app', domain: process.env.NODE_ENV === 'production' ? 'boredgame.vercel.app' : 'localhost',
} }
}, },
}); });

View file

@ -5,11 +5,11 @@ import { migrate } from 'drizzle-orm/postgres-js/migrator';
const connection = postgres({ const connection = postgres({
host: process.env.DATABASE_HOST || 'localhost', host: process.env.DATABASE_HOST || 'localhost',
port: 5432, port: process.env.DATABASE_PORT,
user: process.env.DATABASE_USER || 'root', user: process.env.DATABASE_USER || 'root',
password: process.env.DATABASE_PASSWORD || '', password: process.env.DATABASE_PASSWORD || '',
database: process.env.DATABASE_DB || 'boredgame', database: process.env.DATABASE_DB || 'boredgame',
ssl: process.env.DATABASE_HOST === 'localhost' ? false : 'require', ssl: process.env.NODE_ENV === 'development' ? false : 'require',
max: 1 max: 1
}); });
const db = drizzle(connection); const db = drizzle(connection);
@ -21,5 +21,5 @@ try {
console.error(e); console.error(e);
} }
await connection.end(); // await connection.end();
process.exit(); process.exit();

View file

@ -1,4 +1,4 @@
import { fail, type Actions } from '@sveltejs/kit'; import { fail, error, type Actions } from '@sveltejs/kit';
import { eq } from 'drizzle-orm'; import { eq } from 'drizzle-orm';
import { zod } from 'sveltekit-superforms/adapters'; import { zod } from 'sveltekit-superforms/adapters';
import { setError, superValidate } from 'sveltekit-superforms/server'; import { setError, superValidate } from 'sveltekit-superforms/server';
@ -6,9 +6,10 @@ import { redirect } from 'sveltekit-flash-message/server';
import { Argon2id } from 'oslo/password'; import { Argon2id } from 'oslo/password';
import db from '$lib/drizzle'; import db from '$lib/drizzle';
import { lucia } from '$lib/server/auth'; import { lucia } from '$lib/server/auth';
import { signInSchema } from '$lib/validations/auth' import { signInSchema } from '$lib/validations/auth';
import { collections, users, wishlists } from '../../../schema'; import { collections, users, wishlists } from '../../../schema';
import type { PageServerLoad } from './$types'; import type { PageServerLoad } from './$types';
import { RateLimiter } from 'sveltekit-rate-limiter/server';
export const load: PageServerLoad = async (event) => { export const load: PageServerLoad = async (event) => {
if (event.locals.user) { if (event.locals.user) {
@ -23,8 +24,17 @@ export const load: PageServerLoad = async (event) => {
}; };
}; };
const limiter = new RateLimiter({
// A rate is defined by [number, unit]
IPUA: [5, 'm']
});
export const actions: Actions = { export const actions: Actions = {
default: async (event) => { default: async (event) => {
if (await limiter.isLimited(event)) {
throw error(429);
}
const { locals } = event; const { locals } = event;
const form = await superValidate(event, zod(signInSchema)); const form = await superValidate(event, zod(signInSchema));
@ -87,8 +97,9 @@ export const actions: Actions = {
return setError(form, '', 'Your username or password is incorrect.'); return setError(form, '', 'Your username or password is incorrect.');
} }
console.log('setting session cookie', sessionCookie);
event.cookies.set(sessionCookie.name, sessionCookie.value, { event.cookies.set(sessionCookie.name, sessionCookie.value, {
path: ".", path: '.',
...sessionCookie.attributes ...sessionCookie.attributes
}); });

View file

@ -5,6 +5,7 @@ import { nanoid } from 'nanoid';
import { zod } from 'sveltekit-superforms/adapters'; import { zod } from 'sveltekit-superforms/adapters';
import { setError, superValidate } from 'sveltekit-superforms/server'; import { setError, superValidate } from 'sveltekit-superforms/server';
import { redirect } from 'sveltekit-flash-message/server'; import { redirect } from 'sveltekit-flash-message/server';
import { RateLimiter } from 'sveltekit-rate-limiter/server';
import type { PageServerLoad } from './$types'; import type { PageServerLoad } from './$types';
import { lucia } from '$lib/server/auth'; import { lucia } from '$lib/server/auth';
import { signUpSchema } from '$lib/validations/auth'; import { signUpSchema } from '$lib/validations/auth';
@ -12,6 +13,11 @@ import { add_user_to_role } from '$server/roles';
import db from '$lib/drizzle'; import db from '$lib/drizzle';
import { collections, users, wishlists } from '../../../schema'; import { collections, users, wishlists } from '../../../schema';
const limiter = new RateLimiter({
// A rate is defined by [number, unit]
IPUA: [5, 'm']
});
const signUpDefaults = { const signUpDefaults = {
firstName: '', firstName: '',
lastName: '', lastName: '',
@ -39,6 +45,9 @@ export const load: PageServerLoad = async (event) => {
export const actions: Actions = { export const actions: Actions = {
default: async (event) => { default: async (event) => {
if (await limiter.isLimited(event)) {
throw error(429);
}
// fail(401, { message: 'Sign-up not yet available. Please add your email to the waitlist!' }); // fail(401, { message: 'Sign-up not yet available. Please add your email to the waitlist!' });
const form = await superValidate(event, zod(signUpSchema)); const form = await superValidate(event, zod(signUpSchema));
if (!form.valid) { if (!form.valid) {
@ -54,9 +63,9 @@ export const actions: Actions = {
// Adding user to the db // Adding user to the db
console.log('Check if user already exists'); console.log('Check if user already exists');
const existing_user = await db.query const existing_user = await db.query.users.findFirst({
.users where: eq(users.username, form.data.username)
.findFirst({ where: eq(users.username, form.data.username) }); });
if (existing_user) { if (existing_user) {
return setError(form, 'username', 'You cannot create an account with that username'); return setError(form, 'username', 'You cannot create an account with that username');
@ -66,7 +75,8 @@ export const actions: Actions = {
const hashedPassword = await new Argon2id().hash(form.data.password); const hashedPassword = await new Argon2id().hash(form.data.password);
const user = await db.insert(users) const user = await db
.insert(users)
.values({ .values({
username: form.data.username, username: form.data.username,
hashed_password: hashedPassword, hashed_password: hashedPassword,
@ -76,7 +86,8 @@ export const actions: Actions = {
verified: false, verified: false,
receive_email: false, receive_email: false,
theme: 'system' theme: 'system'
}).returning(); })
.returning();
console.log('signup user', user); console.log('signup user', user);
if (!user || user.length === 0) { if (!user || user.length === 0) {
@ -87,14 +98,12 @@ export const actions: Actions = {
} }
add_user_to_role(user[0].id, 'user'); add_user_to_role(user[0].id, 'user');
await db.insert(collections) await db.insert(collections).values({
.values({ user_id: user[0].id
user_id: user[0].id });
}); await db.insert(wishlists).values({
await db.insert(wishlists) user_id: user[0].id
.values({ });
user_id: user[0].id
});
try { try {
session = await lucia.createSession(user[0].id, { session = await lucia.createSession(user[0].id, {
@ -118,7 +127,7 @@ export const actions: Actions = {
} }
event.cookies.set(sessionCookie.name, sessionCookie.value, { event.cookies.set(sessionCookie.name, sessionCookie.value, {
path: ".", path: '.',
...sessionCookie.attributes ...sessionCookie.attributes
}); });

View file

@ -2,55 +2,34 @@ import { relations, sql, type InferSelectModel } from 'drizzle-orm';
import { import {
pgTable, pgTable,
timestamp, timestamp,
varchar, text,
boolean, boolean,
integer, integer,
text,
index, index,
pgEnum, pgEnum,
primaryKey primaryKey,
uuid
} from 'drizzle-orm/pg-core'; } from 'drizzle-orm/pg-core';
import { nanoid } from 'nanoid'; import { createId as cuid2 } from '@paralleldrive/cuid2';
import { tsvector } from './tsVector'; import { tsvector } from './tsVector';
// User Related Schemas // User Related Schemas
export const users = pgTable('users', { export const users = pgTable('users', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), username: text('username').unique(),
username: varchar('username', { hashed_password: text('hashed_password'),
length: 255 email: text('email').unique(),
}).unique(), first_name: text('first_name'),
hashed_password: varchar('hashed_password', { last_name: text('last_name'),
length: 255
}),
email: varchar('email', {
length: 255
}).unique(),
first_name: varchar('first_name', {
length: 255
}),
last_name: varchar('last_name', {
length: 255
}),
verified: boolean('verified').default(false), verified: boolean('verified').default(false),
receive_email: boolean('receive_email').default(false), receive_email: boolean('receive_email').default(false),
theme: varchar('theme', { theme: text('theme').default('system'),
length: 255 created_at: timestamp('created_at').notNull().defaultNow(),
}).default('system'), updated_at: timestamp('updated_at').notNull().defaultNow()
created_at: timestamp('created_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export const user_relations = relations(users, ({ many }) => ({ export const user_relations = relations(users, ({ many }) => ({
@ -60,35 +39,24 @@ export const user_relations = relations(users, ({ many }) => ({
export type Users = InferSelectModel<typeof users>; export type Users = InferSelectModel<typeof users>;
export const sessions = pgTable('sessions', { export const sessions = pgTable('sessions', {
id: varchar('id', { id: text('id').primaryKey(),
length: 255 userId: uuid('user_id')
}).primaryKey(),
userId: varchar('user_id', {
length: 255
})
.notNull() .notNull()
.references(() => users.id), .references(() => users.id),
expiresAt: timestamp('expires_at', { expiresAt: timestamp('expires_at', {
withTimezone: true, withTimezone: true,
mode: 'date' mode: 'date'
}).notNull(), }).notNull(),
ipCountry: varchar('ip_country', { ipCountry: text('ip_country'),
length: 255 ipAddress: text('ip_address')
}),
ipAddress: varchar('ip_address', {
length: 255
})
}); });
export const roles = pgTable('roles', { export const roles = pgTable('roles', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), name: text('name').unique()
name: varchar('name', {
length: 255
}).unique()
}); });
export type Roles = InferSelectModel<typeof roles>; export type Roles = InferSelectModel<typeof roles>;
@ -98,31 +66,18 @@ export const role_relations = relations(roles, ({ many }) => ({
})); }));
export const user_roles = pgTable('user_roles', { export const user_roles = pgTable('user_roles', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), user_id: uuid('user_id')
user_id: varchar('user_id', {
length: 255
})
.notNull() .notNull()
.references(() => users.id, { onDelete: 'cascade' }), .references(() => users.id, { onDelete: 'cascade' }),
role_id: varchar('role_id', { role_id: uuid('role_id')
length: 255
})
.notNull() .notNull()
.references(() => roles.id, { onDelete: 'cascade' }), .references(() => roles.id, { onDelete: 'cascade' }),
created_at: timestamp('created_at', { created_at: timestamp('created_at').notNull().defaultNow(),
withTimezone: true, updated_at: timestamp('updated_at').notNull().defaultNow()
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export const user_role_relations = relations(user_roles, ({ one }) => ({ export const user_role_relations = relations(user_roles, ({ one }) => ({
@ -139,14 +94,10 @@ export const user_role_relations = relations(user_roles, ({ one }) => ({
export type UserRoles = InferSelectModel<typeof user_roles>; export type UserRoles = InferSelectModel<typeof user_roles>;
export const password_reset_tokens = pgTable('password_reset_tokens', { export const password_reset_tokens = pgTable('password_reset_tokens', {
id: varchar('id', { id: text('id')
length: 255
})
.primaryKey() .primaryKey()
.$defaultFn(() => nanoid()), .$defaultFn(() => cuid2()),
user_id: varchar('user_id', { user_id: uuid('user_id')
length: 255
})
.notNull() .notNull()
.references(() => users.id, { onDelete: 'cascade' }), .references(() => users.id, { onDelete: 'cascade' }),
expires_at: timestamp('expires_at', { expires_at: timestamp('expires_at', {
@ -154,11 +105,7 @@ export const password_reset_tokens = pgTable('password_reset_tokens', {
mode: 'date', mode: 'date',
precision: 6 precision: 6
}), }),
created_at: timestamp('created_at', { created_at: timestamp('created_at').notNull().defaultNow()
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export const password_reset_token_relations = relations(password_reset_tokens, ({ one }) => ({ export const password_reset_token_relations = relations(password_reset_tokens, ({ one }) => ({
@ -169,26 +116,15 @@ export const password_reset_token_relations = relations(password_reset_tokens, (
})); }));
export const collections = pgTable('collections', { export const collections = pgTable('collections', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), user_id: uuid('user_id')
user_id: varchar('user_id', {
length: 255
})
.notNull() .notNull()
.references(() => users.id, { onDelete: 'cascade' }), .references(() => users.id, { onDelete: 'cascade' }),
created_at: timestamp('created_at', { created_at: timestamp('created_at').notNull().defaultNow(),
withTimezone: true, updated_at: timestamp('updated_at').notNull().defaultNow()
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export const collection_relations = relations(collections, ({ one }) => ({ export const collection_relations = relations(collections, ({ one }) => ({
@ -199,32 +135,19 @@ export const collection_relations = relations(collections, ({ one }) => ({
})); }));
export const collection_items = pgTable('collection_items', { export const collection_items = pgTable('collection_items', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), collection_id: uuid('collection_id')
collection_id: varchar('collection_id', {
length: 255
})
.notNull() .notNull()
.references(() => collections.id, { onDelete: 'cascade' }), .references(() => collections.id, { onDelete: 'cascade' }),
game_id: varchar('game_id', { game_id: uuid('game_id')
length: 255
})
.notNull() .notNull()
.references(() => games.id, { onDelete: 'cascade' }), .references(() => games.id, { onDelete: 'cascade' }),
times_played: integer('times_played').default(0), times_played: integer('times_played').default(0),
created_at: timestamp('created_at', { created_at: timestamp('created_at').notNull().defaultNow(),
withTimezone: true, updated_at: timestamp('updated_at').notNull().defaultNow()
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export type CollectionItems = InferSelectModel<typeof collection_items>; export type CollectionItems = InferSelectModel<typeof collection_items>;
@ -241,26 +164,15 @@ export const collection_item_relations = relations(collection_items, ({ one }) =
})); }));
export const wishlists = pgTable('wishlists', { export const wishlists = pgTable('wishlists', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), user_id: uuid('user_id')
user_id: varchar('user_id', {
length: 255
})
.notNull() .notNull()
.references(() => users.id, { onDelete: 'cascade' }), .references(() => users.id, { onDelete: 'cascade' }),
created_at: timestamp('created_at', { created_at: timestamp('created_at').notNull().defaultNow(),
withTimezone: true, updated_at: timestamp('updated_at').notNull().defaultNow()
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export type Wishlists = InferSelectModel<typeof wishlists>; export type Wishlists = InferSelectModel<typeof wishlists>;
@ -269,35 +181,22 @@ export const wishlists_relations = relations(wishlists, ({ one }) => ({
user: one(users, { user: one(users, {
fields: [wishlists.user_id], fields: [wishlists.user_id],
references: [users.id] references: [users.id]
}), })
})); }));
export const wishlist_items = pgTable('wishlist_items', { export const wishlist_items = pgTable('wishlist_items', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), wishlist_id: uuid('wishlist_id')
wishlist_id: varchar('wishlist_id', {
length: 255
})
.notNull() .notNull()
.references(() => wishlists.id, { onDelete: 'cascade' }), .references(() => wishlists.id, { onDelete: 'cascade' }),
game_id: varchar('game_id', { game_id: uuid('game_id')
length: 255
})
.notNull() .notNull()
.references(() => games.id, { onDelete: 'cascade' }), .references(() => games.id, { onDelete: 'cascade' }),
created_at: timestamp('created_at', { created_at: timestamp('created_at').notNull().defaultNow(),
withTimezone: true, updated_at: timestamp('updated_at').notNull().defaultNow()
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export type WishlistItems = InferSelectModel<typeof wishlist_items>; export type WishlistItems = InferSelectModel<typeof wishlist_items>;
@ -325,15 +224,12 @@ export const externalIdType = pgEnum('external_id_type', [
]); ]);
export const externalIds = pgTable('external_ids', { export const externalIds = pgTable('external_ids', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()),
type: externalIdType('type').notNull(), type: externalIdType('type').notNull(),
externalId: varchar('external_id', { externalId: text('external_id').notNull()
length: 255
}).notNull()
}); });
export type ExternalIds = InferSelectModel<typeof externalIds>; export type ExternalIds = InferSelectModel<typeof externalIds>;
@ -341,17 +237,12 @@ export type ExternalIds = InferSelectModel<typeof externalIds>;
export const games = pgTable( export const games = pgTable(
'games', 'games',
{ {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), name: text('name'),
name: varchar('name', { slug: text('slug'),
length: 255
}),
slug: varchar('slug', {
length: 255
}),
description: text('description'), description: text('description'),
year_published: integer('year_published'), year_published: integer('year_published'),
min_players: integer('min_players'), min_players: integer('min_players'),
@ -360,31 +251,17 @@ export const games = pgTable(
min_playtime: integer('min_playtime'), min_playtime: integer('min_playtime'),
max_playtime: integer('max_playtime'), max_playtime: integer('max_playtime'),
min_age: integer('min_age'), min_age: integer('min_age'),
image_url: varchar('image_url', { image_url: text('image_url'),
length: 255 thumb_url: text('thumb_url'),
}), url: text('url'),
thumb_url: varchar('thumb_url', {
length: 255
}),
url: varchar('url', {
length: 255
}),
text_searchable_index: tsvector('text_searchable_index'), text_searchable_index: tsvector('text_searchable_index'),
last_sync_at: timestamp('last_sync_at', { last_sync_at: timestamp('last_sync_at', {
withTimezone: true, withTimezone: true,
mode: 'date', mode: 'date',
precision: 6 precision: 6
}), }),
created_at: timestamp('created_at', { created_at: timestamp('created_at').notNull().defaultNow(),
withTimezone: true, updated_at: timestamp('updated_at').notNull().defaultNow()
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}, },
(table) => { (table) => {
return { return {
@ -400,14 +277,10 @@ export type Games = InferSelectModel<typeof games>;
export const gamesToExternalIds = pgTable( export const gamesToExternalIds = pgTable(
'games_to_external_ids', 'games_to_external_ids',
{ {
gameId: varchar('game_id', { gameId: uuid('game_id')
length: 255
})
.notNull() .notNull()
.references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
externalId: varchar('external_id', { externalId: uuid('external_id')
length: 255
})
.notNull() .notNull()
.references(() => externalIds.id, { onDelete: 'restrict', onUpdate: 'cascade' }) .references(() => externalIds.id, { onDelete: 'restrict', onUpdate: 'cascade' })
}, },
@ -428,31 +301,18 @@ export const gameRelations = relations(games, ({ many }) => ({
})); }));
export const expansions = pgTable('expansions', { export const expansions = pgTable('expansions', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), base_game_id: uuid('base_game_id')
base_game_id: varchar('base_game_id', {
length: 255
})
.notNull() .notNull()
.references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
game_id: varchar('game_id', { game_id: uuid('game_id')
length: 255
})
.notNull() .notNull()
.references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
created_at: timestamp('created_at', { created_at: timestamp('created_at').notNull().defaultNow(),
withTimezone: true, updated_at: timestamp('updated_at').notNull().defaultNow()
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export type Expansions = InferSelectModel<typeof expansions>; export type Expansions = InferSelectModel<typeof expansions>;
@ -469,49 +329,36 @@ export const expansion_relations = relations(expansions, ({ one }) => ({
})); }));
export const publishers = pgTable('publishers', { export const publishers = pgTable('publishers', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), name: text('name'),
name: varchar('name', { slug: text('slug'),
length: 255 created_at: timestamp('created_at').notNull().defaultNow(),
}), updated_at: timestamp('updated_at').notNull().defaultNow()
slug: varchar('slug', {
length: 255
}),
created_at: timestamp('created_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export type Publishers = InferSelectModel<typeof publishers>; export type Publishers = InferSelectModel<typeof publishers>;
export const publishersToExternalIds = pgTable('publishers_to_external_ids', { export const publishersToExternalIds = pgTable(
publisherId: varchar('publisher_id', { 'publishers_to_external_ids',
length: 255 {
}) publisherId: uuid('publisher_id')
.notNull() .notNull()
.references(() => publishers.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => publishers.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
externalId: varchar('external_id', { externalId: uuid('external_id')
length: 255 .notNull()
}) .references(() => externalIds.id, { onDelete: 'restrict', onUpdate: 'cascade' })
.notNull() },
.references(() => externalIds.id, { onDelete: 'restrict', onUpdate: 'cascade' }) (table) => {
}, (table) => { return {
return { publishersToExternalIdsPkey: primaryKey({
publishersToExternalIdsPkey: primaryKey({ columns: [table.publisherId, table.externalId]
columns: [table.publisherId, table.externalId] })
}) };
} }
}); );
export const publishers_relations = relations(publishers, ({ many }) => ({ export const publishers_relations = relations(publishers, ({ many }) => ({
publishers_to_games: many(publishers_to_games), publishers_to_games: many(publishers_to_games),
@ -519,68 +366,55 @@ export const publishers_relations = relations(publishers, ({ many }) => ({
})); }));
export const categories = pgTable('categories', { export const categories = pgTable('categories', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), name: text('name'),
name: varchar('name', { slug: text('slug'),
length: 255 created_at: timestamp('created_at').notNull().defaultNow(),
}), updated_at: timestamp('updated_at').notNull().defaultNow()
slug: varchar('slug', {
length: 255
}),
created_at: timestamp('created_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export type Categories = InferSelectModel<typeof categories>; export type Categories = InferSelectModel<typeof categories>;
export const categoriesToExternalIds = pgTable('categories_to_external_ids', { export const categoriesToExternalIds = pgTable(
categoryId: varchar('category_id', { 'categories_to_external_ids',
length: 255 {
}) categoryId: uuid('category_id')
.notNull() .notNull()
.references(() => categories.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => categories.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
externalId: varchar('external_id', { externalId: uuid('external_id')
length: 255 .notNull()
}) .references(() => externalIds.id, { onDelete: 'restrict', onUpdate: 'cascade' })
.notNull() },
.references(() => externalIds.id, { onDelete: 'restrict', onUpdate: 'cascade' }) (table) => {
}, (table) => { return {
return { categoriesToExternalIdsPkey: primaryKey({
categoriesToExternalIdsPkey: primaryKey({ columns: [table.categoryId, table.externalId]
columns: [table.categoryId, table.externalId] })
}) };
} }
}); );
export const categories_to_games = pgTable('categories_to_games', { export const categories_to_games = pgTable(
category_id: varchar('category_id', { 'categories_to_games',
length: 255 {
}) category_id: uuid('category_id')
.notNull() .notNull()
.references(() => categories.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => categories.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
game_id: varchar('game_id', { game_id: uuid('game_id')
length: 255 .notNull()
}) .references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' })
.notNull() },
.references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }) (table) => {
}, (table) => { return {
return { categoriesToGamesPkey: primaryKey({
categoriesToGamesPkey: primaryKey({ columns: [table.category_id, table.game_id]
columns: [table.category_id, table.game_id] })
}) };
} }
}); );
export const categories_to_games_relations = relations(categories_to_games, ({ one }) => ({ export const categories_to_games_relations = relations(categories_to_games, ({ one }) => ({
category: one(categories, { category: one(categories, {
@ -599,73 +433,60 @@ export const categories_relations = relations(categories, ({ many }) => ({
})); }));
export const mechanics = pgTable('mechanics', { export const mechanics = pgTable('mechanics', {
id: varchar('id', { id: uuid('id').primaryKey(),
length: 255 cuid: text('cuid')
}) .unique()
.primaryKey() .$defaultFn(() => cuid2()),
.$defaultFn(() => nanoid()), name: text('name'),
name: varchar('name', { slug: text('slug'),
length: 255 created_at: timestamp('created_at').notNull().defaultNow(),
}), updated_at: timestamp('updated_at').notNull().defaultNow()
slug: varchar('slug', {
length: 255
}),
created_at: timestamp('created_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`),
updated_at: timestamp('updated_at', {
withTimezone: true,
mode: 'date',
precision: 6
}).default(sql`now()`)
}); });
export type Mechanics = InferSelectModel<typeof mechanics>; export type Mechanics = InferSelectModel<typeof mechanics>;
export const mechanicsToExternalIds = pgTable('mechanics_to_external_ids', { export const mechanicsToExternalIds = pgTable(
mechanicId: varchar('mechanic_id', { 'mechanics_to_external_ids',
length: 255 {
}) mechanicId: uuid('mechanic_id')
.notNull() .notNull()
.references(() => mechanics.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => mechanics.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
externalId: varchar('external_id', { externalId: uuid('external_id')
length: 255 .notNull()
}) .references(() => externalIds.id, { onDelete: 'restrict', onUpdate: 'cascade' })
.notNull() },
.references(() => externalIds.id, { onDelete: 'restrict', onUpdate: 'cascade' }) (table) => {
}, (table) => { return {
return { mechanicsToExternalIdsPkey: primaryKey({
mechanicsToExternalIdsPkey: primaryKey({ columns: [table.mechanicId, table.externalId]
columns: [table.mechanicId, table.externalId] })
}) };
} }
}); );
export const mechanic_relations = relations(mechanics, ({ many }) => ({ export const mechanic_relations = relations(mechanics, ({ many }) => ({
mechanics_to_games: many(mechanics_to_games), mechanics_to_games: many(mechanics_to_games),
mechanicsToExternalIds: many(mechanicsToExternalIds) mechanicsToExternalIds: many(mechanicsToExternalIds)
})); }));
export const mechanics_to_games = pgTable('mechanics_to_games', { export const mechanics_to_games = pgTable(
mechanic_id: varchar('mechanic_id', { 'mechanics_to_games',
length: 255 {
}) mechanic_id: uuid('mechanic_id')
.notNull() .notNull()
.references(() => mechanics.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => mechanics.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
game_id: varchar('game_id', { game_id: uuid('game_id')
length: 255 .notNull()
}) .references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' })
.notNull() },
.references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }) (table) => {
}, (table) => { return {
return { mechanicsToGamesPkey: primaryKey({
mechanicsToGamesPkey: primaryKey({ columns: [table.mechanic_id, table.game_id]
columns: [table.mechanic_id, table.game_id] })
}) };
} }
}); );
export const mechanics_to_games_relations = relations(mechanics_to_games, ({ one }) => ({ export const mechanics_to_games_relations = relations(mechanics_to_games, ({ one }) => ({
mechanic: one(mechanics, { mechanic: one(mechanics, {
@ -678,24 +499,24 @@ export const mechanics_to_games_relations = relations(mechanics_to_games, ({ one
}) })
})); }));
export const publishers_to_games = pgTable('publishers_to_games', { export const publishers_to_games = pgTable(
publisher_id: varchar('publisher_id', { 'publishers_to_games',
length: 255 {
}) publisher_id: uuid('publisher_id')
.notNull() .notNull()
.references(() => publishers.id, { onDelete: 'restrict', onUpdate: 'cascade' }), .references(() => publishers.id, { onDelete: 'restrict', onUpdate: 'cascade' }),
game_id: varchar('game_id', { game_id: uuid('game_id')
length: 255 .notNull()
}) .references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' })
.notNull() },
.references(() => games.id, { onDelete: 'restrict', onUpdate: 'cascade' }) (table) => {
}, (table) => { return {
return { publishersToGamesPkey: primaryKey({
publishersToGamesPkey: primaryKey({ columns: [table.publisher_id, table.game_id]
columns: [table.publisher_id, table.game_id] })
}) };
} }
}); );
export const publishers_to_games_relations = relations(publishers_to_games, ({ one }) => ({ export const publishers_to_games_relations = relations(publishers_to_games, ({ one }) => ({
publisher: one(publishers, { publisher: one(publishers, {