'location_fax.module {location} supplementary table.', 'fields' => array( 'lid' => array( 'description' => '{location}.lid', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ), 'fax' => array( 'description' => 'Fax number', 'type' => 'varchar', 'length' => 31, 'not null' => TRUE, 'default' => '', ), ), 'primary key' => array('lid'), ); return $schema; } /** * Implements hook_install(). */ function location_fax_install() { // Change weight so we execute after location. db_update('system') ->fields( array( 'weight' => 1, ) ) ->condition('name', 'location_fax') ->condition('type', 'module') ->execute(); } /** * Location 3.0 update 1. * * Fix pgsql -- The table definition was broken. */ function location_fax_update_5300() { if (!db_table_exists('location_fax')) { $schema['location_fax'] = array( 'description' => 'location_fax.module {location} supplementary table.', 'fields' => array( 'lid' => array( 'description' => '{location}.lid', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ), 'fax' => array( 'description' => 'Fax number', 'type' => 'varchar', 'length' => 31, 'not null' => TRUE, 'default' => '', ), ), 'primary key' => array('lid'), ); db_create_table('location_fax', $schema['location_fax']); } } /** * Location 3.0 update 2. * * Change weight of module. */ function location_fax_update_5301() { // This update was moved to update 5302. } /** * Location 3.0 update 2. * * Change weight of module. */ function location_fax_update_5302() { // Change weight. db_update('system') ->fields( array( 'weight' => 1, ) ) ->condition('name', 'location_fax') ->condition('type', 'module') ->execute(); } /** * Drupal 6 updates. */ function location_fax_update_6301() { db_change_field( 'location_fax', 'fax', 'fax', array( 'description' => 'Fax number', 'type' => 'varchar', 'length' => 31, 'not null' => TRUE, 'default' => '', ) ); }