X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/effb1b7f4170bb7244c4dfffcbe6134fe00e2bc4..f816482778fad28424a4b2a151e0ba8ede2dcd97:/db/migrate/051_add_status_to_user.rb?ds=sidebyside diff --git a/db/migrate/051_add_status_to_user.rb b/db/migrate/051_add_status_to_user.rb index d3adcee33..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[5.0] def self.up - create_enumeration :user_status_enum, %w[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"