]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/039_add_more_controls_to_gpx_files.rb
Send notifications to note subscribers instead of commenters
[rails.git] / db / migrate / 039_add_more_controls_to_gpx_files.rb
index 945a7021d46b54e9ea70554fa3214174b3b0b514..9f6d621487eea640b7ce5c19d2f3661609a1a419 100644 (file)
@@ -1,8 +1,10 @@
-require "migrate"
+class AddMoreControlsToGpxFiles < ActiveRecord::Migration[4.2]
+  class Trace < ApplicationRecord
+    self.table_name = "gpx_files"
+  end
 
-class AddMoreControlsToGpxFiles < ActiveRecord::Migration[5.0]
   def self.up
-    create_enumeration :gpx_visibility_enum, %w[private public trackable identifiable]
+    create_enum :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"