Add test_procedure to procedure_path
This commit is contained in:
parent
5b094d8b13
commit
4ad3932c05
3 changed files with 9 additions and 1 deletions
|
@ -3,6 +3,7 @@ class ProcedurePath < ApplicationRecord
|
||||||
validates :administrateur_id, presence: true, allow_blank: false, allow_nil: false
|
validates :administrateur_id, presence: true, allow_blank: false, allow_nil: false
|
||||||
validates :procedure_id, presence: true, allow_blank: false, allow_nil: false
|
validates :procedure_id, presence: true, allow_blank: false, allow_nil: false
|
||||||
|
|
||||||
|
belongs_to :test_procedure, class_name: 'Procedure'
|
||||||
belongs_to :procedure
|
belongs_to :procedure
|
||||||
belongs_to :administrateur
|
belongs_to :administrateur
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddTestProcedureToProcedurePaths < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
add_reference :procedure_paths, :test_procedure
|
||||||
|
end
|
||||||
|
end
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 2018_05_15_135415) do
|
ActiveRecord::Schema.define(version: 2018_05_16_155238) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
@ -425,7 +425,9 @@ ActiveRecord::Schema.define(version: 2018_05_15_135415) do
|
||||||
t.integer "administrateur_id"
|
t.integer "administrateur_id"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
|
t.bigint "test_procedure_id"
|
||||||
t.index ["path"], name: "index_procedure_paths_on_path"
|
t.index ["path"], name: "index_procedure_paths_on_path"
|
||||||
|
t.index ["test_procedure_id"], name: "index_procedure_paths_on_test_procedure_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "procedure_presentations", id: :serial, force: :cascade do |t|
|
create_table "procedure_presentations", id: :serial, force: :cascade do |t|
|
||||||
|
|
Loading…
Reference in a new issue