mirror of
https://github.com/processone/ejabberd
synced 2025-10-05 02:29:34 +02:00
Reorganize SQL schema files
This commit is contained in:
parent
8a441b9cac
commit
e47475fff6
64 changed files with 2931 additions and 0 deletions
19
sql/sqlite/mod_shared_roster.sql
Normal file
19
sql/sqlite/mod_shared_roster.sql
Normal file
|
@ -0,0 +1,19 @@
|
|||
CREATE TABLE sr_group (
|
||||
name text NOT NULL,
|
||||
server_host text NOT NULL,
|
||||
opts text NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX i_server_host_name ON sr_group (server_host, name);
|
||||
|
||||
CREATE TABLE sr_user (
|
||||
jid text NOT NULL,
|
||||
server_host text NOT NULL,
|
||||
grp text NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX i_server_host_jid_grp ON sr_user (server_host, jid, grp);
|
||||
CREATE INDEX i_sr_user_sh_jid ON sr_user (server_host, jid);
|
||||
CREATE INDEX i_sr_user_sh_grp ON sr_user (server_host, grp);
|
Loading…
Add table
Add a link
Reference in a new issue