X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/945df0f150ea803e1a654b03155ecdb444c6ed1c..2f11b77309ee18aafb1bcce9dbe5bfc38a298bbb:/config/initializers/migrate.rb diff --git a/config/initializers/migrate.rb b/config/initializers/migrate.rb index 0667e3346..43dd446a3 100644 --- a/config/initializers/migrate.rb +++ b/config/initializers/migrate.rb @@ -51,6 +51,10 @@ if defined?(ActiveRecord::ConnectionAdapters::AbstractAdapter) execute "DROP TYPE #{enumeration_name}" end + def add_enumeration_value(enumeration_name, value) + execute "ALTER TYPE #{enumeration_name} ADD VALUE '#{value}'" + end + def rename_enumeration(old_name, new_name) old_name = quote_table_name(old_name) new_name = quote_table_name(new_name)