From 306e5d228d44156f5e06f5bbd56ade807b056899 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 19 May 2021 12:42:27 +0200 Subject: [PATCH] Add published_at to procedure_revisions --- app/models/procedure_revision.rb | 1 + ...20210120121240_add_published_at_to_procedure_revisions.rb | 5 +++++ db/schema.rb | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20210120121240_add_published_at_to_procedure_revisions.rb diff --git a/app/models/procedure_revision.rb b/app/models/procedure_revision.rb index e4da229c8..42c646ee2 100644 --- a/app/models/procedure_revision.rb +++ b/app/models/procedure_revision.rb @@ -3,6 +3,7 @@ # Table name: procedure_revisions # # id :bigint not null, primary key +# published_at :datetime # created_at :datetime not null # updated_at :datetime not null # procedure_id :bigint not null diff --git a/db/migrate/20210120121240_add_published_at_to_procedure_revisions.rb b/db/migrate/20210120121240_add_published_at_to_procedure_revisions.rb new file mode 100644 index 000000000..5e1d8de0d --- /dev/null +++ b/db/migrate/20210120121240_add_published_at_to_procedure_revisions.rb @@ -0,0 +1,5 @@ +class AddPublishedAtToProcedureRevisions < ActiveRecord::Migration[6.0] + def change + add_column :procedure_revisions, :published_at, :datetime + end +end diff --git a/db/schema.rb b/db/schema.rb index 0955c73f6..1f272774e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_05_06_135603) do +ActiveRecord::Schema.define(version: 2021_05_07_135603) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -533,6 +533,7 @@ ActiveRecord::Schema.define(version: 2021_05_06_135603) do t.bigint "procedure_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.datetime "published_at" t.index ["procedure_id"], name: "index_procedure_revisions_on_procedure_id" end