50 lines
1.1 KiB
JavaScript
Executable File
50 lines
1.1 KiB
JavaScript
Executable File
const config = require('./src/config/database');
|
|
/**
|
|
* @type { Object.<string, import("knex").Knex.Config> }
|
|
*/
|
|
module.exports = {
|
|
|
|
development: {
|
|
client: 'mysql2',
|
|
connection: {
|
|
host: config.development.connection.host,
|
|
user: config.development.connection.user,
|
|
password: config.development.connection.password,
|
|
database: config.development.connection.database
|
|
},
|
|
pool: {
|
|
min: 2,
|
|
max: 10
|
|
},
|
|
migrations: {
|
|
directory: './src/db/migrations',
|
|
tableName: 'knex_migrations'
|
|
},
|
|
seeds: {
|
|
directory: './src/db/seeds'
|
|
}
|
|
},
|
|
|
|
production: {
|
|
client: 'mysql2',
|
|
connection: {
|
|
host: config.development.connection.host,
|
|
user: config.development.connection.user,
|
|
password: config.development.connection.password,
|
|
database: config.development.connection.database
|
|
},
|
|
pool: {
|
|
min: 2,
|
|
max: 10
|
|
},
|
|
migrations: {
|
|
directory: config.development.migrations.directory,
|
|
tableName: 'knex_migrations'
|
|
},
|
|
seeds: {
|
|
directory: './src/db/seeds'
|
|
}
|
|
}
|
|
|
|
};
|