ruby on rails - bundle exec rake db:migrate -- schema.rb regenerated WITHOUT indices -


i have large database tons of tables , many indices on tables. every time run migration, schema.rb file generated fine, except none of indices included. new tables , columns added fine. if manually re-add add_index lines schema.rb file after migration, works fine, doing after every migration major hassle.

i've been dealing problem months , haven't been able find solution or workaround. know might happening?

using postgres & rails 3.

in rails 3 indexes not displayed in schema.rb file.

given below screenshot of shema dump rails 3 documentation. no indexes shown.

this screenshot of schem file rails documentation

i have tried install rails 3 postgres, rails 3 mysql , rails 3 , sqlite. indexes added database cannot see them in schema.rb.

there 1 way show them in schema.rb adding indexes manually file or can leave scehma.rb without indexes. indexes added database when run rake db:migrate. , if want can upgrade rails 4 or above , never face problem.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -