I would like to change my DB password in production in Sequelize.
So I would like to run a script that changes my DB password for connection, and next time I preform application to update it does not get overridden :)
Here is my for sample migration.config.json
{
"development": {
"username": "postgres",
"password": "postgres",
"database": "db",
"host": "localhost",
"dialect": "postgres",
"logging": false,
"seederStorage": "sequelize",
"operatorsAliases": false
},
"test": {
"username": "test",
"password": "stest",
"database": "test_db",
"host": "127.0.0.1",
"dialect": "postgres",
"logging": false,
"seederStorage": "sequelize",
"operatorsAliases": false
},
"production": {
"username": "prod",
"password": "prod",
"database": "db_prod",
"host": "127.0.0.1",
"dialect": "postgres",
"seederStorage": "sequelize",
"operatorsAliases": false
}
}
Do I need for example to create bash script that will do following:
- Execute command in psql to change DB password
- edit migation.config.json with new value
or is there some other steps how to do this ??