X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a3eb48385bcf1465339d473c0c1657e075cd507d..e83f0bd13121ab520c68d3a49a3f0f59a1266cd2:/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 e79246f48..bea9f125f 100644 --- a/db/migrate/051_add_status_to_user.rb +++ b/db/migrate/051_add_status_to_user.rb @@ -1,8 +1,9 @@ -require 'migrate' +class AddStatusToUser < ActiveRecord::Migration[4.2] + class User < ApplicationRecord + end -class AddStatusToUser < ActiveRecord::Migration def self.up - create_enumeration :user_status_enum, ["pending","active","confirmed","suspended","deleted"] + create_enum :user_status_enum, %w[pending active confirmed suspended deleted] add_column :users, :status, :user_status_enum, :null => false, :default => "pending"