-
-
Notifications
You must be signed in to change notification settings - Fork 16
fix: set schema name for migrations based on searchPath in PostgresBackend #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes PostgreSQL migrations to work correctly with custom schemas by ensuring the schema exists before running migrations and setting the schema name for migration tracking.
- Adds schema creation logic to PostgresBackend's migrate method
- Extracts schema name from searchPath configuration and applies it to Knex migrations
- Creates comprehensive test coverage for schema-based operations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/backends/postgres/src/postgres-backend.ts | Implements schema extraction from searchPath, adds ensureSchemaExists method, and overrides migrate to create schema before running migrations |
| packages/backends/postgres/test/with-schema.test.ts | Adds test coverage for PostgresBackend with custom schema configuration |
merencia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
## [1.4.3](v1.4.2...v1.4.3) (2025-08-11) ### Bug Fixes * set schema name for migrations based on searchPath in PostgresBackend ([#67](#67)) ([686afa5](686afa5))
|
🎉 This PR is included in version 1.4.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Checklist for Pull Requests
yarn test:allandyarn test:integration)Summary of Changes
Closes #62