Helga: Other databases than MySQL

Hi,

in the past there where some users who wanted to use my Helga plugin, but didn’t have an MySQL database. Now I did massive changes to my database tables so it should be compatible to any database that openfire supports.

I need *.sql-Files which create the tables for each supported database software. But, I have no way to test it, and I only know MySQL.

Maybe someone can translate the following SQL and help with testing. Should be really straightforward

-- Helga DB version 2 / MySQL CREATE TABLE helgaEvent (
     event_id CHAR(15) NOT NULL,
     owner TEXT NOT NULL,
     creation CHAR(15) NOT NULL,
     execution CHAR(15) NOT NULL,
     type TINYINT NOT NULL DEFAULT 0,
     PRIMARY KEY(event_id)
); CREATE TABLE helgaMessage (
     event_id CHAR(15) NOT NULL,
     tojid TEXT NOT NULL,
     msg TEXT NOT NULL,
     PRIMARY KEY(event_id)
); CREATE TABLE helgaUser (
     id INT UNSIGNED AUTO_INCREMENT,
     jid TEXT NOT NULL,
     sub TINYINT NOT NULL DEFAULT 1,
     public TINYINT NOT NULL DEFAULT 0,
     source TEXT DEFAULT NULL,
     PRIMARY KEY(id),
     INDEX jid_idx(jid(10))
); CREATE TABLE helgaGroup (
     id INT UNSIGNED AUTO_INCREMENT,
     type TINYINT NOT NULL DEFAULT 0,
     jid TEXT NOT NULL,
     group_id CHAR(15) NOT NULL,
     PRIMARY KEY (id),
     INDEX idx(type,jid(10),group_id)
); -- insert database version
INSERT INTO jiveVersion (name, version) VALUES ('helga', 2);

Hey Martin,

I’m not sure about the autoincrement field but the rest should be pretty straight forward to port. You can use the existing SQL files to see how to create indexes in the other databases or how a CHAR looks like.

Thanks,

– Gato

Ok, I created files for all database types. But I have still no way to test it, or to say it with the words of Donald Knuth:

I have only proved it correct, not tried it.

I think will release a new version of Helga later this day (CET time), where this files are included. Hopefully there will be some guys who can test it.

(attachment maximum is 5)

So, there it is:

Would be nice if someone with non-MySQL database could test it

(I recommend not to do this on productive systems, because it could crash…)