-
Notifications
You must be signed in to change notification settings - Fork 329
Description
Steps to reproduce
Please refer https://github.com/rsim/oracle-enhanced/tree/master/guides/bug_report_templates
to create an executable test case
With Rails 5.1 that uses Postgres as it's primary database, and have v1.8 of the AR Oracle adapter (and ruby-oci) also in the Gemfile. Generate a new Rails app. Create 2 simple models (both Postgres tables):
rails g model something foo bar
rails g model floop bing:index bong
Expected behavior
Tell us what should happen
When you run rake db:migrate you should get the tables in Postgres, and a clean schema dump that represents the schema.
Actual behavior
Tell us what happens instead
You get the tables, and the floops table with the index cannot be dumped:
ActiveRecord::Schema.define(version: 20170509185441) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
# Could not dump table "floops" because of following NoMethodError
# undefined method `tablespace' for #<ActiveRecord::ConnectionAdapters::IndexDefinition:0x007f9f03a2b5f8>
Did you mean? table=
create_table "somethings", force: :cascade do |t|
t.string "foo"
t.string "bar"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
end
If I comment out the Oracle adapter and ruby-oci gem and rerun the migration I get a clean schema.rb.
System configuration
Rails version: 5.1
Oracle enhanced adapter version: 1.8
Ruby version: 2.3.0
Oracle Database version: InstantClient 12.1