Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Optional Postgres support for self-hosting

Abierto
#30 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker, javascript, node.js, postgresql, sqlite

Línea de trabajo

Start by reading backend/db.js to map the existing database operations and schema, then inspect SQLite-specific SQL in backend/routes/ and backend/server.js. Run npm test and node scripts/check-boundary.js to establish the current baseline. This is explicitly a large, multi-PR change; done means both database test runs pass, a seeded SQLite database migrates with table row counts reported, and self-hosting docs are updated.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement help wanted

CodeArena runs on SQLite only. That is perfect for a small instance, but a busy self-hosted copy wants a managed database with backups, replicas and more than one backend process.

Goal

Optional Postgres support selected by DATABASE_URL, with SQLite remaining the default and zero-config.

What to do

  • Put database access behind a small adapter with the operations the code already uses (run, get, all, transactions), with one implementation per engine.
  • Translate schema and migrations in backend/db.js for Postgres: autoincrement ids, INTEGER booleans, text dates and INSERT OR IGNORE style statements all differ.
  • Find and fix SQLite-only SQL across backend/routes/ and backend/server.js. List each pattern you changed in the pull request.
  • A one-way migration script that copies an existing SQLite database into an empty Postgres database and checks row counts per table.

Rules

  • Run the whole backend test suite against both engines in CI, using a Postgres service container. A feature is not done if it only passes on one.
  • No ORM rewrite. Keep the SQL readable and close to what is there.

Definition of done

  • npm test green on SQLite and Postgres.
  • A real migration of a seeded local database, with row counts in the pull request.
  • Self-hosting docs updated, including the Docker setup if #10 has landed.
  • node scripts/check-boundary.js passes.

Large change: please comment with a plan and split it into several pull requests.

Lenguaje dominante
JavaScript
Estrellas
0
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de sennaicodes/codearena

Todos los issues de sennaicodes/codearena

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.