You are here

function shoutbox_install in Shoutbox 5

Same name and namespace in other branches
  1. 6.2 shoutbox.install \shoutbox_install()
  2. 6 shoutbox.install \shoutbox_install()

File

./shoutbox.install, line 3

Code

function shoutbox_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("CREATE TABLE {shoutbox} ( shout_id int(10) unsigned NOT NULL auto_increment, uid int(10) NOT NULL default '0', nick varchar(32) NOT NULL default '', shout varchar(255) NOT NULL default '', url varchar(100) NOT NULL default '', moderate int(2) NOT NULL default '0', created int(11) NOT NULL default '0', changed int(11) NOT NULL default '0', hostname varchar(255) NOT NULL default '', sid varchar(64) NOT NULL default '', PRIMARY KEY  (shout_id)) /*!40100 DEFAULT CHARACTER SET utf8 */ ");
      break;
    case 'pgsql':
      db_query("CREATE TABLE {shoutbox} ( shout_id serial NOT NULL, uid int NOT NULL default '0', nick varchar(32) NOT NULL default '', shout varchar(255) NOT NULL default '', url varchar(100) NOT NULL default '', moderate int NOT NULL default '0', created int NOT NULL default '0', changed int NOT NULL default '0', hostname varchar(255) NOT NULL default '', sid varchar(64) NOT NULL default '', PRIMARY KEY (shout_id))");
      break;
  }
}