add trashable concern on user

This commit is contained in:
João Geonizeli
2022-07-31 21:17:22 -03:00
parent 4a2d2d1a67
commit eff96cd102
10 changed files with 221 additions and 168 deletions

View File

@@ -0,0 +1,5 @@
class AddDeletedAtToUser < ActiveRecord::Migration[7.0]
def change
add_column :users, :deleted_at, :datetime
end
end

3
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2022_07_25_225343) do
ActiveRecord::Schema[7.0].define(version: 2022_07_31_232807) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -147,6 +147,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_07_25_225343) do
t.datetime "updated_at", null: false
t.string "avatar_url"
t.string "roles", default: [], array: true
t.datetime "deleted_at"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end