How to find hook_update_N, current N value

To find it via drush, run this command 

drush php:eval "echo drupal_get_installed_schema_version('modul_name');"

also if you want to look it up with some DB admin tool, look under table `key_value`,  `system.schema` collection row, with a `name` of your module and you will get value of last run update.

Also if needed you can change this value and set it to some lower or higher if needed for some reason, to do that use

drush php:eval "echo drupal_set_installed_schema_version('module_name', '8000');"

where 8000 is N and can be set to 8100, 8001, or whatever is proper in your case, to check numbering conventions, reade here https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extensio…

 

One not also, if you have current N set to 8005 and you add some hook_8005, it will not run, it needs to be one number higher then currently set or set the current one to number lower then yours.