* src/odbc/pg.sql: Added spool.seq field for offline messages
sorting * src/mod_offline_odbc.erl: Likewise SVN Revision: 424
This commit is contained in:
parent
c78927ecf7
commit
1a015a3cf9
|
@ -1,3 +1,9 @@
|
||||||
|
2005-10-20 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
|
* src/odbc/pg.sql: Added spool.seq field for offline messages
|
||||||
|
sorting
|
||||||
|
* src/mod_offline_odbc.erl: Likewise
|
||||||
|
|
||||||
2005-10-18 Alexey Shchepin <alexey@sevcom.net>
|
2005-10-18 Alexey Shchepin <alexey@sevcom.net>
|
||||||
|
|
||||||
* src/mod_roster_odbc.erl: Bugfix
|
* src/mod_roster_odbc.erl: Bugfix
|
||||||
|
|
|
@ -214,7 +214,8 @@ pop_offline_messages(Ls, User, Server) ->
|
||||||
case ejabberd_odbc:sql_query(
|
case ejabberd_odbc:sql_query(
|
||||||
LServer,
|
LServer,
|
||||||
["begin;"
|
["begin;"
|
||||||
"select * from spool where username='", EUser, "';"
|
"select username, xml from spool where username='", EUser, "'"
|
||||||
|
" order by seq;"
|
||||||
"delete from spool where username='", EUser, "';"
|
"delete from spool where username='", EUser, "';"
|
||||||
"commit"]) of
|
"commit"]) of
|
||||||
[{updated, undefined},
|
[{updated, undefined},
|
||||||
|
|
|
@ -36,10 +36,17 @@ CREATE TABLE rostergroups (
|
||||||
|
|
||||||
CREATE INDEX pk_rosterg_user_jid ON rostergroups USING btree (username, jid);
|
CREATE INDEX pk_rosterg_user_jid ON rostergroups USING btree (username, jid);
|
||||||
|
|
||||||
|
;; To update from previous table definition:
|
||||||
|
; CREATE SEQUENCE spool_seq_seq;
|
||||||
|
; ALTER TABLE spool ADD COLUMN seq integer;
|
||||||
|
; ALTER TABLE spool ALTER COLUMN seq SET DEFAULT nextval('spool_seq_seq');
|
||||||
|
; UPDATE spool SET seq = DEFAULT;
|
||||||
|
; ALTER TABLE spool ALTER COLUMN seq SET NOT NULL;
|
||||||
|
|
||||||
CREATE TABLE spool (
|
CREATE TABLE spool (
|
||||||
username text NOT NULL,
|
username text NOT NULL,
|
||||||
xml text
|
xml text,
|
||||||
|
seq SERIAL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE INDEX i_despool ON spool USING btree (username);
|
CREATE INDEX i_despool ON spool USING btree (username);
|
||||||
|
|
Loading…
Reference in New Issue