开发者

Why am I not getting any index defintions in my Rails schema.db - "# unrecognized index ..."

开发者 https://www.devze.com 2023-02-12 02:39 出处:网络
Rails 2.3.5, Postgres backend, with some read-only access to an external Oracle database. My schema.db file is not getting any index definitions. Instead, I am getting lines in schema.db tha开发者_如

Rails 2.3.5, Postgres backend, with some read-only access to an external Oracle database.

My schema.db file is not getting any index definitions. Instead, I am getting lines in schema.db tha开发者_如何学Pythont say:

# unrecognized index "auditable_index" with type ActiveRecord::ConnectionAdapters::IndexDefinition 


Rails 2.3.5 does not fully support Oracle out of the box. Using the sql schema format instead of schema.rb should work around the issue.

config.active_record.schema_format = :sql

I think the oracle-enhanced gem supports the proper generation of Oracle indexes but I've never used it. Might be worth a shot if you don't want to change your schema format.

https://github.com/rsim/oracle-enhanced

0

精彩评论

暂无评论...
验证码 换一张
取 消