View source
<?php
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;
}
}
function sheetnode_uninstall() {
db_query("DROP TABLE {sheetnode}");
db_query("DROP TABLE {sheetnode_template}");
db_query("DELETE FROM {variable} WHERE name LIKE 'sheetnode_%'");
}
function sheetnode_update_6006() {
return array();
}