Skip to content

Add new 9.2.0 hooks to the SQL upgrade script - #1895

Closed
mattgoud wants to merge 1 commit into
PrestaShop:devfrom
mattgoud:add/9.2.0-hooks-listing
Closed

Add new 9.2.0 hooks to the SQL upgrade script#1895
mattgoud wants to merge 1 commit into
PrestaShop:devfrom
mattgoud:add/9.2.0-hooks-listing

Conversation

@mattgoud

@mattgoud mattgoud commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Description

Adds the new 9.2.0 hooks to upgrade/sql/9.2.0.sql, as part of the 9.2.0-rc.1 release process.

Generated with:

php bin/console prestashop:update:sql-upgrade-file-hooks-listing 9.1.5 <autoupgrade>

9.1.5 is the comparison base: it is the last 9.1.x release, and there is no 9.2.0-beta.1.sql, so 9.2.0.sql has to cover the whole 9.1.5 → 9.2.0 delta.

The command reported 45 new hooks and no obsolete ones, so no DELETE statement is needed.

One manual adjustment

The command appends its block without looking at what the file already contains, so actionCheckoutBuildProcess ended up listed twice: once in the generated block, once in the insert added earlier by #41047.

Both inserts have been merged into the single generated block, which now holds all 45 hooks, and a comment records where that one row comes from. The file is left with a single INSERT INTO PREFIX_hook statement.

How to test

  • Executing the block against a 9.2.0 database raises no SQL error.
  • All 45 hooks already exist with identical title and description in a freshly installed 9.2.0 database, so the block is a no-op there and stays consistent with the install-dev fixtures. On an upgraded shop it inserts the missing rows, and ON DUPLICATE KEY UPDATE refreshes titles and descriptions.
  • SELECT name, COUNT(*) FROM ps_hook GROUP BY name HAVING COUNT(*) > 1 returns nothing — ps_hook.name is a UNIQUE KEY and no hook is listed twice in the file.

Generated with:

    php bin/console prestashop:update:sql-upgrade-file-hooks-listing 9.1.5 <autoupgrade>

9.1.5 is the base: it is the last 9.1.x release, and there is no
9.2.0-beta.1.sql, so 9.2.0.sql must cover the whole 9.1.5 -> 9.2.0 delta.

45 new hooks were reported, and no obsolete ones, so no DELETE statement is
needed.

The command appends its block without looking at what the file already
contains, so actionCheckoutBuildProcess ended up listed twice: once in the
generated block, once in the insert added earlier by PR #41047. Both inserts
have been merged into the single generated block, which now holds all 45
hooks, and a comment records where that one row comes from.

Verified: all 45 hooks already exist with identical title and description in
a freshly installed 9.2.0 database, so the block is a no-op there and stays
consistent with the install-dev fixtures.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mattgoud
mattgoud force-pushed the add/9.2.0-hooks-listing branch from fd826b3 to e4fd37d Compare August 27, 2026 13:48
@sonarqubecloud

Copy link
Copy Markdown

@mattgoud

Copy link
Copy Markdown
Contributor Author

Closing: this was already done. 7.6.x has carried the exact same 45-hook block since fea50bf ("Update hooks for 9.2.0 upgrade", 2026-07-20), including the same decision to keep actionCheckoutBuildProcess in a single INSERT — the two hook name sets are identical, so this PR adds nothing.

It also targeted the wrong branch: 9.2.0.sql is maintained on 7.6.x, not dev, which is still missing that block along with #41594, #41777 and #41977.

One genuine gap came out of the exercise and is being opened separately against 7.6.x: actionNotFound is never inserted by any upgrade script.

@mattgoud mattgoud closed this Aug 27, 2026
@github-project-automation github-project-automation Bot moved this from Ready for review to Closed in PR Dashboard Aug 27, 2026
@ps-jarvis ps-jarvis moved this from Closed to Ready for review in PR Dashboard Aug 27, 2026
@mattgoud
mattgoud deleted the add/9.2.0-hooks-listing branch August 27, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

2 participants