function xmlsitemap_user_install in XML sitemap 5
Same name and namespace in other branches
- 5.2 xmlsitemap_user/xmlsitemap_user.install \xmlsitemap_user_install()
- 6 xmlsitemap_user/xmlsitemap_user.install \xmlsitemap_user_install()
Implementation of hook_install().
File
- xmlsitemap_user/
xmlsitemap_user.install, line 22
Code
function xmlsitemap_user_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {xmlsitemap_user} (\n uid int,\n pid int,\n last_changed int(11),\n previously_changed int(11),\n priority_override float,\n PRIMARY KEY (uid)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
db_query("CREATE TABLE {xmlsitemap_user_role} (\n rid int,\n priority float NOT NULL DEFAULT 0,\n PRIMARY KEY (rid)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
db_query("CREATE TABLE {xmlsitemap_user} (\n uid integer,\n pid integer,\n last_changed integer,\n previously_changed integer,\n priority_override real,\n PRIMARY KEY (uid)\n );");
db_query("CREATE TABLE {xmlsitemap_user_role} (\n rid integer,\n priority real NOT NULL DEFAULT 0,\n PRIMARY KEY (rid)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
}
}