managarten/services/mana-auth/src
Till JS 89388fb369 refactor(mana-auth): move enums from public to auth schema
pgEnum() defaults to the public schema. Because
drizzle.config.ts sets schemaFilter: ['auth'], push introspection
never saw the enums and kept re-emitting CREATE TYPE access_tier ...,
failing with 42710. This blocked setup-databases.sh from advancing
mana-auth past the enum declarations and silently masked other drift
(e.g. the new `kind` column on auth.users going un-pushed).

Source side: three enums now live on authSchema via
authSchema.enum(...) instead of pgEnum(...). DB side: migration 006
recreates access_tier / user_role / user_kind inside the auth schema,
repoints auth.users.access_tier and auth.users.role via ::text cast
(preserving all data and defaults), and drops the old public types.

After this, `drizzle-kit push --force` reports "No changes detected"
on a clean DB and the broader `pnpm setup:db` run is green without
workarounds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 15:36:39 +02:00
..
auth feat(personas): M2.a-c — persona schemas + admin endpoints + seed pipeline 2026-04-23 13:55:14 +02:00
db refactor(mana-auth): move enums from public to auth schema 2026-04-23 15:36:39 +02:00
email feat: rename ManaCore to Mana across entire codebase 2026-04-05 20:00:13 +02:00
lib feat(services): create mana-auth (Hono + Bun) — Phase 5 auth rewrite 2026-03-28 02:43:44 +01:00
middleware refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
routes feat(personas): M3.b-d — tick loop + Claude Agent SDK + persistence (real) 2026-04-23 14:18:31 +02:00
services feat(ai,auth): Mission Grant endpoint + unwrap helper + audit table 2026-04-15 13:41:59 +02:00
spaces feat(spaces): move access tier from user to space 2026-04-20 20:10:06 +02:00
config.ts feat(ai,auth): Mission Grant endpoint + unwrap helper + audit table 2026-04-15 13:41:59 +02:00
index.ts feat(personas): M3.b-d — tick loop + Claude Agent SDK + persistence (real) 2026-04-23 14:18:31 +02:00