From d1a7c6c023e71656d1e190c1b9f7eecd177521a3 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Mon, 23 Oct 2023 01:26:10 +0200 Subject: [PATCH] switched to atlas for shema diffing --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff420630..7a112489 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 @@ -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]