-
-
Notifications
You must be signed in to change notification settings - Fork 499
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
Creating a Postgres database fails since 5.5.3 #3769
Comments
I've been fixing this 3 times already, I can't help without a complete reproduction, as I would almost certainly break something else (not to mention I have no idea how I would reproduce this). Closing before you provide one. |
Start with providing complete ORM config - and I really mean complete, no blank spaces and variables, I need all the actual values (mangled of course, I dont care about your user/pass/host, but I need to see exact values that reproduce this). |
Also, are you using env vars? Client URL (connection string)? Any special characters (namely |
Ok, thanks for the quick reply! I'll provide more info soon. |
@B4nan I've created this repo with a minimal setup -that represents what we use as much without too much bloat- to reproduce the bug. Let me know if this is too much or if you need anything else! The readme shows how to reproduce it in 5.5.2 and 5.5.3. |
+any feedback on our test-setup is much appreciated ;) |
Hmmm looks like postgres requires the database name, and defaults to the user name when it is not present. Will need to revert the changes and allow overriding the management db name for those who dont have the |
Describe the bug
Creating a Postgres database fails since 5.5.3. Since this change our tests no longer run. In our integration tests we create a new database for just those tests, unfortunately automatically creating the database no longer works.
If we revert this method (manually in
node_modules/@mikro-orm/postgresql/PostgreSqlSchemaHelper.js
), everything works as expected:Not sure why though 🤔
Stack trace
*note that it logs the database username instead of the dbName 🤷
To Reproduce
Steps to reproduce the behavior:
dbName
Expected behavior
Mikro-ORM should correctly create the desired database and connect to it.
Additional context
Connecting to an existing database works just fine.
Versions
The text was updated successfully, but these errors were encountered: