From 3ee80d31adfd577ff95f20e4e4efee3fa67da372 Mon Sep 17 00:00:00 2001 From: mrveiss Date: Mon, 23 Mar 2026 21:51:59 +0200 Subject: [PATCH] fix(slm): remove stale SQLite references, use PostgreSQL in bootstrap (#1815) Update bootstrap-slm.sh to generate PostgreSQL DATABASE_URL instead of SQLite, preventing recreation of the stale slm.db file. Update migration docstring and README to reflect PostgreSQL migration (#786). --- .../autobot-slm-backend/scripts/bootstrap-slm.sh | 4 ++-- autobot-slm-backend/README_NEW_ENDPOINTS.md | 7 ++----- autobot-slm-backend/migrations/__init__.py | 4 ++-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/autobot-infrastructure/autobot-slm-backend/scripts/bootstrap-slm.sh b/autobot-infrastructure/autobot-slm-backend/scripts/bootstrap-slm.sh index d39e906b1..3fcffc8e7 100644 --- a/autobot-infrastructure/autobot-slm-backend/scripts/bootstrap-slm.sh +++ b/autobot-infrastructure/autobot-slm-backend/scripts/bootstrap-slm.sh @@ -397,8 +397,8 @@ backend_setup() { HOST=127.0.0.1 PORT=8000 -# Database -DATABASE_URL=sqlite:///${REMOTE_BACKEND}/data/slm.db +# Database (PostgreSQL — Issue #786) +SLM_DATABASE_URL=postgresql+asyncpg://slm_app@127.0.0.1:5432/slm # Redis (optional but recommended) REDIS_HOST=${AUTOBOT_REDIS_HOST:-172.16.168.23} diff --git a/autobot-slm-backend/README_NEW_ENDPOINTS.md b/autobot-slm-backend/README_NEW_ENDPOINTS.md index edb1641c0..1d9fd170a 100644 --- a/autobot-slm-backend/README_NEW_ENDPOINTS.md +++ b/autobot-slm-backend/README_NEW_ENDPOINTS.md @@ -49,11 +49,8 @@ pip install -r requirements.txt python migrations/add_events_certificates_updates_tables.py ``` -Or specify custom database path: - -```bash -python migrations/add_events_certificates_updates_tables.py /path/to/slm.db -``` +Note: The SLM backend uses PostgreSQL (Issue #786). SQLite-based +migrations in this directory are legacy and no longer apply. ### 3. Verify Installation diff --git a/autobot-slm-backend/migrations/__init__.py b/autobot-slm-backend/migrations/__init__.py index dc0bca694..e0494467f 100644 --- a/autobot-slm-backend/migrations/__init__.py +++ b/autobot-slm-backend/migrations/__init__.py @@ -2,7 +2,7 @@ # Copyright (c) 2025 mrveiss # Author: mrveiss """ -SLM Database Migrations +SLM Database Migrations. -Simple migration system for SQLite database updates. +PostgreSQL is used for all database operations (Issue #786). """