Schema description

Tigase Unified Archive component uses few tables and stored procedures and it shares same tables with Tigase Message Archiving component - in fact it uses same tables with addition of few fields. Due to that used tables are prefixed with tig_ma_, but used stored procedures are prefixed with Tig_UA_.

Table tig_ma_jids

This table stores all jids related to stored messages and events, 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.

(Not exists in 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 events.

FieldDescriptionComments

msg_id

Database ID of a event

 

owner_id

ID of a bare JID of a event owner

References jid_id from tig_ma_jids

buddy_id

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

References jid_id from tig_ma_jids

buddy_res

Resource part of a event recipient/sender JID

 

ts

Timestamp of a event

Timestamp of archivization or delayed delivery

direction

Direction of event

0 - sent by owner

1 - recevied by owner

type

Stanza type

Value of message type attribute

body

Body of a message

 

msg

Serialized event

 

stanza_hash

Hash of event parts

It is used to make sure that event is stored only once

item-type

Event type

May be one of: chat, call, login, logout. (Added in UA schema)

offline

Marks offline events

It is set to 1 when it stores offline event, not yet delivered to client

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_id

Datanase ID of a message

References msg_id from tig_ma_msgs

tag_id

Database ID of a tag

References tag_id from tig_ma_tags