-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Knex Migrate MSSQL error #6048
Comments
I have a same problem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment
Knex version: 3.1.0
Database + version: MSSQL @smorey2
OS: Linux via Docker
Bug
Explain what kind of behaviour you are getting and how you think it should do
I'm trying to set up migrations for my sql database. When docker runs knex migrate:latest, I'm getting an error with the connectionSettings property where it is undefined.
Error message
Reduced test code, for example in https://npm.runkit.com/knex or if it needs real
database connection to MySQL or PostgreSQL, then single file example which initializes
needed data and demonstrates the problem.
Logged connection settings from knexfile-
{
port: 1433,
host: 'host.docker.internal',
user: 'xxx',
password: 'xxxx',
database: 'xxx',
options: { useUTC: true }
}
I went to the line in the stack trace, /app/node_modules/knex/lib/dialects/mssql/index.js:342:31, and found this.
When I console logged this.connectionSettings is undefined. I added some more logs and changed it to a path where connectionSettings is not undefined, and then it works. (I don't think this is the solution just trying to see if what I have for my connection string would be working).
The text was updated successfully, but these errors were encountered: