[Nitro] Fixes to database libs in 0.24 r19

Dimitri Aivaliotis aglarond at gmail.com
Thu Oct 20 09:08:02 EDT 2005

On 10/20/05, Rob Pitt <rob at motionpath.com> wrote:
> 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?

I was always getting tripped up here, too. Then I realized that there's a
parameter that can be set to avoid this:

Og.create_schema = false

- Dimitri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20051020/17135673/attachment.html 

More information about the Nitro-general mailing list