UNPKG

fakerdb

Version:

[![Build Status](https://travis-ci.com/sius/fakerdb.svg?branch=master)](https://travis-ci.com/sius/fakerdb)[![codecov](https://codecov.io/gh/sius/fakerdb/branch/master/graph/badge.svg)](https://codecov.io/gh/sius/fakerdb)[![dependencies Status](https://da

15 lines (12 loc) 460 B
let { generate } = require('../') , config = { client: 'pg', connection: 'postgresql://faker:faker@localhost:5432/fakerdb' } , knex = require('knex')(config) , path = require('path'); const REPLAY = 1000; const SCHEMA = path.join(__dirname, './schema/person.json'); const OPTS = { replay: REPLAY, insert: { blockSize: 1000 } }; knex.migrate.latest({ directory: './knex/migrations' }) .then( () => generate(knex('person'), SCHEMA, OPTS) );