diff options
author | friendica <info@friendica.com> | 2015-03-04 17:56:07 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-03-04 17:56:07 -0800 |
commit | 011ccd57f62335c915b5ac75e20c45a36a64a888 (patch) | |
tree | c79340ecdbe9dfc41fcb9d11798620f6b59c4fdb /install | |
parent | 410f3335a9e97276b3262196f50798ff56624af5 (diff) | |
download | volse-hubzilla-011ccd57f62335c915b5ac75e20c45a36a64a888.tar.gz volse-hubzilla-011ccd57f62335c915b5ac75e20c45a36a64a888.tar.bz2 volse-hubzilla-011ccd57f62335c915b5ac75e20c45a36a64a888.zip |
add queue priority
Diffstat (limited to 'install')
-rw-r--r-- | install/schema_mysql.sql | 4 | ||||
-rw-r--r-- | install/schema_postgres.sql | 2 | ||||
-rw-r--r-- | install/update.php | 11 |
3 files changed, 15 insertions, 2 deletions
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index da78d9c61..4e481f5c0 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -940,6 +940,7 @@ CREATE TABLE IF NOT EXISTS `outq` ( `outq_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `outq_notify` mediumtext NOT NULL, `outq_msg` mediumtext NOT NULL, + `outq_priority` smallint NOT NULL DEFAULT '0', PRIMARY KEY (`outq_hash`), KEY `outq_account` (`outq_account`), KEY `outq_channel` (`outq_channel`), @@ -947,7 +948,8 @@ CREATE TABLE IF NOT EXISTS `outq` ( KEY `outq_created` (`outq_created`), KEY `outq_updated` (`outq_updated`), KEY `outq_async` (`outq_async`), - KEY `outq_delivered` (`outq_delivered`) + KEY `outq_delivered` (`outq_delivered`), + KEY `outq_priority` (`outq_priority`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql index 44b8f16a4..20285a352 100644 --- a/install/schema_postgres.sql +++ b/install/schema_postgres.sql @@ -725,6 +725,7 @@ CREATE TABLE "outq" ( "outq_updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00', "outq_notify" text NOT NULL, "outq_msg" text NOT NULL, + "outq_priority" smallint NOT NULL DEFAULT '0', PRIMARY KEY ("outq_hash") ); create index "outq_account" on outq ("outq_account"); @@ -734,6 +735,7 @@ create index "outq_created" on outq ("outq_created"); create index "outq_updated" on outq ("outq_updated"); create index "outq_async" on outq ("outq_async"); create index "outq_delivered" on outq ("outq_delivered"); +create index "outq_priority" on outq ("outq_priority"); CREATE TABLE "pconfig" ( "id" serial NOT NULL, diff --git a/install/update.php b/install/update.php index 70ffb1ebf..75805513d 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1138 ); +define( 'UPDATE_VERSION' , 1139 ); /** * @@ -1580,3 +1580,12 @@ function update_r1137() { return UPDATE_SUCCESS; return UPDATE_FAILED; } + + +function update_r1138() { + $r1 = q("alter table outq add outq_priority smallint not null default '0' "); + $r2 = q("create index outq_priority on outq ( outq_priority ) "); + if($r1 && $r2) + return UPDATE_SUCCESS; + return UPDATE_FAILED; +} |