Commit 7986e47a authored by Tugce Nur Tas's avatar Tugce Nur Tas Committed by Tuğçe Nur Taş
Browse files

include paranoia gem and add deleted_at field

parent 1d726c34
......@@ -22,6 +22,7 @@ gem 'jbuilder'
gem 'jquery-rails'
gem 'panter-rails-deploy'
gem 'paperclip'
gem 'paranoia', '~> 2.2'
gem 'pg'
gem 'puma'
gem 'pundit'
......
......@@ -209,6 +209,8 @@ GEM
cocaine (~> 0.5.5)
mime-types
mimemagic (~> 0.3.0)
paranoia (2.3.1)
activerecord (>= 4.0, < 5.2)
parser (2.4.0.0)
ast (~> 2.2)
pg (0.20.0)
......@@ -368,6 +370,7 @@ DEPENDENCIES
overcommit
panter-rails-deploy
paperclip
paranoia (~> 2.2)
pg
poltergeist
pry-byebug
......
class User < ApplicationRecord
acts_as_paranoid
devise :invitable, :database_authenticatable, :recoverable, :rememberable,
:trackable, :validatable
has_many :clients
......
......@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170421070309) do
ActiveRecord::Schema.define(version: 20170510150439) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -35,12 +35,32 @@ ActiveRecord::Schema.define(version: 20170421070309) do
t.text "comments"
t.text "competent_authority"
t.text "involved_authority"
t.bigint "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.bigint "user_id"
t.index ["user_id"], name: "index_clients_on_user_id"
end
create_table "departements", force: :cascade do |t|
t.string "name"
t.string "street"
t.string "zip"
t.string "place"
t.string "phone"
t.string "email"
t.bigint "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["user_id"], name: "index_departements_on_user_id"
end
create_table "departements_users", id: false, force: :cascade do |t|
t.bigint "user_id", null: false
t.bigint "departement_id", null: false
t.index ["departement_id", "user_id"], name: "index_departements_users_on_departement_id_and_user_id"
t.index ["user_id", "departement_id"], name: "index_departements_users_on_user_id_and_departement_id"
end
create_table "language_skills", force: :cascade do |t|
t.bigint "client_id"
t.string "language"
......@@ -112,12 +132,15 @@ ActiveRecord::Schema.define(version: 20170421070309) do
t.datetime "invitation_accepted_at"
t.integer "invitation_limit"
t.integer "invited_by_id"
t.datetime "deleted_at"
t.index ["deleted_at"], name: "index_users_on_deleted_at"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["invitation_token"], name: "index_users_on_invitation_token", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end
add_foreign_key "clients", "users"
add_foreign_key "departements", "users"
add_foreign_key "language_skills", "clients"
add_foreign_key "profiles", "users"
add_foreign_key "relatives", "clients"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment