From 77d5eabd0042cf6d8830bc85c1cbd86d6aaf3e6a Mon Sep 17 00:00:00 2001 From: Pablo Polvorin Date: Fri, 27 Aug 2010 14:11:39 -0300 Subject: [PATCH] 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 --- src/odbc/mysql.sql | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/odbc/mysql.sql b/src/odbc/mysql.sql index 29a71ce24..2d64ea8d6 100644 --- a/src/odbc/mysql.sql +++ b/src/odbc/mysql.sql @@ -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,