This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add scripts to create a migration and gen bindata
- Loading branch information
Showing
3 changed files
with
26 additions
and
8 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e -u | ||
|
||
go build -tags 'postgres' -o $GOPATH/bin/migrate github.com/mattes/migrate/cli | ||
|
||
migrate create -ext sql -dir db/migration/migrations/ "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -e -u | ||
|
||
go get github.com/jteeuwen/go-bindata/... | ||
|
||
go-bindata \ | ||
-pkg migration \ | ||
-o db/migration/bindata.go \ | ||
-prefix db/migration/migrations/ \ | ||
db/migration/migrations/* |