fix(#7): Datenbank von SQLite auf PostgreSQL umstellen #10

Merged
Basti merged 1 commit from fix/7-datenbank-von-sqlite-auf-postgresql-um into main 2026-03-30 19:12:20 +00:00
Owner

Bezieht sich auf #7

Änderungen

  • DATABASE_URL Default auf postgresql://bruno:bruno@localhost:5432/bruno
  • psycopg2-binary in requirements.txt
  • backend/database.py: check_same_thread entfernt, conditional SQLite-Fallback
  • backend/api/pipeline.py: julianday()extract(epoch) für PostgreSQL
  • alembic.ini: URL auf PostgreSQL
  • alembic/env.py: render_as_batch entfernt, DATABASE_URL aus ENV
  • docker-compose.yml: PostgreSQL-Service mit Volume + depends_on
  • .env.example: PostgreSQL-URL Beispiel
  • tests/conftest.py: TESTING env var, DATABASE_URL Override
  • backend/main.py: Alembic-Migrations im Test überspringen

Tests

  • Alle 66 Tests bestehen ✓
Bezieht sich auf #7 ## Änderungen - `DATABASE_URL` Default auf `postgresql://bruno:bruno@localhost:5432/bruno` - `psycopg2-binary` in `requirements.txt` - `backend/database.py`: `check_same_thread` entfernt, conditional SQLite-Fallback - `backend/api/pipeline.py`: `julianday()` → `extract(epoch)` für PostgreSQL - `alembic.ini`: URL auf PostgreSQL - `alembic/env.py`: `render_as_batch` entfernt, `DATABASE_URL` aus ENV - `docker-compose.yml`: PostgreSQL-Service mit Volume + `depends_on` - `.env.example`: PostgreSQL-URL Beispiel - `tests/conftest.py`: `TESTING` env var, `DATABASE_URL` Override - `backend/main.py`: Alembic-Migrations im Test überspringen ## Tests - Alle 66 Tests bestehen ✓
- DATABASE_URL Default auf postgresql://bruno:bruno@localhost:5432/bruno
- psycopg2-binary in requirements.txt
- check_same_thread entfernt (SQLite-spezifisch), conditional für SQLite-Fallback
- julianday() durch extract(epoch) ersetzt in pipeline.py
- alembic.ini auf PostgreSQL-URL, render_as_batch entfernt
- alembic/env.py liest DATABASE_URL aus ENV
- docker-compose.yml: PostgreSQL-Service mit Volume
- Tests: TESTING env var überspringt Alembic in Lifespan
Basti merged commit 6fedfdf4e6 into main 2026-03-30 19:12:20 +00:00
Basti deleted branch fix/7-datenbank-von-sqlite-auf-postgresql-um 2026-03-30 19:12:20 +00:00
Sign in to join this conversation.
No description provided.