From 2129b3055a5221c055668ada945434a794ed5d39 Mon Sep 17 00:00:00 2001 From: R0m1k3 Date: Tue, 3 Feb 2026 15:50:11 +0100 Subject: [PATCH] fix: Add missing freesound_config table to safe migration script --- server/migrate.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/migrate.ts b/server/migrate.ts index 9bcaf99..26ed145 100644 --- a/server/migrate.ts +++ b/server/migrate.ts @@ -79,6 +79,20 @@ export async function migrate() { "license" text, "created_at" timestamp DEFAULT now() ); + ); + `); + + // freesound_config + await client.query(` + CREATE TABLE IF NOT EXISTS "freesound_config" ( + "id" varchar PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "user_id" varchar NOT NULL REFERENCES "users"("id") ON DELETE cascade, + "client_id" text NOT NULL, + "client_secret" text NOT NULL, + "created_at" timestamp DEFAULT now(), + "updated_at" timestamp DEFAULT now(), + CONSTRAINT freesound_config_user_id_unique UNIQUE ("user_id") + ); `); console.log("[Migration] Safe migration completed.");