Repository navigation
CI: run the migrations on MySQL, MariaDB and PostgreSQL - #130
Merged
Merged
Conversation
`migrations` job of test.yml, with DBAL 3 and 4: migrate, doctrine:schema:validate (not with DBAL 3 on PostgreSQL, which does not read the identity columns), migrate first, migrate again. Console of the test application, database URL overridable with DATABASE_URL (SQLite by default). Co-Authored-By: Claude Opus 5.5 (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.
Fixes #129
Changes
test.yml: newmigrationsjob, matrix MySQL 8.4 / MariaDB 11.4 / PostgreSQL 17 × DBAL 3 (PHP 8.4, Symfony 7.4) / DBAL 4 (PHP 8.5, highest):doctrine:migrations:migratedoctrine:schema:validate: the schema created by the migrations matches the mappingdoctrine:migrations:migrate first: all thedown()methodsdoctrine:migrations:migrateanddoctrine:schema:validateagaintests/App/bin/console: console of the test applicationtests/App/config/packages.yaml: database URL overridable withDATABASE_URL, SQLite by default (the functional tests are unchanged)DBAL 3 on PostgreSQL
doctrine:schema:validateis skipped: DBAL 3 does not read the identity columns created by the migrations (#99), it expects sequences (withAUTO:CREATE SEQUENCE ...; with theidentity_generation_preferencesof the Symfony recipe:CREATE SEQUENCE+ALTER ... SET DEFAULT nextval(...)), so the schema is always reported as out of sync. Inserts work (checked with process executions: ids generated), the ORM uses the sequence created by PostgreSQL for the identity column (<table>_id_seq). The migrations themselves (up, down, up) are run.Checks (locally, same sequence, throwaway containers)
schema:validate)Version20261008120000migration (Cosmetic cleanup: (DC2Type) column comments, UiOptions PHPDoc #127),doctrine:schema:validatefails (exit 2) on MySQL: the job would have detected it.serverVersionis set in the URLs (with DBAL 4 on PostgreSQL, without it:Invalid platform version "").🤖 Generated with Claude Code