X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/360333d37d56624bacde6032aeb2876638c03552..4634c6bc4233641e84d78b728a69ce4aba49fa7c:/db/migrate/039_add_more_controls_to_gpx_files.rb diff --git a/db/migrate/039_add_more_controls_to_gpx_files.rb b/db/migrate/039_add_more_controls_to_gpx_files.rb index aa2050e78..945a7021d 100644 --- a/db/migrate/039_add_more_controls_to_gpx_files.rb +++ b/db/migrate/039_add_more_controls_to_gpx_files.rb @@ -1,8 +1,8 @@ -require 'migrate' +require "migrate" -class AddMoreControlsToGpxFiles < ActiveRecord::Migration +class AddMoreControlsToGpxFiles < ActiveRecord::Migration[5.0] def self.up - create_enumeration :gpx_visibility_enum, ["private", "public", "trackable", "identifiable"] + create_enumeration :gpx_visibility_enum, %w[private public trackable identifiable] add_column :gpx_files, :visibility, :gpx_visibility_enum, :default => "public", :null => false Trace.where(:public => false).update_all(:visibility => "private") add_index :gpx_files, [:visible, :visibility], :name => "gpx_files_visible_visibility_idx"