Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
add scripts to create a migration and gen bindata
Browse files Browse the repository at this point in the history
  • Loading branch information
vito committed Nov 27, 2017
1 parent 3e2c9bd commit 9b0b84e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
16 changes: 8 additions & 8 deletions db/migration/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions scripts/create-migration
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/ "$@"
11 changes: 11 additions & 0 deletions scripts/generate-bindata
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/*

0 comments on commit 9b0b84e

Please sign in to comment.