Schema description

Tigase Message Archiving component uses few tables and stored procedures. To make it easier to find them on database level they are prefixed with tig_ma_.

Table tig_ma_jids

This table stores all jids related to stored messages, ie. from to and from attributes of archived stanzas.

FieldDescriptionComments

jid_id

Database ID of a JID

 

jid

Value of a bare JID

 

jid_sha1

SHA1 value of lowercased bare JID

Used for proper bare JID comparison during lookup.

(N/A to PostgreSQL schema)

domain

Domain part of a bare JID

Stored for easier lookup of messages owned by users of a particular domain

Table tig_ma_msgs

Table stores archived messages.

FieldDescriptionComments

stable_id

Database ID of a message

Unique with matching owner_id

owner_id

ID of a bare JID of a message owner

References jid_id from tig_ma_jids

buddy_id

ID of a bare JID of a message recipient/sender (different than owner)

References jid_id from tig_ma_jids

ts

Timestamp of a message

Timestamp of archivization or delayed delivery

body

Body of a message

 

msg

Serialized message

 

stanza_id

ID attribute of archived message

 

is_ref

Marks if message is a reference to other message

 

ref_stable_id

stable_id of referenced message

 

Table tig_ma_tags

Table stores tags of archived messages. It stores one tag for many messages using tig_ma_msgs_tags to store relation between tag and a message.

FieldDescriptionComments

tag_id

Database ID of a tag

 

owner_id

ID of a bare JID of a tag owner

ID of bare JID of owner for which messages with this tag were archived

tag

Actual tag value

 

Table tig_ma_msgs_tags

Table stores relations between tags and archived messages with this tags.

FieldDescriptionComments

msg_owner_id

ID of a bare JID of a tag owner

ID of bare JID of owner for which messages with this tag were archived

msg_stable_id

Database ID of a message

Unique with matching msg_owner_id

tag_id

Database ID of a tag

References tag_id from tig_ma_tags