Add test_started_at to procedures
This commit is contained in:
parent
1211157948
commit
0c54220c2b
3 changed files with 8 additions and 1 deletions
|
@ -153,7 +153,8 @@ class Procedure < ApplicationRecord
|
|||
end
|
||||
|
||||
def publish!(path)
|
||||
self.update!({ published_at: Time.now, archived_at: nil })
|
||||
now = Time.now
|
||||
self.update!({ test_started_at: now, published_at: now, archived_at: nil })
|
||||
ProcedurePath.create!(path: path, procedure: self, administrateur: self.administrateur)
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddTestStartedAtToProcedures < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :procedures, :test_started_at, :datetime, index: true
|
||||
end
|
||||
end
|
|
@ -464,6 +464,7 @@ ActiveRecord::Schema.define(version: 2018_05_02_092852) do
|
|||
t.string "web_hook_url"
|
||||
t.boolean "cloned_from_library", default: false
|
||||
t.bigint "parent_procedure_id"
|
||||
t.datetime "test_started_at"
|
||||
t.index ["hidden_at"], name: "index_procedures_on_hidden_at"
|
||||
t.index ["parent_procedure_id"], name: "index_procedures_on_parent_procedure_id"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue