X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c6bb4a5f4eadc46bac599cd6a5174b199c1b6026..ca4ee6faa9378e7610356e36cbd4931a2657eeed:/config/initializers/migrate.rb diff --git a/config/initializers/migrate.rb b/config/initializers/migrate.rb index 43dd446a3..1af67dd10 100644 --- a/config/initializers/migrate.rb +++ b/config/initializers/migrate.rb @@ -42,25 +42,6 @@ if defined?(ActiveRecord::ConnectionAdapters::AbstractAdapter) execute "ALTER TABLE #{table_name} ADD PRIMARY KEY USING INDEX #{constraint_name}" end - - def create_enumeration(enumeration_name, values) - execute "CREATE TYPE #{enumeration_name} AS ENUM ('#{values.join '\',\''}')" - end - - def drop_enumeration(enumeration_name) - 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) - - execute "ALTER TYPE #{old_name} RENAME TO #{new_name}" - end end end end