spaces_announce.install in Spaces 5
File
spaces_announce/spaces_announce.install
View source
<?php
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 */");
}
}
function spaces_announce_uninstall() {
db_query('DROP TABLE {spaces_announce}');
db_query('DROP TABLE {spaces_announce_log}');
}