-
-
Notifications
You must be signed in to change notification settings - Fork 526
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
SQLite relative path doesn't work with URI #965
Comments
Does anybody care at all? |
Hi! Thanks for making an issue about this. This is due to the way that the URL is parsed for sqlite, see snippet below. Is there a reason that using storage and dialect instead of the URL is not possible? cli/src/helpers/config-helper.js Lines 199 to 217 in fcea7a3
|
Hello. The reason is pretty clear: to use environment variable to keep DB connection string and set its value depending on environment in one place. |
Sounds fair, I will qualify this as a bug since you should be able to do this. A workaround is possible, but feel free to make a PR to solve this issue (or anyone else that reads this issue) |
I'm working on Windows. I have my config file in
root\db-migration\config.js
. Whereroot
is my abstract working directory. And it contains the following:When I migrate everything is ok and database file appears in correct directory:
root\private\db\db.sqlite3
.Once I'm trying to configure it as URI (and that's exactly what I need) like:
.. and I expect sequelize-cli to do exactly the same thing. But it creates directories in my disk :
D:\db\db.sqlite3
. Or inD:\private\db\db.sqlite3
if I specifyurl: 'sqlite:./private/db/db.sqlite3'
. I've also tried some deviations withfile:
or something - I'm only getting errors or facing the same result.The text was updated successfully, but these errors were encountered: