Skip to content

Commit

Permalink
Merge pull request #444 from BaseAdresseNationale/jugurtha/integrer-l…
Browse files Browse the repository at this point in the history
…es-contours-postaux-dans-pg

Jugurtha/integrer les contours postaux dans pg
  • Loading branch information
jbouhadoun authored Jul 16, 2024
2 parents 25f4f55 + 892fc6e commit c0de0fc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/util/sequelize.js
Original file line number Diff line number Diff line change
@@ -4,13 +4,20 @@ const {POSTGRES_BAN_USER, POSTGRES_BAN_PASSWORD, POSTGRES_DB, POSTGRES_URL} = pr
const POSTGRES_PORT = process.env.POSTGRES_PORT || 5432

// Create a new Sequelize instance
/* eslint-disable unicorn/numeric-separators-style */
export const sequelize = new Sequelize(POSTGRES_DB, POSTGRES_BAN_USER, POSTGRES_BAN_PASSWORD, {
host: POSTGRES_URL,
port: POSTGRES_PORT,
dialect: 'postgres',
logging: false
logging: false,
pool: {
max: 20,
min: 0,
acquire: 60000,
idle: 5000
}
})

/* eslint-enable unicorn/numeric-separators-style */
export const District = sequelize.define('District', {
id: {
type: DataTypes.UUID,

0 comments on commit c0de0fc

Please sign in to comment.