Add deleted_at for User
Do not remove the user from the database. Mark as deleted instead.
This commit is contained in:
parent
b30b4e46d8
commit
b05ac2ab64
15 changed files with 82 additions and 12 deletions
5
db/migrate/20160217115252_add_deleted_at_to_user.rb
Normal file
5
db/migrate/20160217115252_add_deleted_at_to_user.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
class AddDeletedAtToUser < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :deleted_at, :datetime
|
||||
end
|
||||
end
|
||||
|
|
@ -346,6 +346,7 @@ ActiveRecord::Schema.define(version: 20160217194036) do
|
|||
t.datetime "reset_password_expires"
|
||||
t.datetime "last_login"
|
||||
t.datetime "last_activity"
|
||||
t.datetime "deleted_at"
|
||||
end
|
||||
|
||||
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue