X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..d130db9fa84da832a6a0cb0333982725fdc480c7:/db/migrate/051_add_status_to_user.rb diff --git a/db/migrate/051_add_status_to_user.rb b/db/migrate/051_add_status_to_user.rb index dc8d58138..5cf8a920f 100644 --- a/db/migrate/051_add_status_to_user.rb +++ b/db/migrate/051_add_status_to_user.rb @@ -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"