You are here

function nodehierarchy_views_install in Node Hierarchy 5

Same name and namespace in other branches
  1. 6.3 nodehierarchy_views/nodehierarchy_views.install \nodehierarchy_views_install()
  2. 6 nodehierarchy_views/nodehierarchy_views.install \nodehierarchy_views_install()
  3. 6.2 nodehierarchy_views/nodehierarchy_views.install \nodehierarchy_views_install()
  4. 7.4 nodehierarchy_views/nodehierarchy_views.install \nodehierarchy_views_install()
  5. 7.2 nodehierarchy_views/nodehierarchy_views.install \nodehierarchy_views_install()

File

nodehierarchy_views/nodehierarchy_views.install, line 4

Code

function nodehierarchy_views_install() {
  if ($GLOBALS['db_type'] == 'mysqli' || $GLOBALS['db_type'] == 'mysql') {
    drupal_set_message("Creating required nodehierarchy_views.module MySQL tables for first install");
    db_query("CREATE TABLE {nodehierarchy_views} (\n      nid int(10) unsigned NOT NULL default '0',\n      nh_children_view varchar(32) NULL default NULL,\n      PRIMARY KEY (nid)\n    ) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
  }
}