Currently PGNamespace creates a separate PostgreSQL schema per aggregate:
CREATE SCHEMA IF NOT EXISTS auth;
- Tables:
auth.journal, auth.states, auth.outbox, auth.commands
This conflicts with projects using Flyway for migrations in a single schema (e.g. public).
Request: add an option to use table prefix instead of schema:
- Tables:
public.auth_journal, public.auth_states, public.auth_outbox, public.auth_commands
Example API:
// Current (schema mode)
DoobieCQRSDriver.from(PGNamespace("auth"), xa)
// Proposed (prefix mode)
DoobieCQRSDriver.from(PGNamespace.prefixed("auth"), xa)
// Creates: auth_journal, auth_states, etc. in current schema
Use case: monolith backends with shared Flyway migration history where adding PostgreSQL schemas breaks the migration workflow.
Currently
PGNamespacecreates a separate PostgreSQL schema per aggregate:CREATE SCHEMA IF NOT EXISTS auth;auth.journal,auth.states,auth.outbox,auth.commandsThis conflicts with projects using Flyway for migrations in a single schema (e.g.
public).Request: add an option to use table prefix instead of schema:
public.auth_journal,public.auth_states,public.auth_outbox,public.auth_commandsExample API:
Use case: monolith backends with shared Flyway migration history where adding PostgreSQL schemas breaks the migration workflow.