function activity_install in Activity 5
Same name and namespace in other branches
- 5.4 activity.install \activity_install()
- 5.2 activity.install \activity_install()
- 5.3 activity.install \activity_install()
- 6.2 activity.install \activity_install()
- 6 activity.install \activity_install()
- 7 activity.install \activity_install()
Implementation of hook_install().
File
- ./
activity.install, line 11 - Install file for activity module.
Code
function activity_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("\n CREATE TABLE `activity` (\n `aid` int(11) NOT NULL,\n `uid` int(11) NOT NULL,\n `module` varchar(50) NOT NULL default '',\n `type` varchar(25) NOT NULL default '',\n `action` varchar(25) NOT NULL default '',\n `tokens` mediumtext NOT NULL,\n `timestamp` int(11) NOT NULL\n ) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n ");
break;
case 'pgsql':
db_query("\n CREATE TABLE `activity` (\n `aid` int(11) NOT NULL,\n `uid` int(11) NOT NULL,\n `module` varchar(50) NOT NULL default '',\n `type` varchar(25) NOT NULL default '',\n `action` varchar(25) NOT NULL default '',\n `tokens` mediumtext NOT NULL,\n `timestamp` int(11) NOT NULL\n ) ENGINE=MyISAM DEFAULT CHARSET=latin1;\n ");
break;
}
}