Skip to content

CI: run the migrations on MySQL, MariaDB and PostgreSQL - #130

Merged
njoubert-cleverage merged 1 commit into
mainfrom
129
Oct 8, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
129

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Fixes #129

Changes

  • test.yml: new migrations job, matrix MySQL 8.4 / MariaDB 11.4 / PostgreSQL 17 × DBAL 3 (PHP 8.4, Symfony 7.4) / DBAL 4 (PHP 8.5, highest):
    1. doctrine:migrations:migrate
    2. doctrine:schema:validate: the schema created by the migrations matches the mapping
    3. doctrine:migrations:migrate first: all the down() methods
    4. doctrine:migrations:migrate and doctrine:schema:validate again
  • tests/App/bin/console: console of the test application
  • tests/App/config/packages.yaml: database URL overridable with DATABASE_URL, SQLite by default (the functional tests are unchanged)

DBAL 3 on PostgreSQL

doctrine:schema:validate is skipped: DBAL 3 does not read the identity columns created by the migrations (#99), it expects sequences (with AUTO: CREATE SEQUENCE ...; with the identity_generation_preferences of 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)

MySQL 8.4 MariaDB 11 PostgreSQL 17
DBAL 4.5 OK OK OK
DBAL 3.10 (Symfony 7.4) OK OK OK (without schema:validate)
  • Without the Version20261008120000 migration (Cosmetic cleanup: (DC2Type) column comments, UiOptions PHPDoc #127), doctrine:schema:validate fails (exit 2) on MySQL: the job would have detected it.
  • serverVersion is set in the URLs (with DBAL 4 on PostgreSQL, without it: Invalid platform version "").
  • actionlint OK; PHPStan, PHP-CS-Fixer, Rector OK; PHPUnit 292 tests OK.

🤖 Generated with Claude Code

`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>
@njoubert-cleverage njoubert-cleverage added the enhancement New feature or request label Oct 8, 2026
@njoubert-cleverage
njoubert-cleverage merged commit 86cad1c into main Oct 8, 2026
24 checks passed
@njoubert-cleverage
njoubert-cleverage deleted the 129 branch October 8, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: run the migrations on MySQL, MariaDB and PostgreSQL

1 participant