Skip to content

Knex - cli for seeding massive amount of fake data into multiple databases

License

Notifications You must be signed in to change notification settings

renerpdev/vollk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vollk.js

vollk Logo

This is a command line tool built for Knex.js for seeding massive amount of fake data into multiple databases

Table of topics

  1. Documentation
  2. How to install it?
  3. Basic configuration
  4. Run and see
  5. List of commands
  6. Database connections
  7. Be a contributor
  8. New versions of this tool
  9. License
  10. Further help

Documentation

This tool integrates the inquirer.js library for making more interactive the commands built in commander.js. Also this tool incorporates faker.js for generating massive amounts of fake data.

Installation

For development

git clone https://github.com/renerpdev/vollk.git vollk

npm install

npm link

For production

npm install -g vollk

Configuration

Before run it you need to create an .env file in your relative path. There are multiples ways to do that:

  • Copying the code from here
  • Renaming file .env.example to .env inside this project.
  • Running the command vollk env

Finally you need to fill this ENV variables with theirs respective values.

[note]: If there is not .env file in your relative path, then default values will be set:

  • MODE: development
    • DB_CLIENT: mysql
    • DB_NAME: vollk
    • DB_HOST: localhost
    • DB_USER: root
    • DB_PASS: [none]

or...

  • MODE: production
    • DB_CLIENT: pg
    • DB_URL: [none]

or...

  • MODE: local
    • DB_CLIENT: sqlite3
    • SQLITE_PATH: db.sqlite

Run and see the magic

vollk list

List of commands

  1. list (Lists all options)

  2. seed (Seeds the database with yours especs)

  3. create (Creates a seed file)

  4. run (Runs the last seed file)

  5. env (Creates an empty .env file)

Some options for this commands

  • --version
  • --help

Database connections

To integrate this tool with other database connections you need to install the appropriate package: (by default only supports mysql, pg)

  • npm install mysql2
  • npm install mariasql
  • npm install strong-oracle
  • npm install oracle
  • npm install mssql
  • npm install sqlite3

Contributing

All the unit tests are written with Jasmine. Feel free to add more functionalities and bug fixes but also add a test for each of them. Just type npm test, but before that you need to install globally Jasmine

npm install -g jasmine

Changelog

Get update with all new versions here

License

Copyright (c) 2018 Rene Ricardo. Licensed under the MIT license.

Further help

Send me an email or a tweet if you have some doubt or just add an issue

About

Knex - cli for seeding massive amount of fake data into multiple databases

Resources

License

Stars

Watchers

Forks

Packages

No packages published