Closed barash-asenov closed 3 years ago
I resolved the issue but I believe this is a general issue that is denoted here; https://github.com/rails/rails/issues/9483
Maybe we can add this part to documentation for people who are stuck like me? Like they can do;
class CreateUsers < ActiveRecord::Migration
disable_ddl_transaction!
def up
add_enum_value :my_enum, 'extra_value', if_not_exists: true
ActiveRecord::Base.transaction do
# other migrations we want to keep safe.
end
end
end
So I believe this is a safe way to handle the situation.
Maybe we can add this part to documentation for people who are stuck like me?
We have it at the bottom of the Usage section 🙂
Yeah sorry about that... I realized and closed the PR
Describe the bug When I use the function
add_enum_value
in the migration likeI get the following error
Context : psql (PostgreSQL) 12.5 (Ubuntu 12.5-0ubuntu0.20.04.1)