softarn
softarn

Reputation: 5497

Use a table in another database in Sequel::Model

I am using Sequel with MySQL database and Padrino. To get stats from my database I'm using:

class Stats < Sequel::Model(:"#{OTHER_DB}__stats")
end

OTHER_DB is the name of the database where the stats table is located. Everything works fine and I'm successfully getting the stats when using this class, but when starting padrino I'm getting this error:

FATAL - [30/Apr/2012 11:33:29] "Mysql2::Error: Table 'api_test.stats' doesn't exist: DESCRIBE stats"

api_test is the name of the default database that is being used when I don't specify anything else.

Why am I getting this error? How can I prevent it?

Upvotes: 0

Views: 140

Answers (1)

Jeremy Evans
Jeremy Evans

Reputation: 12139

This is due to a bug in Sequel. It'll be fixed in the tomorrow's release of 3.35.0.

Upvotes: 3

Related Questions