From b63109012f46137134fc2315fc140d18c7764461 Mon Sep 17 00:00:00 2001 From: davidhorvat Date: Wed, 28 Aug 2024 18:44:07 +0200 Subject: [PATCH 01/20] chore: add log --- service/smtp.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/service/smtp.go b/service/smtp.go index 4aee2c0..cb2f209 100644 --- a/service/smtp.go +++ b/service/smtp.go @@ -87,19 +87,22 @@ func (s Service) SendNewPasswordEmail(emailAddress string, newPassword string) e return nil } -func (s Service) sendEmail(to string, subject string, body string) error { +func (s Service) sendEmail(receiver string, subject string, body string) error { receivers := []string{ - to, + receiver, } mime := "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n" subject = "Subject: " + subject + "\n" from := fmt.Sprintf("From: %s\n", "Password Lock") - msg := []byte(from + subject + mime + "\n" + body) + to := fmt.Sprintf("To: %s\n", receiver) + msg := []byte(to + from + subject + mime + "\n" + body) auth := smtp.PlainAuth("", s.Cfg.SmtpUsername, s.Cfg.SmtpPassword, s.Cfg.SmtpHost) + fmt.Println(auth) + // Sending email. err := smtp.SendMail(s.Cfg.SmtpHost+":"+s.Cfg.SmtpPort, auth, s.Cfg.SmtpFrom, receivers, msg) if err != nil { From 9acd46dde9cb6a27667921386c913b02e9d92f20 Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 18:54:49 +0200 Subject: [PATCH 02/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 1730164..cb87b11 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -122,6 +122,9 @@ jobs: #remove no longer needed env_vars.json file rm -f env_vars.json + - name: print + run: echo ${{ steps.prepare-env.outputs.env_vars }} + - name: Deploy to Cloud Run id: deploy uses: google-github-actions/deploy-cloudrun@v0 From 100ec8271b64fa2509815161fddbebcd85c3f7fd Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:00:01 +0200 Subject: [PATCH 03/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index cb87b11..a0bf56d 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -119,6 +119,8 @@ jobs: env_vars=$(jq -r 'to_entries | map("\(.key)=\(.value)") | join(",")' env_vars.json) + echo "::set-output name=env_vars::$env_vars" + #remove no longer needed env_vars.json file rm -f env_vars.json From d4cad78c9666fe2a97ab370be27f2542ce0be195 Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:04:01 +0200 Subject: [PATCH 04/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index a0bf56d..9678750 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -124,9 +124,6 @@ jobs: #remove no longer needed env_vars.json file rm -f env_vars.json - - name: print - run: echo ${{ steps.prepare-env.outputs.env_vars }} - - name: Deploy to Cloud Run id: deploy uses: google-github-actions/deploy-cloudrun@v0 From 88f3b5b4e2f9da07e76e63671f34ce7db73f6c26 Mon Sep 17 00:00:00 2001 From: davidhorvat Date: Wed, 28 Aug 2024 19:13:12 +0200 Subject: [PATCH 05/20] chore: add test migration --- migrations/20240828191223_test.down.sql | 1 + migrations/20240828191223_test.up.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 migrations/20240828191223_test.down.sql create mode 100644 migrations/20240828191223_test.up.sql diff --git a/migrations/20240828191223_test.down.sql b/migrations/20240828191223_test.down.sql new file mode 100644 index 0000000..3477a8c --- /dev/null +++ b/migrations/20240828191223_test.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS test; diff --git a/migrations/20240828191223_test.up.sql b/migrations/20240828191223_test.up.sql new file mode 100644 index 0000000..6f220fd --- /dev/null +++ b/migrations/20240828191223_test.up.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS test ( + uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + /*----------------------------*/ + -- extras + +); From 07f85d555b32bfb5135cab34e2ef8ed02bd8316f Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:18:52 +0200 Subject: [PATCH 06/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 9678750..e304b0e 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -102,6 +102,9 @@ jobs: with: files: migrations/** + - name: Debug - List Changed Files + run: echo "${{ steps.changed-files-specific.outputs.all_changed_files }}" + - name: Execute Cloud Run Migration Job if: steps.changed-files-specific.outputs.any_changed == 'true' run: | From d00d8329f3ed99bc1967b5e869463ce5fecddc70 Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:34:09 +0200 Subject: [PATCH 07/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index e304b0e..a93c2d8 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -103,7 +103,7 @@ jobs: files: migrations/** - name: Debug - List Changed Files - run: echo "${{ steps.changed-files-specific.outputs.all_changed_files }}" + run: echo "${{ steps.changed-files-specific.outputs.any_changed }}" - name: Execute Cloud Run Migration Job if: steps.changed-files-specific.outputs.any_changed == 'true' From c298760c097bb2a22f77f7491af631d59f228456 Mon Sep 17 00:00:00 2001 From: davidhorvat Date: Wed, 28 Aug 2024 19:36:43 +0200 Subject: [PATCH 08/20] chore: add test migration --- migrations/20240828193630_test123.down.sql | 1 + migrations/20240828193630_test123.up.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 migrations/20240828193630_test123.down.sql create mode 100644 migrations/20240828193630_test123.up.sql diff --git a/migrations/20240828193630_test123.down.sql b/migrations/20240828193630_test123.down.sql new file mode 100644 index 0000000..a4cf2c6 --- /dev/null +++ b/migrations/20240828193630_test123.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS test123; diff --git a/migrations/20240828193630_test123.up.sql b/migrations/20240828193630_test123.up.sql new file mode 100644 index 0000000..54e6ae0 --- /dev/null +++ b/migrations/20240828193630_test123.up.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS test123 ( + uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + /*----------------------------*/ + -- extras + +); From 552885da5b833d6d50396248c3bb932e7fb5f662 Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:41:34 +0200 Subject: [PATCH 09/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 30 ++++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index a93c2d8..3bf29e5 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -96,21 +96,6 @@ jobs: -t "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.SERVICE }}:${{ github.sha }}" ./ docker push "${{ env.GAR_LOCATION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.SERVICE }}/${{ env.SERVICE }}:${{ github.sha }}" - - name: Get changed files in the docs folder - id: changed-files-specific - uses: tj-actions/changed-files@v34 - with: - files: migrations/** - - - name: Debug - List Changed Files - run: echo "${{ steps.changed-files-specific.outputs.any_changed }}" - - - name: Execute Cloud Run Migration Job - if: steps.changed-files-specific.outputs.any_changed == 'true' - run: | - gcloud run jobs execute migrate \ - --project ${{ env.PROJECT_ID }} \ - # END - Docker auth and build - name: Prepare Environment Variables for Deployment @@ -139,3 +124,18 @@ jobs: # If required, use the Cloud Run url output in later steps - name: Show Output run: echo ${{ steps.deploy.outputs.url }} + + - name: Get changed files in the docs folder + id: changed-files-specific + uses: tj-actions/changed-files@v34 + with: + files: migrations/** + + - name: Debug - List Changed Files + run: echo "${{ steps.changed-files-specific.outputs.any_changed }}" + + - name: Execute Cloud Run Migration Job + if: steps.changed-files-specific.outputs.any_changed == 'true' + run: | + gcloud run jobs execute migrate \ + --project ${{ env.PROJECT_ID }} \ From b296c994993f632ed74bb81fb7d55e41cfd33e2f Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:46:38 +0200 Subject: [PATCH 10/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 3bf29e5..b7d1f24 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -126,13 +126,15 @@ jobs: run: echo ${{ steps.deploy.outputs.url }} - name: Get changed files in the docs folder - id: changed-files-specific - uses: tj-actions/changed-files@v34 + - uses: dorny/paths-filter@v3 + id: filter with: - files: migrations/** + filters: | + migrations: + - '.github/migrations/**' - name: Debug - List Changed Files - run: echo "${{ steps.changed-files-specific.outputs.any_changed }}" + run: echo "${{ steps.filter.outputs.migrations }}" - name: Execute Cloud Run Migration Job if: steps.changed-files-specific.outputs.any_changed == 'true' From 1ba3f8faf0c3492210dc4d5b41e4ed0665062486 Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:49:12 +0200 Subject: [PATCH 11/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index b7d1f24..5c770b7 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -126,7 +126,7 @@ jobs: run: echo ${{ steps.deploy.outputs.url }} - name: Get changed files in the docs folder - - uses: dorny/paths-filter@v3 + uses: dorny/paths-filter@v3 id: filter with: filters: | From 47e7410063ca9606ea3881031a8291791d287396 Mon Sep 17 00:00:00 2001 From: davidhorvat Date: Wed, 28 Aug 2024 19:51:37 +0200 Subject: [PATCH 12/20] chore: add test migration --- migrations/20240828195123_testxxx.down.sql | 1 + migrations/20240828195123_testxxx.up.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 migrations/20240828195123_testxxx.down.sql create mode 100644 migrations/20240828195123_testxxx.up.sql diff --git a/migrations/20240828195123_testxxx.down.sql b/migrations/20240828195123_testxxx.down.sql new file mode 100644 index 0000000..a468076 --- /dev/null +++ b/migrations/20240828195123_testxxx.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS testxxx; diff --git a/migrations/20240828195123_testxxx.up.sql b/migrations/20240828195123_testxxx.up.sql new file mode 100644 index 0000000..d4cf3c4 --- /dev/null +++ b/migrations/20240828195123_testxxx.up.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS testxxx ( + uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + /*----------------------------*/ + -- extras + +); From 9d366d61cfd05fc794fc38e71f596f255b2fdbe6 Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 19:54:35 +0200 Subject: [PATCH 13/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 5c770b7..cae24ec 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -131,7 +131,7 @@ jobs: with: filters: | migrations: - - '.github/migrations/**' + - 'migrations/**' - name: Debug - List Changed Files run: echo "${{ steps.filter.outputs.migrations }}" From e7890661ed466597f992cd9f0865057a7d34430d Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:02:36 +0200 Subject: [PATCH 14/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index cae24ec..833585f 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -131,7 +131,7 @@ jobs: with: filters: | migrations: - - 'migrations/**' + - './migrations/**' - name: Debug - List Changed Files run: echo "${{ steps.filter.outputs.migrations }}" From 247d70850b0e0c3ae743a1a295ca1c3ac67b7547 Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 21:02:42 +0200 Subject: [PATCH 15/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 833585f..2020dc9 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -129,9 +129,10 @@ jobs: uses: dorny/paths-filter@v3 id: filter with: + fetch-depth: 0 filters: | migrations: - - './migrations/**' + - 'migrations/**' - name: Debug - List Changed Files run: echo "${{ steps.filter.outputs.migrations }}" From 6cf82931ec5d2f71ab1bbfdd519737565ece9a9a Mon Sep 17 00:00:00 2001 From: davidhorvat Date: Wed, 28 Aug 2024 21:05:02 +0200 Subject: [PATCH 16/20] chore: add test migration --- migrations/20240828210439_testasasa.down.sql | 1 + migrations/20240828210439_testasasa.up.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 migrations/20240828210439_testasasa.down.sql create mode 100644 migrations/20240828210439_testasasa.up.sql diff --git a/migrations/20240828210439_testasasa.down.sql b/migrations/20240828210439_testasasa.down.sql new file mode 100644 index 0000000..8790227 --- /dev/null +++ b/migrations/20240828210439_testasasa.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS testasasa; diff --git a/migrations/20240828210439_testasasa.up.sql b/migrations/20240828210439_testasasa.up.sql new file mode 100644 index 0000000..91fcc55 --- /dev/null +++ b/migrations/20240828210439_testasasa.up.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS testasasa ( + uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + /*----------------------------*/ + -- extras + +); From e36fc1ad880706a4c23436166a1082e0508cbc4f Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 21:08:34 +0200 Subject: [PATCH 17/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 2020dc9..9f1f038 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -138,7 +138,7 @@ jobs: run: echo "${{ steps.filter.outputs.migrations }}" - name: Execute Cloud Run Migration Job - if: steps.changed-files-specific.outputs.any_changed == 'true' + if: steps.filter.outputs.migrations == 'true' run: | gcloud run jobs execute migrate \ --project ${{ env.PROJECT_ID }} \ From 4b3808d4ce606fee0be7302a7b49d48b314cae9e Mon Sep 17 00:00:00 2001 From: davidhorvat Date: Wed, 28 Aug 2024 21:11:05 +0200 Subject: [PATCH 18/20] chore: remove test migration --- migrations/20240828191223_test.down.sql | 1 - migrations/20240828191223_test.up.sql | 7 ------- migrations/20240828193630_test123.down.sql | 1 - migrations/20240828193630_test123.up.sql | 7 ------- migrations/20240828195123_testxxx.down.sql | 1 - migrations/20240828195123_testxxx.up.sql | 7 ------- migrations/20240828210439_testasasa.down.sql | 1 - migrations/20240828210439_testasasa.up.sql | 7 ------- 8 files changed, 32 deletions(-) delete mode 100644 migrations/20240828191223_test.down.sql delete mode 100644 migrations/20240828191223_test.up.sql delete mode 100644 migrations/20240828193630_test123.down.sql delete mode 100644 migrations/20240828193630_test123.up.sql delete mode 100644 migrations/20240828195123_testxxx.down.sql delete mode 100644 migrations/20240828195123_testxxx.up.sql delete mode 100644 migrations/20240828210439_testasasa.down.sql delete mode 100644 migrations/20240828210439_testasasa.up.sql diff --git a/migrations/20240828191223_test.down.sql b/migrations/20240828191223_test.down.sql deleted file mode 100644 index 3477a8c..0000000 --- a/migrations/20240828191223_test.down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS test; diff --git a/migrations/20240828191223_test.up.sql b/migrations/20240828191223_test.up.sql deleted file mode 100644 index 6f220fd..0000000 --- a/migrations/20240828191223_test.up.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE IF NOT EXISTS test ( - uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, - created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP - /*----------------------------*/ - -- extras - -); diff --git a/migrations/20240828193630_test123.down.sql b/migrations/20240828193630_test123.down.sql deleted file mode 100644 index a4cf2c6..0000000 --- a/migrations/20240828193630_test123.down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS test123; diff --git a/migrations/20240828193630_test123.up.sql b/migrations/20240828193630_test123.up.sql deleted file mode 100644 index 54e6ae0..0000000 --- a/migrations/20240828193630_test123.up.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE IF NOT EXISTS test123 ( - uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, - created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP - /*----------------------------*/ - -- extras - -); diff --git a/migrations/20240828195123_testxxx.down.sql b/migrations/20240828195123_testxxx.down.sql deleted file mode 100644 index a468076..0000000 --- a/migrations/20240828195123_testxxx.down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS testxxx; diff --git a/migrations/20240828195123_testxxx.up.sql b/migrations/20240828195123_testxxx.up.sql deleted file mode 100644 index d4cf3c4..0000000 --- a/migrations/20240828195123_testxxx.up.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE IF NOT EXISTS testxxx ( - uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, - created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP - /*----------------------------*/ - -- extras - -); diff --git a/migrations/20240828210439_testasasa.down.sql b/migrations/20240828210439_testasasa.down.sql deleted file mode 100644 index 8790227..0000000 --- a/migrations/20240828210439_testasasa.down.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS testasasa; diff --git a/migrations/20240828210439_testasasa.up.sql b/migrations/20240828210439_testasasa.up.sql deleted file mode 100644 index 91fcc55..0000000 --- a/migrations/20240828210439_testasasa.up.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE IF NOT EXISTS testasasa ( - uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, - created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP - /*----------------------------*/ - -- extras - -); From d29d9376aa48ee60f5913e7b7c253fa7f75cc6f9 Mon Sep 17 00:00:00 2001 From: davidh16 <87704377+davidh16@users.noreply.github.com> Date: Wed, 28 Aug 2024 21:13:42 +0200 Subject: [PATCH 19/20] Update google-cloudrun-docker.yml --- .github/workflows/google-cloudrun-docker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/google-cloudrun-docker.yml b/.github/workflows/google-cloudrun-docker.yml index 9f1f038..59d2a66 100644 --- a/.github/workflows/google-cloudrun-docker.yml +++ b/.github/workflows/google-cloudrun-docker.yml @@ -142,3 +142,4 @@ jobs: run: | gcloud run jobs execute migrate \ --project ${{ env.PROJECT_ID }} \ + --region ${{ env.REGION }} \ From b80dea8d1aaefc41f3912e225e0c131dab98b910 Mon Sep 17 00:00:00 2001 From: davidhorvat Date: Wed, 28 Aug 2024 21:16:18 +0200 Subject: [PATCH 20/20] chore: add test migration --- migrations/20240828211601_testaxxx.down.sql | 1 + migrations/20240828211601_testaxxx.up.sql | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 migrations/20240828211601_testaxxx.down.sql create mode 100644 migrations/20240828211601_testaxxx.up.sql diff --git a/migrations/20240828211601_testaxxx.down.sql b/migrations/20240828211601_testaxxx.down.sql new file mode 100644 index 0000000..8e36ad2 --- /dev/null +++ b/migrations/20240828211601_testaxxx.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS testaxxx; diff --git a/migrations/20240828211601_testaxxx.up.sql b/migrations/20240828211601_testaxxx.up.sql new file mode 100644 index 0000000..cab8bcf --- /dev/null +++ b/migrations/20240828211601_testaxxx.up.sql @@ -0,0 +1,7 @@ +CREATE TABLE IF NOT EXISTS testaxxx ( + uuid uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY, + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP + /*----------------------------*/ + -- extras + +);