Skip to content

Commit

Permalink
switched to atlas for shema diffing
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Oct 22, 2023
1 parent ede64c8 commit d1a7c6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ jobs:
CI_AUTO_MIGRATION: "false"
DB_DSN: root:super_secret_passw0rd@tcp(localhost:3306)/campus_db?charset=utf8mb4&parseTime=True&loc=Local
ENVIRONMENT: dev
- name: export manual database
run: mysqldump --host localhost --port=3306 --user=root --password=super_secret_passw0rd --no-data campus_db --result-file=./manual.sql && cat ./manual.sql
- name: run auto migrations
run: go run main.go
working-directory: ./server
Expand All @@ -61,6 +59,9 @@ jobs:
CI_AUTO_MIGRATION: "true"
DB_DSN: root:super_secret_passw0rd@tcp(localhost:3300)/campus_db?charset=utf8mb4&parseTime=True&loc=Local
ENVIRONMENT: dev
- uses: ariga/setup-atlas@master
- name: export diff the migrations
run: atlas schema diff --from "maria://root:super_secret_passw0rd@tcp(localhost:3306)/campus_db?charset=utf8mb4&parseTime=True&loc=Local" --to "maria://root:super_secret_passw0rd@tcp(localhost:3300)/campus_db?charset=utf8mb4&parseTime=True&loc=Local"
build:
runs-on: ubuntu-latest
needs: [test, test_migrations]
Expand Down

0 comments on commit d1a7c6c

Please sign in to comment.