You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
1.0 KiB
JavaScript

const { Sequelize, DataTypes, Op } = require('sequelize');
/**
*
* 配置数据库
*
*/
const testDB = new Sequelize('hotel_hub_p', 'admin', 'admin', {
host: '202.103.68.93',
dialect: 'mysql',
// operatorsAliases: false,
// operatorsAliases: 0,
dialectOptions: {
charset: 'utf8mb4',
// collate: 'utf8mb4_unicode_ci',
supportBigNumbers: true,
bigNumberStrings: true,
},
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000,
},
timezone: '+08:00', //东八时区
});
const DB = new Sequelize('hotel_hub', 'root', 'C2BKVo7eyg^^NZ4s', {
host: '202.103.69.110',
port: 33001,
dialect: 'mysql',
// operatorsAliases: false,
dialectOptions: {
charset: 'utf8mb4',
// collate: 'utf8mb4_unicode_ci',
supportBigNumbers: true,
bigNumberStrings: true,
},
// logging: false,
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000,
},
timezone: '+08:00', //东八时区
});
module.exports = {
DataTypes, Op,
// sequelize: testDB,
sequelize: DB,
};