You are here

function mobile_tools_install in Mobile Tools 5

Same name and namespace in other branches
  1. 6 mobile_tools.install \mobile_tools_install()
  2. 6.2 mobile_tools.install \mobile_tools_install()
  3. 7.3 mobile_tools.install \mobile_tools_install()
  4. 7.2 mobile_tools.install \mobile_tools_install()

Implementation of hook_install()

File

./mobile_tools.install, line 12
Install file for mobile_tools module

Code

function mobile_tools_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {mobile_tools_roles_relations} (\n        rid INT(9) NOT NULL,\n        mrid INT(9) NOT NULL\n      ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {mobile_tools_roles_relations} (\n        rid integer NOT NULL,\n        mrid integer NOT NULL\n      )");
      break;
  }
}