I have a legacy Derby database that I am trying to access from Rails.
Here
is my database.yml as currently configured:
development:
adapter: jdbcderby
database: db/perm
schema: app (also tried APP)
My tables are in the “APP” schema in the database.
Originally tried it with no “schema” setting and it used the SA schema
apparently by default.
I am able to connect this way and when I run the Rails console and do
ActiveRecord::Base.connection.tables I get the list of tables (there is
no
indicuation of schema). All tables are listed in lower case.
But I cannot figure out how to make a model that can access these
tables.
When I do a basic model I get an exception “Schema ‘SA’ does not exist”
whenever I do a query via ActiveRecord. I tried various ways of setting
the table name in the model (using set_table_name) but nothing worked.
Can anyone tell me what I am missing?
I posted this on SE with some more information (although I think all you
would need is probably in this email):
Thanks,
Mark