From 358d64144b6f7d1cc85b396725c6015d0c5845ef Mon Sep 17 00:00:00 2001 From: Tofik Sahraoui Date: Sun, 31 Mar 2024 13:28:17 +0200 Subject: [PATCH] [ADD] - github actions for flyway migrations --- .github/workflows/migrate.yml | 4 ++-- src/main/resources/db.migration/0_0_1__user.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/migrate.yml b/.github/workflows/migrate.yml index f979411..e14bd88 100644 --- a/.github/workflows/migrate.yml +++ b/.github/workflows/migrate.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v2 - run: >- docker run --rm - --volume ${{ github.workspace }}/src/main/resources/db.migration:/sql:ro + --volume ${{ github.workspace }}/src/main/resources/db.migration:/flyway/sql:ro flyway/flyway:7.12.1-alpine - -url="postgres://postgres.cyvmmlkvpqakdrcxdbbc:${{ secrets.SUPABASE_DB }}@aws-0-eu-central-1.pooler.supabase.com:5432/postgres" + -url="postgres://postgres.cyvmmlkvpqakdrcxdbbc:${{ secrets.SUPABASE_PASS }}@aws-0-eu-central-1.pooler.supabase.com:5432/postgres" migrate diff --git a/src/main/resources/db.migration/0_0_1__user.sql b/src/main/resources/db.migration/0_0_1__user.sql index 843a975..b5e23ea 100644 --- a/src/main/resources/db.migration/0_0_1__user.sql +++ b/src/main/resources/db.migration/0_0_1__user.sql @@ -1,4 +1,4 @@ -CREATE TABLE IF NOT EXISTS USER ( +CREATE TABLE IF NOT EXISTS USERS ( user_id bigint NOT NULL, email varchar(255), firstname varchar(255),