mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
17 lines
406 B
Bash
Executable File
17 lines
406 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eo pipefail
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
|
|
hash migrate 2>/dev/null || {
|
|
if [[ $(uname) == "Darwin" ]]; then
|
|
brew install golang-migrate
|
|
else
|
|
echo "You need to install the 'migrate' tool: https://github.com/golang-migrate/migrate/"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
migrate -database "postgres://${PGHOST}:${PGPORT}/${PGDATABASE}" -path ./migrations "$@"
|