X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dc2a2c8ebd1a11e4a64555fda22c6859a51defff..bfeec6112a10201883bae9aaebdd07dd67c19fa3:/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 f98cfd1eb..23761f248 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" -class AddStatusToUser < ActiveRecord::Migration +class AddStatusToUser < ActiveRecord::Migration[4.2] + class User < ApplicationRecord + end + 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"