Skip to content
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

feat: support ifNotExists when creating a postgres db #46

Merged
merged 2 commits into from
Sep 10, 2023

Conversation

andyburke
Copy link
Contributor

Adds an implementation of ifNotExists for postgres when creating a database.

Unfortunately, this isn't as easy as adding some SQL. You need to use an extension, etc. I also had to update dependencies to get tests to run under a more recent version of node. Willing to work through feedback to try to get this accepted.

Signed-off-by: Andy Burke <andy.burke@mailbox.earth>
@andyburke
Copy link
Contributor Author

Any feelings on this?

@andyburke
Copy link
Contributor Author

Is this module still being maintained?

@wzrdtales
Copy link
Member

It is but I am unfortunately very busy and do not always find time to invest. But I am very glad about all help and should you be willing to help maintaining this would be more than welcome!

About your changes: Please note, never upgrade vows. there is an ugly bug in it and it completely breaks that is why the version is fixated. We still need to switch to lab for testing on this repo too, I just recently migrated the mysql one though. The changes look fine otherwise too me though.

andyburke added a commit to andyburke-forks/db-migrate-pg that referenced this pull request Feb 4, 2020
Signed-off-by: Andy Burke <aburke@bitflood.org>
@andyburke
Copy link
Contributor Author

I downgraded vows, but that means I cannot run the tests locally.

Let me know if there's anything else needed before this can be merged.

@wzrdtales wzrdtales merged commit 71d4e44 into db-migrate:master Sep 10, 2023
@wzrdtales
Copy link
Member

This actually does not work, and causes the drivers connection to be terminated immediately. Disabling for now.

wzrdtales added a commit that referenced this pull request Sep 11, 2023
Search path could result in double quotes, due to spaces in the return of the database.
Moving .trim() to manipulate the path early enough fixes this.

Refers to #46

Signed-off-by: Tobias Gurtzick <magic@wizardtales.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants