-
Notifications
You must be signed in to change notification settings - Fork 65
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
Check table exists in current search path #93
Open
slifty
wants to merge
1
commit into
ThomWright:master
Choose a base branch
from
slifty:92-fix-migration-schema-conflict
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* If a `migrations` table did exist in a schema outside of the search path, `doesTableExist` would return true but the migration would then fail with 'relation "migrations" does not exist' * See https://dba.stackexchange.com/a/86098 for the details on the query * This new query makes it possible to have one `migrations` table per schema Issue ThomWright#92 Migrations can't be run on multiple schemas in the same database Co-authored-by: Remi Koenig <[email protected]>
slifty
force-pushed
the
92-fix-migration-schema-conflict
branch
from
July 13, 2022 16:55
ef1705b
to
2952d57
Compare
This was referenced Jul 13, 2022
slifty
added a commit
to PhilanthropyDataCommons/service
that referenced
this pull request
Jul 13, 2022
Integration tests are slower than unit tests because they rely on a database connection, so we want the ability to run them separately depending on our environment. Jest allows us to define different config files. By creating a `base` config we can define all of the common settings between unit and integration tests, and then customize for each type in the respective extended configs. In addition to configuration this begins to define define some hooks so that we can eventually run these tests in parallel. Unfortunately there is a bug in the migration library we're using which prevents that kind of parallel migration within a single database / across multiple schemas. We have an open PR with a patch for that bug[1]. [1] ThomWright/postgres-migrations#93 Issue #43 Support integration tests
slifty
added a commit
to PhilanthropyDataCommons/service
that referenced
this pull request
Jul 13, 2022
Integration tests are slower than unit tests because they rely on a database connection, so we want the ability to run them separately depending on our environment. Jest allows us to define different config files. By creating a `base` config we can define all of the common settings between unit and integration tests, and then customize for each type in the respective extended configs. In addition to configuration this begins to define define some hooks so that we can eventually run these tests in parallel. Unfortunately there is a bug in the migration library we're using which prevents that kind of parallel migration within a single database / across multiple schemas. We have an open PR with a patch for that bug[1]. [1] ThomWright/postgres-migrations#93 Issue #43 Support integration tests
slifty
added a commit
to PhilanthropyDataCommons/service
that referenced
this pull request
Jul 13, 2022
Integration tests are slower than unit tests because they rely on a database connection, so we want the ability to run them separately depending on our environment. Jest allows us to define different config files. By creating a `base` config we can define all of the common settings between unit and integration tests, and then customize for each type in the respective extended configs. In addition to configuration this begins to define define some hooks so that we can eventually run these tests in parallel. Unfortunately there is a bug in the migration library we're using which prevents that kind of parallel migration within a single database / across multiple schemas. We have an open PR with a patch for that bug[1]. [1] ThomWright/postgres-migrations#93 Issue #43 Support integration tests
slifty
added a commit
to PhilanthropyDataCommons/service
that referenced
this pull request
Jul 13, 2022
Integration tests are slower than unit tests because they rely on a database connection, so we want the ability to run them separately depending on our environment. Jest allows us to define different config files. By creating a `base` config we can define all of the common settings between unit and integration tests, and then customize for each type in the respective extended configs. In addition to configuration this begins to define define some hooks so that we can eventually run these tests in parallel. Unfortunately there is a bug in the migration library we're using which prevents that kind of parallel migration within a single database / across multiple schemas. We have an open PR with a patch for that bug[1]. I took out the explicit running of migrations because our integration tests should now cover that (as they do run migrations). [1] ThomWright/postgres-migrations#93 Issue #43 Support integration tests
slifty
added a commit
to PhilanthropyDataCommons/service
that referenced
this pull request
Jul 15, 2022
Integration tests are slower than unit tests because they rely on a database connection, so we want the ability to run them separately depending on our environment. Jest allows us to define different config files. By creating a `base` config we can define all of the common settings between unit and integration tests, and then customize for each type in the respective extended configs. In addition to configuration this begins to define define some hooks so that we can eventually run these tests in parallel. Unfortunately there is a bug in the migration library we're using which prevents that kind of parallel migration within a single database / across multiple schemas. We have an open PR with a patch for that bug[1]. I took out the explicit running of migrations because our integration tests should now cover that (as they do run migrations). [1] ThomWright/postgres-migrations#93 Issue #43 Support integration tests
This was referenced Jul 27, 2022
We're heading close to the one year anniversary of this PR -- I wanted to check to see if it might be possible to merge in. This bug currently means I can't run tests locally unless I manually destroy my public schema. |
would be nice to merge it; running into this issue too |
This was referenced Nov 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds tests to PR #33 which will ultimately fix a bug where schemas are ignored when checking for the presence of a migrations table.
Note: the tests do fail when not using the patched code! Hooray!
Resolves #92