Drupal 8

Rerunning update hooks in D8

Note: there be dragons here... read all the way through before trying this.

When I'm writing an update_hook for a module I'm working on I often need to run it multiple times in order to get it working just right. In Drupal 7 I had a little trick where I would run my updates and then reset the schema version of my module  directly in the database and then run my updates again. I'd rinse and repeat until everything worked as desired.

Read on