Skip to content

Add a command to remove a deploy hook from the list of deployed hooks in the site State #6228

Open
@MurzNN

Description

@MurzNN

Is your feature request related to a problem? Please describe.
We have the deploy:hook feature that very is cool and better than hook updates.

But for local development very often we want to "uninstall" the deployed hook to try to deploy it again with some fixes.

For the hook_update we can easily just revert the installed version number of the module to the previous one, like this:

drush ev "drupal_set_installed_schema_version('my_module', 10123)"

But we have no option to do the same for the deploy hook.

Describe the solution you'd like
Provide a new command to remove the hook from the list of installed hooks, something like:

drush deploy:hook-remove hook_name

In this command we have to read the deploy_hook.existing_updates value from the site State, and remove the required hook from the list.

Describe alternatives you've considered
Instead of a separate command to unmark the hook_deploy as deployed, maybe we can introduce a way to force redeploy the specific hook_deploy by it's name, even if it is already deployed.

Additional context
Also, would be great to have the ability to list all currently deployed hooks.

And maybe provide a direct command to revert the module schema version too, instead of doing this using drush ev?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions