How can I check if database update is required before update module

Tomotsugu Kaneko

Is there any good way for it? Like check some specific code in module.

Dmytro Pastovenskyi

Yes, it's possible.

Let's have an example with webform module.

Inside of each module there is an install file. Open it and scroll to the down, find the last hook. In our example it's:

webform_update_7430

Here is a screen (bottom part) of install file.

enter image description here

How to check if it is going to run or already processed?

In order to do that, you need to check system table in your drupal database. Find the webform module in system table and check value in schema version column. That will be the number of last hook which was run for this module, if in your install file hooks have higher number it means they will be executed during update.

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I update value of array in database

From Dev

How can I update data in mySQL database?

From Dev

How can I validate data before insert/update with SQL Server?

From Dev

cakephp how can i tell before function from an update

From Dev

how can i update the menu before the menu button is pressed

From Dev

how can I trigger a function before publish/update a product in woocommerce?

From Dev

I want to update table but before update it should check null value

From Dev

How can I update the protractor npm module in node.js?

From Dev

How can I update an instance variable from within a called module

From Dev

How can I check INITIALIZE UPDATE and EXTERNAL AUTHENTICATE correctness?

From Dev

How can I check if my SQL update has gone through?

From Dev

Firebase - How can I update an object in the Firebase Realtime Database

From Dev

How can I update object from database without inserting new?

From Dev

How can I update date from firebase database 2 times?

From Dev

How can I update the values in my sqlite database?

From Dev

How can I regularly update a database of content on an Android app?

From Dev

how can I speed up my cron job / database update

From Dev

How can I check if all required fields are selected before hiding a div?

From Dev

How i can create an update button in my local (on computer) php program to update database online

From Dev

Can I create a loop to update SQL database?

From Dev

I can't UPDATE database mysqli PHP

From Dev

how can I know how many rows will update sql affected before I execute it

From Dev

How can I update a data

From Dev

how can I update hostname

From Dev

Should I check DynamoDB map update path before sending

From Dev

PHP/Mysqli check before update

From Dev

Java How do I check for update?

From Dev

How to update today date to database whenever i update the gridview

From Dev

How can i check if items in the listBox already exist when i update it?

Related Related

  1. 1

    How can I update value of array in database

  2. 2

    How can I update data in mySQL database?

  3. 3

    How can I validate data before insert/update with SQL Server?

  4. 4

    cakephp how can i tell before function from an update

  5. 5

    how can i update the menu before the menu button is pressed

  6. 6

    how can I trigger a function before publish/update a product in woocommerce?

  7. 7

    I want to update table but before update it should check null value

  8. 8

    How can I update the protractor npm module in node.js?

  9. 9

    How can I update an instance variable from within a called module

  10. 10

    How can I check INITIALIZE UPDATE and EXTERNAL AUTHENTICATE correctness?

  11. 11

    How can I check if my SQL update has gone through?

  12. 12

    Firebase - How can I update an object in the Firebase Realtime Database

  13. 13

    How can I update object from database without inserting new?

  14. 14

    How can I update date from firebase database 2 times?

  15. 15

    How can I update the values in my sqlite database?

  16. 16

    How can I regularly update a database of content on an Android app?

  17. 17

    how can I speed up my cron job / database update

  18. 18

    How can I check if all required fields are selected before hiding a div?

  19. 19

    How i can create an update button in my local (on computer) php program to update database online

  20. 20

    Can I create a loop to update SQL database?

  21. 21

    I can't UPDATE database mysqli PHP

  22. 22

    how can I know how many rows will update sql affected before I execute it

  23. 23

    How can I update a data

  24. 24

    how can I update hostname

  25. 25

    Should I check DynamoDB map update path before sending

  26. 26

    PHP/Mysqli check before update

  27. 27

    Java How do I check for update?

  28. 28

    How to update today date to database whenever i update the gridview

  29. 29

    How can i check if items in the listBox already exist when i update it?

HotTag

Archive