In my custom module's install file I have a hook_update_N function. Let's say it's mymodule_update_7100. However, I've noticed that I've done it wrong and I want to change a line of code within this function. Seeing as I've already run updb/update.php the changes won't be picked up and I'd have to rename it to either mymodule_update_7101 or create a new function after it with that name. I'd really rather not have to do this, so I was wondering if there's a variable that tells Drupal exactly what "version number" a module is currently at and whether I can reset it to trick it into allowing me to run the update script again.
The actual effect the function has had on the database isn't important because it's just generating a taxonomy term that I can easily delete through the front-end afterwards.
Following on from the comment by @wranvaud for Ddrupal 8, the actual statement/command is db_update('key_value')->fields(array('value' => serialize(nnn)))->condition('collection', 'system.schema', '=')->condition('name', 'your_module', '=')->execute();
where nnnn is the schema version you want to revert to. The important bit is serialize because the value is a blob/binary field. This can be executed in a Devel module php form