mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-16 17:15:55 +01:00
Update rosteritem table definition for mysql (gen_storage)
Previous definition do not work with gen_storage. gen_storage creates the table when they don't exists, but if they exists it simple uses that definition. Note that the column values also had changed in gen_storage, so instead of "B" for a bidirectional subscription, it must be "both". Keep this in mind when loading data into the DB
This commit is contained in:
parent
9050aa1de0
commit
77d5eabd00
@ -47,25 +47,22 @@ CREATE TABLE last (
|
||||
) CHARACTER SET utf8;
|
||||
|
||||
|
||||
CREATE TABLE rosterusers (
|
||||
CREATE TABLE rosteritem (
|
||||
host varchar(250) NOT NULL,
|
||||
username varchar(250) NOT NULL,
|
||||
user varchar(250) NOT NULL,
|
||||
jid varchar(250) NOT NULL,
|
||||
nick text NOT NULL,
|
||||
subscription character(1) NOT NULL,
|
||||
ask character(1) NOT NULL,
|
||||
name text,
|
||||
subscription text NOT NULL,
|
||||
ask text NOT NULL,
|
||||
askmessage text NOT NULL,
|
||||
server character(1) NOT NULL,
|
||||
subscribe text NOT NULL,
|
||||
type text,
|
||||
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (host(75), username(75), jid(75))
|
||||
) CHARACTER SET utf8;
|
||||
|
||||
CREATE INDEX i_rosteru_username ON rosterusers(username);
|
||||
CREATE INDEX i_rosteru_jid ON rosterusers(jid);
|
||||
CREATE INDEX i_rosteru_username ON rosteritem(username);
|
||||
CREATE INDEX i_rosteru_jid ON rosteritem(jid);
|
||||
|
||||
CREATE TABLE rostergroups (
|
||||
CREATE TABLE rostergroup (
|
||||
host varchar(250) NOT NULL,
|
||||
username varchar(250) NOT NULL,
|
||||
jid varchar(250) NOT NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user