From 4a4b7924c5e53ca3daa356ae1c01588564934b7c Mon Sep 17 00:00:00 2001 From: pac7 <47831526-pac7@users.noreply.replit.com> Date: Sun, 21 Sep 2025 01:13:57 +0000 Subject: [PATCH] Update database configuration to use PostgreSQL Switches the default database engine back to PostgreSQL by updating the `DATABASE_URL` environment variable and the `GDAL_LIBRARY_PATH` and `GEOS_LIBRARY_PATH` settings for GeoDjango. Replit-Commit-Author: Agent Replit-Commit-Session-Id: eff39de1-3afa-446d-a965-acaf61837fc7 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/d6d61dac-164d-45dd-929f-7dcdfd771b64/eff39de1-3afa-446d-a965-acaf61837fc7/NsPV9U7 --- backend/config/settings/database.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/backend/config/settings/database.py b/backend/config/settings/database.py index 6f33c2fc..781be7b0 100644 --- a/backend/config/settings/database.py +++ b/backend/config/settings/database.py @@ -13,8 +13,8 @@ env = environ.Env( str, "postgis://thrillwiki_user:thrillwiki@localhost:5432/thrillwiki_test_db", ), - GDAL_LIBRARY_PATH=(str, "/opt/homebrew/lib/libgdal.dylib"), - GEOS_LIBRARY_PATH=(str, "/opt/homebrew/lib/libgeos_c.dylib"), + GDAL_LIBRARY_PATH=(str, "/nix/store/c5y314zvvrbr9lx4wh06ibl1b5c07x92-gdal-3.11.0/lib/libgdal.so"), + GEOS_LIBRARY_PATH=(str, "/nix/store/r5sgxqxrwfvms97v4v239qbivwsmdfjf-geos-3.13.1/lib/libgeos_c.so"), CACHE_URL=(str, "locmemcache://"), CACHE_MIDDLEWARE_SECONDS=(int, 300), CACHE_MIDDLEWARE_KEY_PREFIX=(str, "thrillwiki"), @@ -23,14 +23,9 @@ env = environ.Env( # Database configuration db_config = env.db("DATABASE_URL") -# Use SQLite for now to bypass PostGIS setup issues - FORCE SQLite for setup -db_config["ENGINE"] = "django.db.backends.sqlite3" - +# Switch back to PostgreSQL - GeoDjango issues resolved separately DATABASES = { - "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": BASE_DIR / "thrillwiki.db", - }, + "default": db_config, } # GeoDjango Settings - Environment specific with fallbacks