]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/051_add_status_to_user.rb
Avoid more models in old migrations
[rails.git] / db / migrate / 051_add_status_to_user.rb
index dc8d58138aa655d725c9bc4b957de83e3de60de7..5cf8a920f50e0f2e0d290bc32e91e85de4f1f1da 100644 (file)
@@ -1,8 +1,11 @@
-require 'migrate'
+require "migrate"
+
+class AddStatusToUser < ActiveRecord::Migration[4.2]
+  class User < ActiveRecord::Base
+  end
 
-class AddStatusToUser < ActiveRecord::Migration
   def self.up
-    create_enumeration :user_status_enum, %w(pending active confirmed suspended deleted)
+    create_enumeration :user_status_enum, %w[pending active confirmed suspended deleted]
 
     add_column :users, :status, :user_status_enum, :null => false, :default => "pending"