function spaces_announce_install in Spaces 5.2
Same name and namespace in other branches
- 5 spaces_announce/spaces_announce.install \spaces_announce_install()
Implementaton of hook_install().
File
- spaces_announce/
spaces_announce.install, line 6
Code
function spaces_announce_install() {
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
db_query("UPDATE {system} SET weight = 25 WHERE name = 'spaces_announce'");
db_query("CREATE TABLE {spaces_announce} (\n nid int(10) NOT NULL default '0',\n gid int(10) NOT NULL default '0',\n KEY (nid),\n KEY (gid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
db_query("CREATE TABLE {spaces_announce_log} (\n nid int(10) NOT NULL default '0',\n count int NOT NULL default '0',\n viewed int unsigned NOT NULL default '0',\n KEY (nid)\n ) /*!40100 DEFAULT CHARACTER SET UTF8 */");
}
}