text: // Update with your config settings.
  const pgConnection = process.env.DATABASE_URL || "postgresql://postgres@localhost/"
  
  module.exports = {
  
    development: {
      client: 'sqlite3',
      useNullAsDefault: true,
      connection: {
        filename: './reddit.db3'
      },
      pool:{
        afterCreate:(conn, done) =>{
          conn.run('PRAGMA foreign_keys = ON', done)
        }
      },
      seeds:{
        directory:"./data/seeds"
      }
    },
  
    staging: {
      client: 'postgresql',
      connection: {
        database: 'my_db',
        user:     'username',
        password: 'password'
      },
      pool: {
        min: 2,
        max: 10
      },
      migrations: {
        tableName: 'knex_migrations'
      }
    },
  
    production: {
      client: 'pg',
      connection: pgConnection,
      // connection: {
      //   database: 'my_db',
      //   user:     'username',
      //   password: 'password'
      // },
      pool: {
        min: 2,
        max: 10
      },
      migrations: {
        tableName: 'knex_migrations'
      },
      seeds:{
        directory: "./data/seeds/"
      }
    },
  
    testing: {
      client: 'sqlite3',
      connection: {
        filename: './redditTest.db3'
      },
      useNullAsDefault:true,
      pool: {
        min: 2,
        max: 10
      },
      migrations: {
        tableName: 'knex_migrations'
      },
      seeds:{
        directory: "./data/seeds/"
      }
    }
  };
  