From 0d1cdebbd9021f8424dd159db2e2dac13c6fe3eb Mon Sep 17 00:00:00 2001 From: trenc Date: Wed, 4 Sep 2024 10:15:00 +0200 Subject: [PATCH 1/3] build: use set -e to return non-zero and exit of heredoc session --- .github/workflows/deploy-to-dev.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-to-dev.yml b/.github/workflows/deploy-to-dev.yml index 29d106b..9557ac6 100644 --- a/.github/workflows/deploy-to-dev.yml +++ b/.github/workflows/deploy-to-dev.yml @@ -70,6 +70,7 @@ jobs: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | ssh -tt -o StrictHostKeyChecking=no -p "$PORT" "${{ secrets.DEV_SSH_USER }}@$HOST" < Date: Wed, 4 Sep 2024 10:19:09 +0200 Subject: [PATCH 2/3] build: use set -e to return non-zero and exit of heredoc session --- .github/workflows/deploy-to-live.yml | 1 + .github/workflows/deploy-to-local.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/deploy-to-live.yml b/.github/workflows/deploy-to-live.yml index bd8fe50..e1bd555 100644 --- a/.github/workflows/deploy-to-live.yml +++ b/.github/workflows/deploy-to-live.yml @@ -68,6 +68,7 @@ jobs: SSH_AUTH_SOCK: /tmp/ssh_agent.sock run: | ssh -tt -o StrictHostKeyChecking=no -p "$PORT" "${{ secrets.LIVE_SSH_USER }}@$HOST" < Date: Wed, 4 Sep 2024 10:20:05 +0200 Subject: [PATCH 3/3] fix: remove database name to be generic for all databases --- ...4400_create_summary_stats_view_by_year.php | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/database/migrations/2024_05_03_094400_create_summary_stats_view_by_year.php b/src/database/migrations/2024_05_03_094400_create_summary_stats_view_by_year.php index 31c7cc3..2dc341e 100644 --- a/src/database/migrations/2024_05_03_094400_create_summary_stats_view_by_year.php +++ b/src/database/migrations/2024_05_03_094400_create_summary_stats_view_by_year.php @@ -27,27 +27,27 @@ public function up(): void ( ( SELECT - YEAR(transcribathon.Score.Timestamp) AS Year, - transcribathon.Score.ScoreTypeId AS ScoreTypeId, - COUNT(DISTINCT transcribathon.Score.UserId) AS UniqueUsers, - COUNT(DISTINCT transcribathon.Score.ItemId) AS UniqueItems, - SUM(transcribathon.Score.Amount) AS Amount + YEAR(Score.Timestamp) AS Year, + Score.ScoreTypeId AS ScoreTypeId, + COUNT(DISTINCT Score.UserId) AS UniqueUsers, + COUNT(DISTINCT Score.ItemId) AS UniqueItems, + SUM(Score.Amount) AS Amount FROM - transcribathon.Score + Score GROUP BY - YEAR(transcribathon.Score.Timestamp), - transcribathon.Score.ScoreTypeId + YEAR(Score.Timestamp), + Score.ScoreTypeId ) ) t1 JOIN ( SELECT - YEAR(transcribathon.Score.Timestamp) AS Year, - COUNT(DISTINCT transcribathon.Score.UserId) AS UniqueUsers, - COUNT(DISTINCT transcribathon.Score.ItemId) AS UniqueItems + YEAR(Score.Timestamp) AS Year, + COUNT(DISTINCT Score.UserId) AS UniqueUsers, + COUNT(DISTINCT Score.ItemId) AS UniqueItems FROM - transcribathon.Score + Score GROUP BY - YEAR(transcribathon.Score.Timestamp) + YEAR(Score.Timestamp) ) t2 ON( (t1.Year = t2.Year) ) @@ -58,15 +58,15 @@ public function up(): void COUNT(0) AS NumberOfFirstRecords FROM ( - transcribathon.Score s + Score s JOIN ( SELECT - transcribathon.Score.ItemId AS ItemId, - MIN(transcribathon.Score.ScoreId) AS FirstScoreId + Score.ItemId AS ItemId, + MIN(Score.ScoreId) AS FirstScoreId FROM - transcribathon.Score + Score GROUP BY - transcribathon.Score.ItemId + Score.ItemId ) firstRecords ON( ( (s.ItemId = firstRecords.ItemId)