Skip to content

Commit

Permalink
migration setup
Browse files Browse the repository at this point in the history
  • Loading branch information
broneks committed Nov 27, 2024
1 parent 114651a commit 08634a6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/fly-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/

name: Fly Deploy

on:
push:
branches:
- main

jobs:
deploy:
# if: false # disable...
name: Deploy app
name: Deploy
runs-on: ubuntu-latest
concurrency: deploy-group
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
run: go vet ./...

- name: Build
run: go build --o bin/piccolo cmd/piccolo/main.go
run: go build cmd/piccolo
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN if [ "$ENV" = "local" ]; then \
go mod download; \
go install github.com/air-verse/air@latest; \
else \
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest; \
go build --o bin/piccolo ./cmd/piccolo; \
fi

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ migrate_create:
migrate create -ext sql -dir db/migrations -seq $(name)

migrate_up:
migrate -database $(DATABASE_URL)?sslmode=disable -path db/migrations up
migrate -database $(DATABASE_URL) -path db/migrations up

migrate_down:
migrate -database $(DATABASE_URL)?sslmode=disable -path db/migrations down 1
migrate -database $(DATABASE_URL) -path db/migrations down 1

0 comments on commit 08634a6

Please sign in to comment.