go-tiger

module
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2023 License: MIT

README

go-tiger

CLI for running migrations and generators in go apps.

Installation

go install github.com/nrfta/go-tiger/cmd/tiger@latest

Usage

Configuration

This project uses go-config to load the configuration of your project. We will find the root of your project (where go.mod is saved) and than look at the config directory. We will only read the JSON files.

CLI

Available Commands:

  db          Database related operations
  generate    Generate files
  help        Help about any command
  task        Run grift tasks
Tasks

Run grift tasks.

DB

Available Commands:

command description
create Create database
drop Drop database
migrate Execute database migrations
reset Runs drop, create and migrate up
seed Runs grift task db:seed

Create the development database:

tiger db create

Create the test database:

ENV=test tiger db create

Drop database:

tiger db drop
Migrate

We support migration files defined in db/migrations. We used migrate internally.

Available Commands:

command description
up Run migrations in the up direction
down Run migrations in the down direction
generate
command description
migration Generates a migration file

License

This project is licensed under the MIT License.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL