Module Development

Altering the Database for Drupal 7

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Alternate resources

Sprout Video

In this chapter we learn about changing the definition of a database table after it has already been installed. This example expands on the previous chapters by adding a new field to the table to collect the date a user last visited a node. We learn more about hook_update_N() as well as db_add_field().