aboutsummaryrefslogblamecommitdiffstats
path: root/luz.db
blob: e0040a4970cb881e3a6495acfec01ef8e9bfc530 (plain) (tree)






































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
SQLite format 3@  	.�@
���p�
KC�
U�
P*
�%
����8''�/tablecached_statuscached_statusCREATE TABLE cached_status (
    id integer primary key not null,
    show text,
    message text,
    foreign key(show) references show(state)
)MtableshowshowCREATE TABLE show (
    state text primary key not null
)';indexsqlite_autoindex_show_1show�w�AtablemessagesmessagesCREATE TABLE messages (
    id text primary key not null,
    body text,
    chat_id text not null,
    -- TODO: channel stuff 
    -- channel_id uuid,
    -- check ((chat_id == null) <> (channel_id == null)),
    -- check ((chat_id == null) or (channel_id == null)),
    -- user is the current "owner" of the message
    -- TODO: queued messages offline
    -- TODO: timestamp

    -- TODO: icky
    -- the user to show it coming from (not necessarily the original sender)
    from_jid text not null,
    originally_from text not null,
    -- check (from_jid != original_sender),

    -- TODO: from can be either a jid, a moved jid (for when a contact moves, save original sender jid/user but link to new user), or imported (from another service (save details), linked to new user)
    -- TODO: read bool not null,
    foreign key(chat_id) references chats(id) on delete cascade,
    foreign key(from_jid) references users(jid),
    foreign key(originally_from) references users(jid)
)/Cindexsqlite_autoindex_messages_1messages�,�7tablechatschatsCREATE TABLE chats (
    id text primary key not null,
    correspondent text not null unique,
    foreign key(correspondent) references users(jid)
))
=indexsqlite_autoindex_chats_2chats)=indexsqlite_autoindex_chats_1chats
�1	''�!tablegroups_rostergroups_roster
CREATE TABLE groups_roster(
    group_name text not null,
    contact_jid text not null,
    foreign key(group_name) references groups(group_name),
    foreign key(contact_jid) references roster(user_jid) on delete cascade,
    primary key(group_name, contact_jid)
)9
M'indexsqlite_autoindex_groups_roster_1groups_rosterX�tablegroupsgroupsCREATE TABLE groups(
    group_name text primary key not null
)+?indexsqlite_autoindex_groups_1groups	�u�EtablerosterrosterCREATE TABLE roster( 
    user_jid text primary key not null,
    name TEXT,
    subscription text not null,
    foreign key(subscription) references subscription(state),
    foreign key(user_jid) references users(jid)
)+?indexsqlite_autoindex_roster_1rostere%%�
tablesubscriptionsubscriptionCREATE TABLE subscription(
    state text primary key not null
)7K%indexsqlite_autoindex_subscription_1subscription�:�StableusersusersCREATE TABLE users(
    jid text primary key not null,
    -- can receive presence status from non-contacts
    cached_status_message text
    -- TODO: last_seen
))=indexsqlite_autoindex_users_1users


	}��������}	buddy)in-pending-out)out-pending-in	only-in
only-out9pending-in-pending-out!pending-in
#pending-outnone
	uu�������	buddy	)in-pending-out)out-pending-inonly-inonly-out9pending-in-pending-out!pending-in#pending-out	none











�����'extended-away)do-not-disturbchataway
�����'extended-away)do-not-disturbchat	away
��