You are here

function location_fax_update_5300 in Location 5.3

Same name and namespace in other branches
  1. 6.3 contrib/location_fax/location_fax.install \location_fax_update_5300()
  2. 7.5 contrib/location_fax/location_fax.install \location_fax_update_5300()
  3. 7.3 contrib/location_fax/location_fax.install \location_fax_update_5300()
  4. 7.4 contrib/location_fax/location_fax.install \location_fax_update_5300()

Location 3.0 update 1. Fix pgsql -- The table definition was broken.

File

contrib/location_fax/location_fax.install, line 51
Installation routines.

Code

function location_fax_update_5300() {
  $ret = array();
  if ($GLOBALS['db_type'] == 'pgsql') {

    // If the table wasn't created (i.e. error from previous install)
    if (!db_table_exists('location_fax')) {
      $ret[] = update_sql("\n        CREATE TABLE {location_fax} (\n          lid int NOT NULL default '0' CHECK (lid >= 0),\n          fax varchar(31) default NULL,\n          PRIMARY KEY (lid)\n        )");
    }
  }
  return $ret;
}