Remove unused empty migrations/ directory; document migration-baseline blocker (#541)#556
Open
maltehuebner wants to merge 1 commit into
Open
Remove unused empty migrations/ directory; document migration-baseline blocker (#541)#556maltehuebner wants to merge 1 commit into
maltehuebner wants to merge 1 commit into
Conversation
Doctrine migrations are configured to live in src/Migrations (config/packages/doctrine_migrations.yaml). The top-level migrations/ directory only contained an empty .gitignore (default Symfony skeleton leftover) and was a confusing second, unused location. Removed it. Refs #541 (the larger baseline-migration/materialized-view work is documented as still open on the issue). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Partial progress on #541. Only the safe, unambiguous task is implemented here; the core baseline-migration work is blocked on information that is not in the repository (details below), so it is deliberately left open rather than guessed.
Changes
migrations/directory (it held only an empty.gitignore, a Symfony-skeleton leftover). Migrations are configured undersrc/Migrationsinconfig/packages/doctrine_migrations.yaml, so the second empty location was purely confusing. (Task: "Leeres migrations/-Verzeichnis entfernen.")Open (deliberately not implemented)
Consolidated PostgreSQL baseline migration + the
current_datamaterialized viewThe table schema can be generated authoritatively and offline from the entity metadata (
bin/console doctrine:schema:create --dump-sql), and is a solid starting point:The blocker is the
current_datamaterialized view. It is not defined anywhere in the repository, and it cannot be safely reconstructed from the code:DataRepository::findCurrentDataForCoord()selectsid, ..., id AS station_idfrom the samecurrent_data.idcolumn, i.e. the view's column layout is ambiguous from the query alone (data id vs. station id), so an inferredCREATE MATERIALIZED VIEWrisks mapping the wrong columns and silently corrupting results.LuftRefreshCommand) are unknown.The definitive source is the production database:
Once that definition is captured, the baseline migration should bundle the tables above +
CREATE EXTENSION IF NOT EXISTS postgis+ the realcurrent_datamatview (+ its index).Removal of the old MySQL/
getName()migrations and the 29 baseline entriesThese are intentionally not removed yet: they can only be dropped once the consolidated baseline above exists (otherwise a fresh
doctrine:migrations:migratehas no schema at all). Removing them also requires the standard baseline procedure on existing databases:The 29
AbstractPlatform::getName()phpstan-baseline.neonentries must be removed together with those migration files (they still error under DBAL 4 while the files exist;reportUnmatchedIgnoredErrorsisfalse, so leaving them is harmless until then).Verification limit
The table DDL above is generated from the live entity mapping (authoritative). The full baseline + matview needs a real PostGIS database to author correctly and to run
doctrine:migrations:migrateend-to-end; that production schema/view definition was not available in this environment (the only reachable local PostGIS container hosts an unrelated application), so it is left to a maintainer with DB access. This PR ships only the zero-risk directory cleanup.Refs #541
🤖 Generated with Claude Code