Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#556 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
php, symfony
Ambito
backend, database

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).
Lingua principale
PHP
Stelle
32
Fork
8
Merge medio
1h 1m
PR unite (30g)
193

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di components-web-app/api-components-bundle

Tutte le issue di components-web-app/api-components-bundle

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.