PostgreSQL becomes the default backend
維護者通常 6 天內回覆
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 描述清楚
- 活躍度
- 停滯
- 技術堆疊
- docker-compose, mysql, postgresql, python
- 領域
- cli, databases, devops, documentation
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Python
- 星號
- 198
- 分支
- 103
- 平均合併
- 6 天 1 小時
- 30 天內合併 PR
- 10
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
datajoint/datajoint-python 的其他 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
datajoint/datajoint-python#1703 ·
維護者通常 6 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
datajoint/datajoint-python#1702 ·
維護者通常 6 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 78/100
datajoint/datajoint-python#1701 ·
維護者通常 6 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 74/100
datajoint/datajoint-python#1691 ·
維護者通常 6 天內回覆
-
dependencies needs-discussion
難度 2/5 1-3 小時 新手友好度 68/100
datajoint/datajoint-python#1687 ·
維護者通常 6 天內回覆
查看 datajoint/datajoint-python 的全部 Issue
相似的 Issue
-
needs-triage
難度 1/5 1-3 小時 新手友好度 85/100
gke-labs/kube-agents#6620 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
open-webui/open-webui#34719 · 2 則留言 ·
維護者通常 1 天內回覆
-
cognition
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 1 天內回覆
-
One non-object JSON record makes the session catalog exit可能已有人在做 @he-yufeng 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 78/100
collabnix/awesome-mcp-lists#433 ·
維護者通常 4 天內回覆