Hey gang, I recently got some feedback for how to make Koha's database definitions more portable to other RDMSs. Thanks to Dan Scott for the following recommendations: 1. don't use SQL92 keywords as field names, table names, etc. 2. tables shouldn't be defined with TYPE=MyISAM 3. get rid of quotes around integer values 4. remove nonsensical date defaults like 0000-00-00 (why not use NULL) 5. add SET SQL_MODE='ANSI_QUOTES' to allow using double-quotes for SQL name delimiters To this list I'll also add that we should pick a more noticeable location for the SQL definitions file to avoid confusion in the future. I'd suggest we keep it in installer/kohastructure.sql These seem like some fairly trivial changes to make. Any takers? Other comments? Cheers, -- Joshua Ferraro SUPPORT FOR OPEN-SOURCE SOFTWARE President, Technology migration, training, maintenance, support LibLime Featuring Koha Open-Source ILS jmf@liblime.com |Full Demos at http://liblime.com/koha |1(888)KohaILS
"Joshua M. Ferraro" <jmf@liblime.com> wrote:
1. don't use SQL92 keywords as field names, table names, etc.
Can this be replaced with: 1. SQL-quote all field names, table names, etc as I suggested in 2004ish?
2. tables shouldn't be defined with TYPE=MyISAM 3. get rid of quotes around integer values
These two seem fine.
4. remove nonsensical date defaults like 0000-00-00 (why not use NULL)
Probably OK... or maybe should use epoch instead? That would avoid having to handle NULL dates.
5. add SET SQL_MODE='ANSI_QUOTES' to allow using double-quotes for SQL name delimiters
MySQL only? ;-)
To this list I'll also add that we should pick a more noticeable location for the SQL definitions file to avoid confusion in the future. I'd suggest we keep it in installer/kohastructure.sql
These seem like some fairly trivial changes to make. Any takers? Other comments?
Needs a working koha-HEAD which I don't have (as mentioned elsewhere) so I can't take right now. Kick me later if needed. Regards, -- MJ Ray - see/vidu http://mjr.towers.org.uk/email.html Experienced webmaster-developers for hire http://www.ttllp.co.uk/ Also: statistician, sysadmin, online shop builder, workers co-op. Writing on koha, debian, sat TV, Kewstoke http://mjr.towers.org.uk/
participants (2)
-
Joshua M. Ferraro -
MJ Ray