modulepackage
0.0.0-20240326124429-0bd416a7f680
Repository: https://github.com/wallester/migrate.git
Documentation: pkg.go.dev
# README
migrate
Command line tool for PostgreSQL migrations
Features
- Runs migrations in transactions (one transaction per one migration file).
- Stores migration version details in auto-generated table
schema_migrations
.
Usage
migrate -path ./db/migrations create add_field_to_table
migrate -url postgres://user@host:port/database -path ./db/migrations -timeout 10 up
migrate -url postgres://user@host:port/database -path ./db/migrations -timeout 10 up 1
migrate -url postgres://user@host:port/database -path ./db/migrations -timeout 10 down
migrate -url postgres://user@host:port/database -path ./db/migrations -timeout 10 down 1
migrate help # for more info
Tools
Install golangci-lint with
go get -u github.com/golangci/golangci-lint/cmd/golangci-lint github.com/securego/gosec/cmd/gosec
How to contribute
- Fork the repo on Github.
- Clone the
wallester/migrate
repo. Next steps are to be done in thewallester/migrate repo
(not the fork). - Add your fork as a new remote (
git remote add myfork url-of-myfork
). - Create a new branch, do your work and commit the changes as usual.
- Push your new branch to your fork (
git push myfork mybranch
). - Open a pull request in Github as usual.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author