Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Ship the bundle's own Doctrine migrations, so apps don't generate them

Đang mở
#556 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

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
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
php, symfony
Lĩnh vực
backend, database

Hướng nghiên cứu

Start by reading the bundle's Doctrine entity mappings and the existing migration configuration to identify the tables and migration entry points involved. The proposal leaves baseline strategy, adoption by existing apps, supported database platforms, and ordering unresolved, so those decisions need to be settled before implementation. Done means the bundle ships migrations for its mapped schema and apps can adopt them without regenerating those migrations locally.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Proposal

The bundle ships Doctrine migrations for its own schema: every table its entities map. Apps then receive them with composer update, through doctrine_migrations.migrations_paths with a bundle namespace.

Why

Almost every table in a CWA app belongs to the bundle's entities. Today each app generates migrations for them itself (doctrine:migrations:diff after updating the bundle), and the template's downstream sites copy the template's generated files. That causes three problems:

  • Data migrations aren't shared: diff only produces schema changes, so a backfill the bundle needs has to be copied by hand.
  • Sites drift: each app's generated SQL can differ slightly from the next.
  • Every bundle schema change needs a template release and a copy step in every downstream site.

If the bundle shipped them, the template would only need migrations for its own entities (today just the Redis watch state). It would also make squashing the template's history at beta simpler: https://github.com/components-web-app/components-web-app/issues/192

Questions for the bundle

  • One baseline at the bundle's beta, then incremental migrations?
  • How existing apps take over: their databases already have these tables from their own generated migrations. They'd mark the bundle's baseline as done (doctrine:migrations:version --add) once, after checking diff is clean.
  • Database platforms: PostgreSQL first? The bundle already lists PostgreSQL, MySQL, MariaDB and SQLite for route-security rules.
  • Ordering between bundle migrations and an app's own (Doctrine sorts by version across namespaces).
Ngôn ngữ chính
PHP
Star
32
Fork
8
Merge trung bình
1 giờ 1 phút
Pull request đã merge (30 ngày)
193

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của components-web-app/api-components-bundle

Tất cả issue của components-web-app/api-components-bundle

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.