Generate a database update hook from a Solution

Created on 8 September 2025, 6 days ago

Problem/Motivation

Once you've come up with a Solution, being able to bundle it as an database update hook would be a helpful way to ensure that Solution is run without manual intervention (e.g.: on a production environment).

We already perform fixes in a batch process. Batch jobs and database update hooks have a similar API, so hopefully it shouldn't be too big of a leap.

Drush has a set of "generator" commands — if we can register our own generator, that would be a good place to start.

Proposed resolution

Add a Drush generator to create an update hook from a Scanner-Fixer Solution.

Remaining tasks

  1. Write a patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commit
  5. Release

User interface changes

To be determined.

API changes

To be determined.

Data model changes

To be determined.

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇨🇦Canada mparker17 UTC-4

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024