2

I have an existing D7 website for which i write hook_updates whenever i have to make any changes to the schema. Now, i have altered the taxonomy_term_data table using one such update. My question is if I install this website in another Schema(Database) will it automatically make those changes to taxonomy_term_data? Or, do i need to make those changes again explicitly?

4

When you install a module, the largest number found in hook_update_N hook will be stored in the system table's schema_version field. It will not run the function. Just stored in the table.

When you copy a module to a new site, any of the hook_update_N hooks will not be executed for you. However, if you would like to make any change, you can implement hook_install to make the necessary database or any other changes.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.