/**
 * node-pg-migrate configuration
 */

if (!process.env.DATABASE_URL) {
  const path = require('path');
  require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
}

module.exports = {
  databaseUrl: process.env.DATABASE_URL,
  migrationsTable: 'pgmigrations',
  dir: 'migrations',
  direction: 'up',
  count: Infinity,
  verbose: true,
  decamelize: true,
  'ignore-pattern': '^\\..*',
};
