From ee6017f8ca8265b09995137c866cff46e3f8af85 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Thu, 9 Oct 2025 17:52:04 -0700 Subject: [PATCH 1/2] (FIX): Fixed the database scripts. They were not working properly. --- .gitignore | 1 + internal/infrastructure/database/backup/dump.sh | 3 +++ internal/infrastructure/database/backup/restore.sh | 8 ++++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b11462a..5dada7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /flake.lock /go.sum /.env +/*.dump diff --git a/internal/infrastructure/database/backup/dump.sh b/internal/infrastructure/database/backup/dump.sh index bbc54e0..3c02056 100755 --- a/internal/infrastructure/database/backup/dump.sh +++ b/internal/infrastructure/database/backup/dump.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +# Ensure the environment is sourced +source .env + pg_dump \ -h "$PSQL_HOST" \ -U "$PSQL_USERNAME" \ diff --git a/internal/infrastructure/database/backup/restore.sh b/internal/infrastructure/database/backup/restore.sh index f16832e..4625c61 100755 --- a/internal/infrastructure/database/backup/restore.sh +++ b/internal/infrastructure/database/backup/restore.sh @@ -1,7 +1,11 @@ #!/usr/bin/env bash +# Ensure the environment is sourced +source .env + pg_restore \ - -h "$PSQL_HOST" \ - -U "$PSQL_USERNAME" \ -v -d "$PSQL_DATABASE_BACKUP" \ + -U "$PSQL_USERNAME" \ + -h "$PSQL_HOST" \ -c -F c backup.dump + From 479e709b4eb17fd12ba308548868c47205b0d51e Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Wed, 29 Oct 2025 17:25:52 -0700 Subject: [PATCH 2/2] (FIX): Needed to update flake for debugging. --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 3ad3ac2..6efaf29 100644 --- a/flake.nix +++ b/flake.nix @@ -45,6 +45,8 @@ export GOOS=linux export GOARCH=amd64 + export CGO_CFLAGS=-Wno-error=cpp; + # Exec zsh to replace the current shell process with zsh. # This ensures your prompt and zsh configurations load correctly.