fix(db): use TEXT for user_id columns across entire codebase

Better Auth generates non-UUID user IDs (32-char base62 format like
'otUe1YrfENPdHnrF3g1vSBfpkQfambCZ'). Changed all `uuid('user_id')` to
`text('user_id')` in Drizzle schemas for consistency with auth system.

Affected packages/apps:
- apps/calendar, clock, picture, zitare
- games/figgos, voxelava
- packages/manadeck-database, news-database, uload-database
- services/mana-core-auth (feedback schema)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Wuesteon 2025-12-09 16:30:51 +01:00
parent 4e63f3f74b
commit f440ca2a8d
33 changed files with 73 additions and 53 deletions

View file

@ -1,10 +1,10 @@
import { pgTable, uuid, timestamp, unique, varchar } from 'drizzle-orm/pg-core';
import { pgTable, uuid, text, timestamp, unique, varchar } from 'drizzle-orm/pg-core';
export const favorites = pgTable(
'favorites',
{
id: uuid('id').primaryKey().defaultRandom(),
userId: uuid('user_id').notNull(),
userId: text('user_id').notNull(),
quoteId: varchar('quote_id', { length: 100 }).notNull(), // References static quote ID from shared package
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
},

View file

@ -2,7 +2,7 @@ import { pgTable, uuid, text, timestamp, jsonb } from 'drizzle-orm/pg-core';
export const userLists = pgTable('user_lists', {
id: uuid('id').primaryKey().defaultRandom(),
userId: uuid('user_id').notNull(),
userId: text('user_id').notNull(),
name: text('name').notNull(),
description: text('description'),
quoteIds: jsonb('quote_ids').$type<string[]>().default([]), // References static quote IDs from shared package