Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified mod_offline and mod_offline_odbc #149

Merged
merged 11 commits into from
Mar 6, 2014
1 change: 1 addition & 0 deletions apps/ejabberd/include/mod_offline.hrl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-record(offline_msg, {us, timestamp, expire, from, to, packet}).
11 changes: 11 additions & 0 deletions apps/ejabberd/priv/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,14 @@ CREATE TABLE mam_muc_message(
);
CREATE INDEX i_mam_muc_message_room_name_added_at USING BTREE ON mam_muc_message(room_id, id);


CREATE TABLE offline_message(
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
timestamp BIGINT UNSIGNED NOT NULL,
expire BIGINT UNSIGNED,
server varchar(250) NOT NULL,
username varchar(250) NOT NULL,
from_jid varchar(250) NOT NULL,
packet blob NOT NULL
);
CREATE INDEX i_offline_message USING BTREE ON offline_message(server, username, id);
14 changes: 14 additions & 0 deletions apps/ejabberd/priv/pg.sql
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,17 @@ CREATE INDEX i_mam_muc_message_room_name_added_at
ON mam_muc_message
USING BTREE
(room_id, id);

CREATE TABLE offline_message(
id SERIAL UNIQUE PRIMARY Key,
timestamp BIGINT NOT NULL,
expire BIGINT,
server varchar(250) NOT NULL,
username varchar(250) NOT NULL,
from_jid varchar(250) NOT NULL,
packet text NOT NULL
);
CREATE INDEX i_offline_message
ON offline_message
USING BTREE
(server, username, id);
Loading