Hi, I have updated my local copy of roller from roller_2.0 and have noticed the changes to beging supporting db2 and derby, thanks! Now, I'm sending you a link to a separate patch [1] for making all of the index/fk names 18 characters or less to support DB2.
The patch is basically a modification to the createdb-raw.sql plus additional changes to 120-to-200-migration-raw.sql to drop all previous indexes and foreign key relationships. Most of the changes are of the type: -alter table folder add constraint folder_websiteid_fk +alter table folder add constraint fo_websiteid_fk For the migration, I've done this: +alter table userrole drop index userrole_userid_index; +create index ur_userid_idx on userrole( userid ); +alter table website drop foreign key website_userid_fk; +alter table website add constraint ws_userid_fk + foreign key ( userid ) references rolleruser ( id ) @ADDL_FK_PARAMS@ ; There was one change which not did not make it in the previous patch (but also included in this patch) where we had a unique constraint and an index on the same column. The index is not necessary because the unique constraint makes it a primary key. I've tested this on mysql and works great. However, the migration part does not work on Derby or DB2. Basically, "alter table xxx drop index" is not supported on either, but "drop index xxx" is. drop index is also supported on mysql, but it requires a "from tablename". I'm really not as concerned with migration, because by the time users need migration, they are already proven db admins and could look at the migration script and make it work for either Derby/DB2, but if anyone has any opinions/suggestions, they are welcome. Also, there were four unique constraints I did not include in the migration because I could not find the mysql command for dropping them (I do know how to do it for Derby/DB2). Any help will be greatly appreciated on this matter. [1] http://torrez.us/2005/08/23/roller/patches/db_long_names.patch Regards, Elias
