11 lines
356 B
Bash
Executable file
11 lines
356 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Create a new timestamped SQL migration in ./migrations
|
|
# Usage: ./scripts/goose-create.sh add_widgets
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
export GOOSE_DRIVER="${GOOSE_DRIVER:-postgres}"
|
|
export GOOSE_MIGRATION_DIR="${GOOSE_MIGRATION_DIR:-$SCRIPT_DIR/../migrations}"
|
|
|
|
goose create -s "$@" sql
|