Optional Postgres support for self-hosting
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- docker, javascript, node.js, postgresql, sqlite
- Lĩnh vực
- backend, database, devops, documentation
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.jsfor Postgres: autoincrement ids,INTEGERbooleans, text dates andINSERT OR IGNOREstyle statements all differ. - Find and fix SQLite-only SQL across
backend/routes/andbackend/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 testgreen 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.jspasses.
Large change: please comment with a plan and split it into several pull requests.
- Ngôn ngữ chính
- JavaScript
- Star
- 0
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sennaicodes/codearena
-
Add issue and pull request templatesCó thể làm lại được @franciscorodr26 đã nhận 24 ngày trước và không có pull request nào đang mở. Đang mởdocumentation good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
sennaicodes/codearena#13 · 1 bình luận ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
sennaicodes/codearena#34 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
sennaicodes/codearena#33 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
sennaicodes/codearena#32 ·
-
enhancement help wanted
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
sennaicodes/codearena#31 ·
Tất cả issue của sennaicodes/codearena
Issue tương tự
-
Site Suggestion: bullseyeĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 25 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
libnativeapi/nativeapi#21 ·
-
area: core complexity: easy impact: medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
ueberdosis/tiptap#8668 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày