![drupal update drupal update](https://1178133041.rsc.cdn77.org/wp-content/uploads/2020/11/Drupal-Issues-Out-of-band-Security-Updates-to-Fix-Critical-Flaws.jpg)
Instead of having to remember to login and click that link after deploying to production, this update script automatically finds that link (and any others that were going to the old path) and resets them, removing the duplicate item in our menu. We needed to change the path and what would happen is that Drupal does not remove the original link but notices that it has changed from what is in the database and adds a "reset" link from the Menu page. In this example we had a custom module that defined a path in hook_menu(). This is also a-bit of a special use-case. */ function mysite_misc_update_7002 ( & $sandbox ) Simple Update Script to Automatically "reset" a Menu Link It is very easy to interact with other sites and technologies using Drupal CMS. Drupal CMS is very flexible and powerful and can be used for building large, complex sites. * Removes aliases for content types that do not need them. Drupal Drupal is a free and open source Content Management System (CMS) that allows organizing, managing and publishing your content and is built on PHP based environments. Typically there is a "misc" module of some sort that I use to enable the module using module_enable() and then setup our configuration using variable_set(). When we deploy this feature we will have to enable that module and then do any setup and configuration for that. When working on a new feature, I'll download a new contrib module or maybe write a new custom module. This example is probably one of the simplest and most common types of update scripts that I'll write. Simple Update Script Using variable_set() and module_enable() Now to the good stuff, Examples! and plenty of them. I've also left out several update scripts for the sake of not being redundant. The examples I'm about to show you are from a real project, I've trimmed some of them for the sake of being brief and names have been changed to protect the innocent. Update scripts implement the hook_update_N() hook and should be placed in your modules.
![drupal update drupal update](https://www.drupal.org/files/images/screen_3.png)
Now that we know "why" lets talk about "how" and what better way to demonstrate how then look at real-world examples.
![drupal update drupal update](https://www.drupal.org/files/project-images/screen_view_0.jpg)
You can read the first post about Why You Should Spend the Extra Time to Write Drupal Update Scripts.
DRUPAL UPDATE SERIES
This is the second part in my two-part series about Drupal update scripts, specifically focusing on using update scripts for your custom modules as part of your deployment process.