Repository navigation
#194 - Entities: explicit table and column names, independent of the naming strategy of the application - #195
Merged
Merged
Conversation
…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>
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.
Description
Fixes #194.
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. TheIDX_…/FK_…/UNIQ_…names generated by Doctrine are computed from the table and column names: unchanged. No new migration.docs/index.md: theunderscore_number_awarenaming strategy is no longer a prerequisite.naming_strategy(Doctrine default): the CI "migrations" job now validates the schema created by the migrations with the default strategy.Out of scope (BC, 4.0):
log_recordtable without prefix, overridable mapping (#37).Tests: new
MappingTest: with the Doctrine default strategy and theunderscore_number_awarestrategy (lower and upper case), each entity maps the same table and column names, and its indexes reference existing columns. It fails onmainwith the default and upper case strategies.Checked in the container:
doctrine:schema:validatein sync on MySQL 8.4 and PostgreSQL 17 (out of sync with the entities ofmain).underscorestrategy), entities patched in its vendor: no schema difference on the tables of the bundle.Requirements
Breaking changes
None: with the
underscore_number_aware/underscorestrategy (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