Skip to content

AC-CodeProd/knex-toolkit

Repository files navigation

Installation

# npm
npm install knex-toolkit --save

# yarn
yarn add knex-toolkit

Configuration

'use strict'
const { join } = require('path')

module.exports = {
  development: {
    db: {
      exemple: {
        client: 'mysql',
        connection: {
          host: '',
          port: 3306,
          user: '',
          password: '',
          database: '',
          charset: 'utf8mb4',
          collate: 'utf8mb4_unicode_ci'
        },
        debug: false,
        pool: {
          min: 2,
          max: 10
        },
        migrations: {
          tableName: 'knex_migrations',
          directory: join(process.cwd(), 'exemple', 'migrations')
        },
        seeds: {
          directory: join(process.cwd(), 'exemple', 'seeds', 'development')
        }
      }
    }
  }
}

Usage

knex-toolkit migrate make create_users -d exemple -e development -c ../src/configuration.js

License

MIT © Alain Cajuste

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published