mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 23:41:08 +02:00
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> |
||
|---|---|---|
| .. | ||
| 001_add_access_tier.sql | ||
| 002_encryption_vaults.sql | ||
| 003_recovery_wrap.sql | ||
| 004_spaces.sql | ||
| 005_personas.sql | ||
| 006_enums_to_auth_schema.sql | ||