Best practices for using multiple schemas in Postgres
mainWhen working with multiple schemas (e.g., public, accounts, payments) in a single database, it is recommended to use schema-qualified names (e.g., accounts.users instead of just users) in your SQL queries and migrations.
Why avoid changing search_path?
While you can change the search_path to include multiple schemas to avoid prefixes, this can lead to errors during migrations. For example, if search_path is set to public,accounts,payments, and a migrator attempts to reference a table unqualified, it may conflict with or fail to find the intended _sqlx_migrations table if multiple schemas contain one.