Skip to content

cli-tool for automatic SQL compatible database seeding.

License

Notifications You must be signed in to change notification settings

MatheusLasserre/goseed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goseed

A CLI tool to seed sql databases with random data.

How to use:

Clone the repo

git clone https://github.com/MatheusLasserre/goseed.git && cd goseed

Install dependencies

go mod tidy

Build and install the binary

make bi

or

go build && go install

Run the command

goseed -d mydatabase -t mytable -s 1000000 -c 1000 -p "root:goseed@tcp(localhost:3306)/"

Use -h for help

goseed -h

Output:
Select a database, a table, and i'll goseed.

Usage: goseed [flags]

Flags:

 -c, --chunkSize int     How many rows to insert at a time. Default: 100. Recommended: 10000.\
 -d, --database string   use database\
 -h, --help              help for goseed\
 -p, --host string       Database Connection String. Example: -p "root:goseed@tcp(localhost:3306)/"\
 --setup-file string       Database Connection String. Example: -p "root:goseed@tcp(localhost:3306)/"\
 -s, --size int          Seed size\
 -t, --table string      from table\

About

cli-tool for automatic SQL compatible database seeding.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published