Repository navigation
IBX-11939: Fixed the 6.0 migrations failing in a dry run before the tables exist - #53
Merged
Merged
Conversation
Steveb-p
marked this pull request as ready for review
October 26, 2026 14:07
konradoboza
approved these changes
Oct 27, 2026
bnowak
approved these changes
Oct 27, 2026
…ables exist A dry run executes nothing, so every migration in it gets the schema as it was before the run, without the tables that earlier migrations create. ConvertPostgreSqlSerialColumnsToIdentityMigration and RemoveDoctrineTypeCommentsMigration read those tables, which threw. They now skip a table that isn't in the schema; in a real run, it always is.
…exist A dry run executes nothing, so when it installs the package, the tables that ConvertPostgreSqlSerialColumnsToIdentityMigration and RemoveDoctrineTypeCommentsMigration inspect aren't in the schema. The migrations returned then, or left the missing tables out, which the dry run reported as executed without SQL statements. They now skip, and the dry run says why. In a real run the tables always exist by then.
Steveb-p
force-pushed
the
feature/schema-late-install-6.0
branch
from
October 28, 2026 14:38
0e7c184 to
c58a516
Compare
Steveb-p
changed the base branch from
base/ibx-11939-late-install-5.0-merged-6.0
to
merge/5.0-to-6.0
October 28, 2026 14:38
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.
Related PRs:
5.0into6.0this is stacked onDescription:
A dry run executes nothing, so every migration in it gets the schema as it was before the run, without the tables that earlier migrations of the same run create.
ConvertPostgreSqlSerialColumnsToIdentityMigrationandRemoveDoctrineTypeCommentsMigrationread the package's tables with$schema->getTable()to decide whether there's anything to do, soibexa:doctrine:migrations:migrate --dry-runthrew (There is no table with name "…" in the schema) on any database without them yet: the package installed on an existing project, or an empty database. They now skip when a table isn't in the schema, so the dry run lists them as skipped and says why. In a real run, the tables always exist by then.The dry run's SQL is still incomplete: it can't see what earlier migrations of the same run would have created. For example, after a late install on PostgreSQL the dry run skips the SERIAL → IDENTITY conversion, which the real run does. That's how Doctrine's dry run works with SQL migrations; now it lists the migrations it can't evaluate as skipped, instead of crashing.
Checked in a 6.0 commerce project on MySQL 8.0, MariaDB 10.11, PostgreSQL 16 and SQLite:
ibexa:doctrine:migrations:migrate --dry-runon an empty database passes, and installing the package on a fresh install without it with--dry-run,migrateand a secondmigrateends identical to the fresh install. Fresh installs are byte-identical to before, and both 5.0 → 6.0 upgrades end identical to a fresh install (MySQL, MariaDB and PostgreSQL).This is stacked on #56, the merge-up of
5.0into6.0, so the diff shows only the 6.0 part. #52 fixes the messages index name andFixMessengerMessagesIndexesMigrationafter legacy installs and in a dry run; it reaches 6.0 through that merge-up.For QA:
On a 6.0 project with Doctrine Migrations enabled and installed without ibexa/messenger:
It passes now.
ibexa:doctrine:migrations:migrate --dry-runon an empty database passes too.