[Nitro] Fixes to database libs in 0.24 r19
Rob Pitt
rob at motionpath.com
Thu Oct 20 08:58:06 EDT 2005
Couple of fairly minor things:
Could you please add:
require 'time'
To line 2 of lib/og/store/sql.rb as this is needed here and has not
already been required in some circumstances (multiple databases, manual
management)
Also, line 221 of lib/og/store/mysql.rb under def create_table(klass):
There is no proper checking if tables already exist. This is not
normally a problem as the mysql library throws an exception and sets
$!.errno to 1050 (already exists). However, sometimes I do not give the
db user write access if I just want to read the db with OG resulting in
a different error code, 1142 (access deined). You could do something
slicker than my one line fix of:
return if @conn.list_tables.include?(klass::OGTABLE)
I think this might give a good idea of how this should be done instead?
- Rob
More information about the Nitro-general
mailing list