X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/568ce75c9ad0e19a14afb97d9d0832364232bee8..eb7678145a87c1b9e3cd7ff2d3b5dc08132e4b51:/db/migrate/057_add_map_bug_comment_event.rb diff --git a/db/migrate/057_add_map_bug_comment_event.rb b/db/migrate/057_add_map_bug_comment_event.rb index ff5f0b352..0d1a2c8ab 100644 --- a/db/migrate/057_add_map_bug_comment_event.rb +++ b/db/migrate/057_add_map_bug_comment_event.rb @@ -1,14 +1,15 @@ -require 'lib/migrate' +require "migrate" -class AddMapBugCommentEvent < ActiveRecord::Migration +class AddMapBugCommentEvent < ActiveRecord::Migration[5.0] def self.up - create_enumeration :map_bug_event_enum, ["opened", "closed","reopened","commented","hidden"] - add_column :map_bug_comment, :event, :map_bug_event_enum + create_enumeration :map_bug_event_enum, %w[opened closed reopened commented hidden] + + add_column :map_bug_comment, :event, :map_bug_event_enum end def self.down + remove_column :map_bug_comment, :event - remove_column :map_bug_comment, :event - drop_enumeration :map_bug_event_enum + drop_enumeration :map_bug_event_enum end end