From 5c19500748cefdf29769b5cbbd777c0697bc02ea Mon Sep 17 00:00:00 2001 From: Till-JS <101404291+Till-JS@users.noreply.github.com> Date: Mon, 2 Feb 2026 18:45:40 +0100 Subject: [PATCH] fix(mana-media): change userId from UUID to TEXT for Matrix user IDs Matrix user IDs like @user:matrix.org are not UUIDs, so the schema needs to accept text strings for the userId field in media_references. Co-Authored-By: Claude Opus 4.5 --- services/mana-media/apps/api/src/db/schema/media.schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/mana-media/apps/api/src/db/schema/media.schema.ts b/services/mana-media/apps/api/src/db/schema/media.schema.ts index 82d8d6678..333f8b2b8 100644 --- a/services/mana-media/apps/api/src/db/schema/media.schema.ts +++ b/services/mana-media/apps/api/src/db/schema/media.schema.ts @@ -65,8 +65,8 @@ export const mediaReferences = pgTable( mediaId: uuid('media_id') .references(() => media.id, { onDelete: 'cascade' }) .notNull(), - // Owner info - userId: uuid('user_id').notNull(), + // Owner info (can be UUID or Matrix user ID like @user:matrix.org) + userId: text('user_id').notNull(), // Source app (nutriphi, contacts, chat, etc.) app: text('app').notNull(), // Optional: reference to the source (e.g., mxc:// URL from Matrix)