Skip to content

dylanconnolly/bbrecs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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`

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published