admin管理员组文章数量:1290976
I'm trying to run sequelize-cli, specifically npx sequelize db:migrate
.
I've created a config file in config/config.js
which looks like this (obviously with correct credentials):
module.exports = {
development: {
username: "USER",
password: "PASSWORD",
database: "DB_NAME",
host: "HOST",
dialect: 'mssql',
dialectOptions: {
encrypt: "true" // bool - true - doesn't work either
}
}
};
However I'm receiving the following error:
ERROR: Server requires encryption, set 'encrypt' config option to true.
As you can see from my config I believe I have set encrypt to true. This is my understanding of how to set this option from the docs.
How can I successfully set encrypt
to true?
I'm trying to run sequelize-cli, specifically npx sequelize db:migrate
.
I've created a config file in config/config.js
which looks like this (obviously with correct credentials):
module.exports = {
development: {
username: "USER",
password: "PASSWORD",
database: "DB_NAME",
host: "HOST",
dialect: 'mssql',
dialectOptions: {
encrypt: "true" // bool - true - doesn't work either
}
}
};
However I'm receiving the following error:
ERROR: Server requires encryption, set 'encrypt' config option to true.
As you can see from my config I believe I have set encrypt to true. This is my understanding of how to set this option from the docs.
How can I successfully set encrypt
to true?
- github./sequelize/sequelize/issues/3240 this issue also leads me to believe what I have above is correct. Though it isn't working. – BML91 Commented May 13, 2019 at 13:25
2 Answers
Reset to default 9This should fix the issue,
module.exports = {
development: {
username: "USER",
password: "PASSWORD",
database: "DB_NAME",
host: "HOST",
dialect: 'mssql',
dialectOptions: {
options: {
encrypt: true
}
}
}
};
Edit your config.js
module.exports = {
url: process.env.DATABASE_URL,
dialectOptions: {
ssl: {
require: true,
rejectUnauthorized: false,
},
},
};
本文标签: javascriptSet encrypt to true on Sequelizecli migrate for MSSQLStack Overflow
版权声明:本文标题:javascript - Set encrypt to true on Sequelize-cli migrate for MSSQL - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741519771a2383111.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论