content_access.install in Content Access 5
File
content_access.install
View source
<?php
function content_access_install() {
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
db_query("CREATE TABLE {content_access} (\n nid int(10) unsigned NOT NULL default '0',\n settings mediumtext NOT NULL,\n PRIMARY KEY (nid)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
db_query("CREATE TABLE {content_access} (\n nid int_unsigned NOT NULL default '0',\n settings text NOT NULL,\n PRIMARY KEY (nid)\n )");
break;
}
}
function content_access_uninstall() {
variable_del('content_access_settings');
db_query('DROP TABLE {content_access}');
}