Link user and administrateur
This commit is contained in:
parent
8082751912
commit
81f44fa76b
4 changed files with 13 additions and 1 deletions
|
@ -0,0 +1,6 @@
|
|||
class LinkUserAndAdministrateur < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_reference :users, :administrateur, index: true
|
||||
add_foreign_key :users, :administrateurs
|
||||
end
|
||||
end
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 2019_08_08_144607) do
|
||||
ActiveRecord::Schema.define(version: 2019_08_09_073736) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
|
@ -597,6 +597,8 @@ ActiveRecord::Schema.define(version: 2019_08_08_144607) do
|
|||
t.datetime "locked_at"
|
||||
t.text "unconfirmed_email"
|
||||
t.bigint "instructeur_id"
|
||||
t.bigint "administrateur_id"
|
||||
t.index ["administrateur_id"], name: "index_users_on_administrateur_id"
|
||||
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
t.index ["instructeur_id"], name: "index_users_on_instructeur_id"
|
||||
|
@ -644,6 +646,7 @@ ActiveRecord::Schema.define(version: 2019_08_08_144607) do
|
|||
add_foreign_key "services", "administrateurs"
|
||||
add_foreign_key "trusted_device_tokens", "instructeurs"
|
||||
add_foreign_key "types_de_champ", "types_de_champ", column: "parent_id"
|
||||
add_foreign_key "users", "administrateurs"
|
||||
add_foreign_key "users", "instructeurs"
|
||||
add_foreign_key "without_continuation_mails", "procedures"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue