sequelize.js 670 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * @Author: fuyu
  3. * @Date: 2021-03-22 18:46:15
  4. * @LastEditors: fuyu
  5. * @LastEditTime: 2021-03-26 11:28:14
  6. * @FilePath: /202103/code/sql_merge/src/dao_old/db/sequelize.js
  7. */
  8. import Sequelize from 'sequelize'
  9. import config from '../../../config'
  10. const DB = config['old_db_config']
  11. export default new Sequelize(DB.database, DB.username, DB.password, {
  12. host: DB.host,
  13. port: DB.port,
  14. dialect: DB.db_type,
  15. dialectOptions: {
  16. charset: 'utf8mb4',
  17. // collate: 'utf8mb4_unicode_520_ci',
  18. bigNumberStrings: true,
  19. supportBigNumbers: true
  20. },
  21. pool: {
  22. max: 50,
  23. min: 10,
  24. idle: 10000
  25. },
  26. timezone: '+08:00' //修改时区为东八区
  27. })