Skip to content

#194 - Entities: explicit table and column names, independent of the naming strategy of the application - #195

Merged
njoubert-cleverage merged 1 commit into
mainfrom
194
Oct 21, 2026
Merged

njoubert-cleverage merged 1 commit into
mainfrom
194

Conversation

@njoubert-cleverage

Copy link
Copy Markdown
Member

Description

Fixes #194.

  • Every table and column of the entities (LogRecord, ProcessExecution, ProcessSchedule, User) has an explicit name (#[ORM\Table(name: …)], #[ORM\Column(name: …)]), exactly the one created by the migrations of the bundle: the schema no longer depends on the Doctrine naming strategy of the application. The IDX_… / FK_… / UNIQ_… names generated by Doctrine are computed from the table and column names: unchanged. No new migration.
  • docs/index.md: the underscore_number_aware naming strategy is no longer a prerequisite.
  • The test application no longer configures naming_strategy (Doctrine default): the CI "migrations" job now validates the schema created by the migrations with the default strategy.
  • CHANGELOG.

Out of scope (BC, 4.0): log_record table without prefix, overridable mapping (#37).

Tests: new MappingTest: with the Doctrine default strategy and the underscore_number_aware strategy (lower and upper case), each entity maps the same table and column names, and its indexes reference existing columns. It fails on main with the default and upper case strategies.

Checked in the container:

  • PHP 8.5, highest dependencies: 465 tests, no risky test (pcov coverage). PHPStan, PHP-CS-Fixer, Rector and Twig-CS-Fixer OK.
  • PHP 8.2, lowest dependencies (ORM 2.20, DBAL 3.10, Symfony 6.4): 464 tests OK.
  • As the CI "migrations" job, with the default naming strategy: migrations then doctrine:schema:validate in sync on MySQL 8.4 and PostgreSQL 17 (out of sync with the entities of main).
  • Demo (underscore strategy), entities patched in its vendor: no schema difference on the tables of the bundle.

Requirements

  • Documentation updates
    • Reference
    • Cookbooks
    • Changelog
  • Unit tests

Breaking changes

None: with the underscore_number_aware / underscore strategy (the documented prerequisite), the names are the same; with another strategy, the schema did not match the migrations of the bundle.

🤖 Generated with Claude Code

…naming strategy of the application

Every table and column of the entities has an explicit name, the one created
by the migrations: the schema no longer depends on the Doctrine naming
strategy (underscore_number_aware no longer a prerequisite). The test
application uses the Doctrine default strategy, the CI validates the schema
of the migrations with it. Tests, documentation and CHANGELOG updated.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@njoubert-cleverage
njoubert-cleverage merged commit 8527e50 into main Oct 21, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entities: explicit table and column names, independent of the naming strategy of the application

1 participant