You are here

function sheetnode_install in Sheetnode 5

Same name and namespace in other branches
  1. 6 sheetnode.install \sheetnode_install()

File

./sheetnode.install, line 3

Code

function sheetnode_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {sheetnode} (\n      vid int(10) unsigned NOT NULL,\n      nid int(10) unsigned NOT NULL,\n      value longtext NOT NULL,\n      PRIMARY KEY (vid),\n      KEY nid (nid)\n    ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      db_query("CREATE TABLE {sheetnode_template} (\n      tid int(10) unsigned NOT NULL AUTO_INCREMENT,\n      name varchar(32) NOT NULL DEFAULT '',\n      value longtext NOT NULL,\n      vid int(10) unsigned DEFAULT NULL,\n      PRIMARY KEY (tid),\n      UNIQUE KEY key_name (name)\n    ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
      break;
  }
}