activerecord-hana-adapter icon indicating copy to clipboard operation
activerecord-hana-adapter copied to clipboard

Could you please support indexes in db:schema:dump?

Open FHorschig opened this issue 8 years ago • 0 comments

When migrating via rake db:migrate or dumping the schema into schema.rb with rake db:schema:dump, the schema.rb is filled with error comments:

ActiveRecord::Schema.define(:version => 20160503131148) do

# Could not dump table "MY_FANCY_TABLE_NAME" because of following NoMethodError # undefined method 'indexes' for #<ActiveRecord::ConnectionAdapters::HanaAdapter:0x000000082a1e00>

# Could not dump table "MY_OTHER_TABLE_NAME" because of following NoMethodError # undefined method 'indexes' for #<ActiveRecord::ConnectionAdapters::HanaAdapter:0x000000082a1e00>

end

Why is this important?

  1. Test environments usually use the schema.rb to create a test-database.
  2. It speeds up the initial set up of a production system as it doesn't need to execute all migrations at once.
  3. It would be a shame to let this basic feature stay unsupported.

Starting point for the implementation could be the way they did it for jdbc-sqlite3: https://github.com/jruby/activerecord-jdbc-adapter/blob/master/lib/arjdbc/sqlite3/adapter.rb#L416

FHorschig avatar May 26 '16 17:05 FHorschig