PostgreSQL becomes the default backend
Los mantenedores suelen responder en 6 días
@dimitri-yatsenko ya está trabajando en esto.
Desde el 17/10/2026.
- #1629 de @dimitri-yatsenko — abierto
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Estancado
- Stack tecnológico
- docker-compose, mysql, postgresql, python
- Área
- cli, databases, devops, documentation
Línea de trabajo
Start with the database backend configuration and connection setup, then inspect the settings docstring, CLI help, docker-compose.yaml, and CONTRIBUTING.md; the issue does not name source files. Update PostgreSQL defaults and backend-aware port selection, while ensuring MySQL fixtures and users select MySQL explicitly. Run the relevant test suite and verify dj.config.save_template(), connection error behavior, and documentation examples.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Motivation
DataJoint supports PostgreSQL and MySQL as production backends, with the same features on both. Today database.backend defaults to "mysql", so a new user who installs DataJoint and connects without configuring a backend gets MySQL.
PostgreSQL becomes the default backend. A new install should work against PostgreSQL with no backend setting, and the documentation, examples, and test runs should lead with it. MySQL stays a fully supported backend; selecting it takes one setting.
The change
-
database.backenddefaults to"postgresql", and the default port is 5432. -
The port follows the backend unless it is set. Today the port is derived only when the settings are first built, so
database.backendset indatajoint.jsonor assigned at run time leaves the other backend's port in place. After this change,backend: "mysql"with no port connects on 3306. -
If a connection fails while the backend is still the default, so that neither the configuration nor the code chose one, the error adds:
The default backend is postgresql since DataJoint 2.4; set database.backend='mysql' (DJ_BACKEND=mysql) for a MySQL server.A backend set by
DJ_BACKEND,datajoint.json,dj.config, or thebackendargument ofdj.Connection/dj.Instancecounts as chosen, and its connection errors are raised unchanged. -
dj.config.save_template()writes"backend": "postgresql"and port 5432. -
The settings docstring, CLI help,
docker-compose.yaml, andCONTRIBUTING.mdlist PostgreSQL first. -
The test fixtures that connect to the MySQL test server select MySQL explicitly instead of relying on the default.
Migration for MySQL users
Select the MySQL backend in any one of these ways:
-
Environment:
export DJ_BACKEND=mysql -
datajoint.json:{ "database": { "backend": "mysql", "host": "db.example.org" } } -
In code, before connecting:
dj.config["database.backend"] = "mysql" -
For an isolated instance:
dj.Instance(host=..., user=..., password=..., backend="mysql")
With the backend set, the port defaults to 3306. A port set explicitly (DJ_PORT, database.port, or host:port) is kept as is. A MySQL setup that sets no backend fails to connect with the message above.
- Lenguaje dominante
- Python
- Estrellas
- 198
- Forks
- 103
- Merge medio
- 6 d 1 h
- PR fusionados (30 d)
- 10
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de datajoint/datajoint-python
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
datajoint/datajoint-python#1703 ·
Los mantenedores suelen responder en 6 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
datajoint/datajoint-python#1702 ·
Los mantenedores suelen responder en 6 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
datajoint/datajoint-python#1701 ·
Los mantenedores suelen responder en 6 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
datajoint/datajoint-python#1691 ·
Los mantenedores suelen responder en 6 días
-
dependencies needs-discussion
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
datajoint/datajoint-python#1687 ·
Los mantenedores suelen responder en 6 días
Todos los issues de datajoint/datajoint-python
Issues similares
-
needs-triage
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
gke-labs/kube-agents#6620 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
open-webui/open-webui#34719 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
cognition
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
One non-object JSON record makes the session catalog exitPosiblemente ocupada @he-yufeng la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
[Suggestion]: Geonode MCP ServerAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
collabnix/awesome-mcp-lists#433 ·
Los mantenedores suelen responder en 4 días