Manual:Hooks/LoadExtensionSchemaUpdates

Summary

 * 1) Create your hook as indicated below.  Each examples shows how to setup the hook function. However, if you have more than one schema update, you can put them in the same function (and it will use multiple SQL files).
 * 2) Make sure the hook has access to any necessary SQL files, which are usually located in an   directory.
 * 3) Format the SQL files correctly.  See the, and the corresponding , for some examples.
 * 4) From the command line run the   script to update your wiki’s database with your extension’s   hook. See the update.php manual for more information.

>= 1.25
was introduced in 1.25, and so the Hooks section of  should be used instead of. For example:

And in :

The code of the hook callback is the same as for earlier versions (see below).