I'm not a sequelize expert, but I'm working on a project with other people where we're using sequelize with postgres. I'm trying to run a migration using sequelize-cli, but for some reason, the migration just simply won't run, but it also doesn't create any error messages. I just get:
Sequelize CLI [Node: 14.3.0, CLI: 5.5.1, ORM: 5.21.5] Loaded configuration file "backend/database/config/config.js". Using environment "dev". Done in 0.40s.
I'm personally using WSL + Docker Desktop, but I've also tried this on Arch Linux/MacOS. The migrations work on other people's machines, but for some reason, my sequelize just refuses to connect to my postgres on any machine, even if I manually put data into the database and try to have the app connect to the database. We've tried reinstalling the project a few times/running through the installation process with members of the team, but have had no success.
Let me know if there's more I can provide to help!
config.js
:
require('dotenv').config();
const dbCert = process.env.dbCertPath ? fs.readFileSync(process.env.dbCertPath) : '';
module.exports = {
dev: {
username: 'postgres',
password: null,
database: 'searchneu_dev',
host: '127.0.0.1',
dialect: 'postgres',
},
test: {
username: 'postgres',
password: null,
database: 'searchneu_test',
host: '127.0.0.1',
dialect: 'postgres',
logging: false,
},
prod: {
username: process.env.dbUsername,
password: process.env.dbPassword,
database: process.env.dbName,
host: process.env.dbHost,
dialect: 'postgres',
dialectOptions: {
ssl: {
rejectUnauthorized: true,
ca: dbCert,
},
},
},
};