Add digest and timestamps to operation_logs

This commit is contained in:
Paul Chavard 2019-05-02 16:18:10 +02:00
parent 012bbfb1d8
commit 3c4380251d
2 changed files with 13 additions and 1 deletions

View file

@ -0,0 +1,8 @@
class AddDigestAndTimestampsToDossierOperationLogs < ActiveRecord::Migration[5.2]
def change
add_column :dossier_operation_logs, :keep_until, :datetime
add_column :dossier_operation_logs, :executed_at, :datetime
add_column :dossier_operation_logs, :digest, :text
add_index :dossier_operation_logs, :keep_until
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2019_03_27_102357) do
ActiveRecord::Schema.define(version: 2019_03_27_102360) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -221,9 +221,13 @@ ActiveRecord::Schema.define(version: 2019_03_27_102357) do
t.datetime "updated_at", null: false
t.boolean "automatic_operation", default: false, null: false
t.bigint "administration_id"
t.datetime "keep_until"
t.datetime "executed_at"
t.text "digest"
t.index ["administration_id"], name: "index_dossier_operation_logs_on_administration_id"
t.index ["dossier_id"], name: "index_dossier_operation_logs_on_dossier_id"
t.index ["gestionnaire_id"], name: "index_dossier_operation_logs_on_gestionnaire_id"
t.index ["keep_until"], name: "index_dossier_operation_logs_on_keep_until"
end
create_table "dossiers", id: :serial, force: :cascade do |t|