Reputation: 315
I have a sequelize instantiation
new Sequelize('xxxx', 'xxxx' , null, {
host: null,
dialect: "xxxx",
operatorsAliases: 0,
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
}
And i want to change a certain value afterwards, like =>
my_instance_sequelize.host = 'new_xxxx'
but that don't change my value. How can i do it ?
Upvotes: 0
Views: 593
Reputation: 315
Found an answer You can add config like that
my_instance_sequelize.config.host = 'new_xxxx'
Upvotes: 0
Reputation: 9096
Creating a Sequelize instance is basically creating a connection with the database. Changing host value afterwords is not going to change the connection. It requires creating a new instance.
So, if you want to change the host
value of the Sequelize instance, you essentially wants to create a new instance.
Upvotes: 1