activerecord-hana-adapter
activerecord-hana-adapter copied to clipboard
Could you please support indexes in db:schema:dump?
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?
- Test environments usually use the schema.rb to create a test-database.
- It speeds up the initial set up of a production system as it doesn't need to execute all migrations at once.
- 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