fatkodima / online_migrations

Catch unsafe PostgreSQL migrations in development and run them easier in production (code helpers for table/column renaming, changing column type, adding columns with default, background migrations, etc).
https://rubydoc.info/github/fatkodima/online_migrations/
MIT License
628 stars 19 forks source link

`finalize_column_type_change` fails with JSONB indexes #38

Closed cmer closed 1 year ago

cmer commented 1 year ago
undefined method `map' for "(((data -> 'session'::text) ->> 'note'::text))":String
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/online_migrations-0.8.2/lib/online_migrations/change_column_type_helpers.rb:401:in `block in __copy_indexes'
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/online_migrations-0.8.2/lib/online_migrations/change_column_type_helpers.rb:400:in `each'
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/online_migrations-0.8.2/lib/online_migrations/change_column_type_helpers.rb:400:in `__copy_indexes'
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/online_migrations-0.8.2/lib/online_migrations/change_column_type_helpers.rb:256:in `block in finalize_columns_type_change'
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/online_migrations-0.8.2/lib/online_migrations/change_column_type_helpers.rb:239:in `each'
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/online_migrations-0.8.2/lib/online_migrations/change_column_type_helpers.rb:239:in `finalize_columns_type_change'
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/online_migrations-0.8.2/lib/online_migrations/change_column_type_helpers.rb:226:in `finalize_column_type_change'
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/migration.rb:932:in `block in method_missing'
/home/circleci/project/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.4.3/lib/active_record/migration.rb:900:in `block in say_with_time'