Switch to using native rails support for managing Postgres enumerations
This commit is contained in:
parent
cebda5ffb9
commit
f2f0cf1ad9
11 changed files with 14 additions and 37 deletions
|
@ -3,7 +3,7 @@ class AddStatusToUser < ActiveRecord::Migration[4.2]
|
|||
end
|
||||
|
||||
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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue