Created
May 4, 2021 01:42
-
-
Save tlcheah2/6acd4ce43182caa8d2582d89327fe7c9 to your computer and use it in GitHub Desktop.
Sample of sequelize config.js after configure migrationStorageTableName
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load environment variable from .env file | |
require('dotenv').config(); | |
module.exports = { | |
test: { | |
username: process.env.DEV_DB_USERNAME, | |
password: process.env.DEV_DB_PASSWORD, | |
database: process.env.DEV_DB_NAME, | |
host: process.env.DEV_DB_HOST, | |
dialect: 'mysql' | |
}, | |
test: { | |
username: process.env.TEST_DB_USERNAME, | |
password: process.env.TEST_DB_PASSWORD, | |
database: process.env.TEST_DB_NAME, | |
host: process.env.TEST_DB_HOST, | |
dialect: 'mysql', | |
migrationStorageTableName: 'migrations' // Override default migration storage table name by define here | |
}, | |
production: { | |
username: process.env.PROD_DB_USERNAME, | |
password: process.env.PROD_DB_PASSWORD, | |
database: process.env.PROD_DB_NAME, | |
host: process.env.PROD_DB_HOST, | |
dialect: 'mysql' | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment