Closed jadekstewart3 closed 10 months ago
@jadekstewart3 sorry you're running into an issue. We love the strong migrations gem and use it as well.
A couple ideas to solve it:
disable_ddl_transaction!
to disable the transaction.
class ChangeFlipperGatesValueToText < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
# …
end
remove_index
and add_index
lines entirely and should be fine.Let me know if neither of those solve it for you and we'll reopen this issue.
Description
I'm encountering an issue when running migrations with Flipper and Strong Migrations gems in my application. The specific error I'm facing is related to
CREATE INDEX CONCURRENTLY
not being able to run inside a transaction block.Error:
Generated after running
rails db:migrate
Environment:
Ruby version: 3.2.2 Rails version: 7.0.8 Flipper gem version: 1.1.2 Strong Migrations gem version: 1.6.4 Database: PostgreSQL