bbrecs

command module
v0.0.0-...-e752ecf Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: MIT Imports: 5 Imported by: 0

README

Dev tools

For running locally

Migrations

## To create new migration
migrate create -ext sql -dir postgres/migrations -seq <migration_name>

## To run migration
migrate -database "postgres://localhost:5432/bbrecs?sslmode=disable" -path postgres/migrations up

## To reverse a migration
migrate -database "postgres://localhost:5432/bbrecs?sslmode=disable" -path postgres/migrations down
# can add a version to only run down migrations up to that version
migrate -database "postgres://localhost:5432/bbrecs?sslmode=disable" -path postgres/migrations down 3 (will run all down migrations >= 3)

## To force DB to version
migrate -database "postgres://localhost:5432/bbrecs?sslmode=disable" -path postgres/migrations force <version>

## e.g. `migrate -database "postgres://localhost:5432/bbrecs?sslmode=disable" -path postgres/migrations force 10`

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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