You are here

function nodehierarchy_install in Node Hierarchy 5

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

File

./nodehierarchy.install, line 4

Code

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