You are here

function location_phone_install in Location 5

Same name and namespace in other branches
  1. 5.3 contrib/location_phone/location_phone.install \location_phone_install()
  2. 6.3 contrib/location_phone/location_phone.install \location_phone_install()
  3. 7.5 contrib/location_phone/location_phone.install \location_phone_install()
  4. 7.3 contrib/location_phone/location_phone.install \location_phone_install()
  5. 7.4 contrib/location_phone/location_phone.install \location_phone_install()

File

contrib/location_phone/location_phone.install, line 3

Code

function location_phone_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("\n      CREATE TABLE {location_phone} (\n        lid int(10) unsigned NOT NULL default '0',\n        phone varchar(31) default NULL,\n        PRIMARY KEY  (lid)\n      ) /*!40100 DEFAULT CHARACTER SET utf8 */;\n      ");
      break;
    case 'pgsql':
      db_query("\n        CREATE TABLE {location_phone} (\n        lid int NOT NULL default '0' CHECK (eid >= 0),\n        phone varchar(31) default NULL,\n        postal_code varchar(16) default NULL,\n        PRIMARY KEY  (lid)\n      ) /*!40100 DEFAULT CHARACTER SET utf8 */;\n      ");
      break;
  }
  drupal_set_message(t('Installed tables for module location_phone'));
}