Unified Database Scripts?

Hi,

I did start some time ago writing a script to convert openfire.sql to openfire_db2.sql, openfire_mysql.sql, openfire_oracle.sql etc. Currently it’s a shell script which parses one sql file to create db dependent sql files.

The openfire.sql file looks like this

CREATE TABLE jiveUser (
  username              _nodeI_     NOT NULL,
  password              _chr32_,
  encryptedPassword     _chr255_,
  name                  _chr100_,
  email                 _chr100_,
  creationDate          _jivedate_     NOT NULL,
  modificationDate      _jivedate_     NOT NULL,
  CONSTRAINT jiveUser_pk PRIMARY KEY (username)
);

and my m4 based parser replaces the _foo_ fields with the right values for the database (at least for HSQLDB and Oracle). That’s a little bit lame and one may want to write something like this in Java so every plugin (thinking of Reuters XEP-0136 plugin which supports only a few databases) and also Openfire could be delivered with only one sql script. I did talk with JS about this but they do a lot of other things so they’ll likely not write such a tool within the next months.

LG

PS: If one is interested in writing this I’d be glad to hear.

LG,

Jive actually has a tool that does this. It is utilized for Clearspace and I know there has been talk of open sourcing it though I am not sure where that stands currently. I will ask around and see whats up.

Any news on this one?

It would be great for plugin developers that don’t operate the full zoo of databases.