You are here

function inactive_user_install in Inactive User 5

Same name and namespace in other branches
  1. 6 inactive_user.install \inactive_user_install()

Implementation of hook_install().

File

./inactive_user.install, line 6

Code

function inactive_user_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {inactive_users} (\n        uid int(10) unsigned NOT NULL default '0',\n        notified_admin tinyint(1) unsigned NOT NULL default '0',\n        notified_user tinyint(1) unsigned NOT NULL default '0',\n        warned_user_block_timestamp int(11) unsigned NOT NULL default '0',\n        notified_user_block tinyint(1) unsigned NOT NULL default '0',\n        notified_admin_block tinyint(1) unsigned NOT NULL default '0',\n        warned_user_delete_timestamp int(11) unsigned NOT NULL default '0',\n        protected tinyint(1) unsigned NOT NULL default '0',\n        PRIMARY KEY (uid)\n        ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {inactive_users} (\n        uid integer NOT NULL default '0',\n        notified_admin smallint NOT NULL default '0',\n        notified_user smallint NOT NULL default '0',\n        warned_user_block_timestamp int_unsigned NOT NULL default '0',\n        notified_user_block smallint NOT NULL default '0',\n        notified_admin_block smallint NOT NULL default '0',\n        warned_user_delete_timestamp int_unsigned NOT NULL default '0',\n        protected smallint NOT NULL default '0',\n        PRIMARY KEY (uid)\n        );");
      break;
  }
}