function messaging_update_2 in Messaging 5
Same name and namespace in other branches
- 6.4 messaging.install \messaging_update_2()
- 6 messaging.install \messaging_update_2()
- 6.2 messaging.install \messaging_update_2()
- 6.3 messaging.install \messaging_update_2()
Create queue storage
File
- ./
messaging.install, line 141
Code
function messaging_update_2() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("CREATE TABLE {messaging_store} (\n mqid int unsigned NOT NULL auto_increment,\n uid int unsigned NOT NULL,\n sender int unsigned NOT NULL default '0',\n method varchar(255) default NULL,\n destination varchar(255) default NULL,\n subject varchar(255) default NULL,\n body longtext NOT NULL,\n params longtext NOT NULL,\n created int NOT NULL default '0',\n sent int NOT NULL default '0',\n cron tinyint NOT NULL default '0',\n queue tinyint NOT NULL default '0',\n log tinyint NOT NULL default '0',\n PRIMARY KEY (mqid)\n ) /*!40100 DEFAULT CHARACTER SET utf8 */");
break;
case 'pgsql':
$ret[] = update_sql("CREATE TABLE {messaging_store} (\n mqid serial,\n uid int_unsigned NOT NULL,\n sender int_unsigned NOT NULL default '0',\n method varchar(255) default NULL,\n destination varchar(255) default NULL,\n subject varchar(255) default NULL,\n body text NOT NULL,\n params text NOT NULL,\n created int NOT NULL default '0',\n sent int NOT NULL default '0',\n cron smallint NOT NULL default '0',\n queue smallint NOT NULL default '0',\n log smallint NOT NULL default '0',\n PRIMARY KEY (mqid)\n )");
break;
}
return $ret;
}