Skip to content

IBX-11939: Added Doctrine Migrations for the user-invitation schema - #129

Open
Steveb-p wants to merge 2 commits into
base/ibx-11939-4.6-merged-5.0from
feature/schema-migration-5.0
Open

Steveb-p wants to merge 2 commits into
base/ibx-11939-4.6-merged-5.0from
feature/schema-migration-5.0

Conversation

@Steveb-p

@Steveb-p Steveb-p commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Stacked on the 4.6 → 5.0 merge-up #160. Its base branch (base/ibx-11939-4.6-merged-5.0) is the merge-up's branch — 5.0 with 4.6 merged in, including #128 and #155 — so this PR shows only what 5.0 needs on top. Fast-forward #160 into 5.0 first, then retarget this PR to 5.0.

Warning

This is the 5.0 follow-up to #128 (4.6). It carries the same migration forward onto this branch.

🎫 Issue IBX-11939

Note

Test-side companion — ibexa/test-core#57.
Moves the baseline fixture import into its own BaseFixtureHook (priority 950, between the
schema hooks and FixtureHook), switchable with a load_base_fixture option.
It matters here because under the Doctrine Migrations path the baseline repository content
arrives as core's ImportDataMigration rather than as a loaded fixture, and FixtureImporter
truncates every table a fixture touches before inserting — so a package's own fixture writing
into those tables would take the baseline's rows with it unless it implements AppendOnlyFixture.
Packages whose integration tests load their own fixtures depend on it; the rest are unaffected.

Note

Shared library — ibexa/doctrine-migrations.
Every migration in the table below extends the AbstractSqlMigration / SqlPlatform base it provides.
It is already merged on all three branches, so nothing in this effort is blocked on it:
#1 (4.6 baseline) · #3 (6.0 baseline) · #4 (enable_service_migrations fix) · #6 (DBAL 4).
The fix reached 5.0 and 6.0 via merge-ups #9 and #10 — which is why #5 was closed rather than merged.

Related PRs:

Package 4.6 5.0 6.0
ibexa/activity-log #166 #167 #168 ⏭️
ibexa/cart #172 #173 🔄 #174 ⏭️
ibexa/collaboration – #115 #116 ⏭️
ibexa/connector-ai – #198 #199 ⏭️
ibexa/connector-payum ⚠️ #39 #40 #41 🩹
ibexa/core #785 🩹 #787 🔄 🩹 #788 🩹
ibexa/corporate-account #369 #370 🔄 #371 ⏭️
ibexa/discounts – #341 🩹 #342 🩹 ⏭️
ibexa/discounts-codes – #50 #51 ⏭️
ibexa/doctrine-schema #41 #42 #43
ibexa/fieldtype-page #208 🩹 #209 🔄 🩹 #210 🩹 ⏭️
ibexa/form-builder #240 🩹 #241 🔄 🩹 #242 🩹 ⏭️
ibexa/measurement #133 #134 🔄 #135 ⏭️
ibexa/messenger – #22 #23
ibexa/migrations #438 #439 #440 ⏭️
ibexa/oauth2-server 🔄 #48 #49 #50 ⏭️
ibexa/order-management #188 #189 🔄 #190
ibexa/payment #204 #205 🔄 #206 ⏭️
ibexa/product-catalog #1543 #1544 🔄 #1545 ⏭️
ibexa/product-catalog-date-time-attribute – #53 #54 ⏭️
ibexa/product-catalog-symbol-attribute – #17 #18 ⏭️
ibexa/scheduler #168 #169 🔄 #170 ⏭️
ibexa/segmentation #186 #187 🔄 #188 🩹
ibexa/share – #190 #191 ⏭️
ibexa/shipping #154 #155 🔄 #156 ⏭️
ibexa/shopping-list – #66 #67 ⏭️
ibexa/site-context – – #121
ibexa/site-factory #172 #173 🔄 🩹 #174 🩹 ⏭️
ibexa/taxonomy ⚠️ #431 🩹 #432 🩹 #433 🩹
ibexa/translations-management – #174 #175 ⏭️
ibexa/user #128 this PR 🔄 #130 ⏭️
ibexa/workflow #191 🩹 #192 🔄 🩹 #193 🩹 ⏭️

🔄 = this branch adds an upgrade migration (renames/FK-retargets existing schema), not just a fresh baseline.
🩹 = this branch also received a backported delta migration, converted from a legacy ibexa/installer upgrade/db/*.sql script (4.6.0 or later) that the original baseline-only migration didn't cover. See IBX-11939 upgrade-scripts backport report or that package's own PR description for details.
⚠️ = fixes a different, related problem (missing SchemaBuilderEvent support for a plain Doctrine ORM entity/table) — not a Doctrine Migrations baseline/upgrade migration like the rest of this table. See that package's own PR description for details.
⏭️ = struck through and closed as unnecessary — that tier needs no changes of its own. Everything it requires arrives through the normal merge-up from the tier below; the branch is kept, so the PR can be reopened if genuinely tier-specific work turns up.

Description:

Adds InstallSchemaMigration (4.6.0 baseline, same as the 4.6 PR for this package) and RenameSchemaTo5_0Migration (tagged 5.0.0), renaming ibexa_user_invitations/ibexa_user_invitations_assignments to singular form. SQL sourced from ibexa/installer's shipped upgrade script (upgrade/db/{mysql,postgresql}/ibexa-4.6.latest-to-5.0.0.sql); SQLite equivalent derived by hand (DROP INDEX+CREATE INDEX in place of RENAME INDEX, which SQLite doesn't support; FK constraint-name-only renames skipped as cosmetic since SQLite auto-updates FK/column references across the schema on RENAME TABLE/RENAME COLUMN).

Verification caught a gap in the installer's own script: it was missing the rename of the assignment table's Doctrine-hashed FK-backing index — the hash changes when its table is renamed (IDX_DA5A7872A35D7AF0 → IDX_9E1E6F70A35D7AF0), even though the current schema.yaml requires it — fixed here.

The existing schema.yaml + BuildSchema(Event)Subscriber are untouched.

For QA:

Ran both migrations end-to-end against a real SQLite connection; the resulting tables/indexes match a fresh ibexa:doctrine:schema:dump-sql --force-platform=sqlite of the current schema.yaml exactly.

Documentation:

N/A — internal installer implementation detail.

@Steveb-p
Steveb-p force-pushed the feature/schema-migration-5.0 branch from 6fd8696 to e387bc1 Compare July 24, 2026 10:50
@Steveb-p
Steveb-p changed the base branch from 5.0 to base/ibx-11939-4.6-merged-5.0 July 24, 2026 10:50
@Steveb-p
Steveb-p marked this pull request as ready for review July 24, 2026 12:18
@sonarqubecloud

sonarqubecloud Bot commented Aug 8, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
29.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@Steveb-p
Steveb-p force-pushed the feature/schema-migration-5.0 branch from 901cf5e to d136e38 Compare September 18, 2026 18:43
@Steveb-p
Steveb-p force-pushed the feature/schema-migration-5.0 branch 2 times, most recently from 2bfac41 to f9b9e70 Compare September 25, 2026 16:09
@Steveb-p
Steveb-p force-pushed the feature/schema-migration-5.0 branch 2 times, most recently from 433b35f to fcccf48 Compare October 1, 2026 14:44
* IBX-11939: Added Doctrine Migrations for the user-invitation schema
* IBX-11939: Replaced SqlPlatform with doctrine-schema's DatabasePlatformName (#154)
* IBX-11939: Wrapped long lines in the Doctrine Migrations SQL files
doctrine-migrations 5.0 takes SqlPlatform now, so the migrations that only exist on this
branch list SqlPlatform::MARIADB and run their MySQL SQL there too, like the ones from 4.6.
@Steveb-p
Steveb-p force-pushed the feature/schema-migration-5.0 branch from 7ddcfc5 to c0e5c99 Compare October 5, 2026 12:33
@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
27.6% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants