diff options
author | Christopher Baines <mail@cbaines.net> | 2018-05-30 20:36:03 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-06-01 18:23:11 +0100 |
commit | e043d884e9dc077f1ab366d956ee7dd9df4c7460 (patch) | |
tree | 8679f60e84b1e690f5b44bc8c7cdea040a3127c7 /app/models/govuk_guix | |
parent | 8b1ae33144bc4d496980ffc16cd304c8f107aff4 (diff) | |
download | govuk-mini-environment-admin-e043d884e9dc077f1ab366d956ee7dd9df4c7460.tar govuk-mini-environment-admin-e043d884e9dc077f1ab366d956ee7dd9df4c7460.tar.gz |
Add the GovukGuix::Revision commit_hash to the DataSnapshot model
This is to record the revision of govuk-guix used to create the
snapshot.
Diffstat (limited to 'app/models/govuk_guix')
-rw-r--r-- | app/models/govuk_guix/data_snapshot.rb | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/app/models/govuk_guix/data_snapshot.rb b/app/models/govuk_guix/data_snapshot.rb index 743bdbc..4cec33a 100644 --- a/app/models/govuk_guix/data_snapshot.rb +++ b/app/models/govuk_guix/data_snapshot.rb @@ -22,13 +22,19 @@ # # Table name: govuk_guix_data_snapshots # -# id :integer not null, primary key -# store_path :string not null -# archived :boolean default(FALSE), not null -# manifest :json not null -# created_at :datetime not null -# updated_at :datetime not null +# id :integer not null, primary key +# store_path :string not null +# archived :boolean default(FALSE), not null +# manifest :json not null +# created_at :datetime not null +# updated_at :datetime not null +# govuk_guix_revision_commit_hash :string not null # class GovukGuix::DataSnapshot < ApplicationRecord + belongs_to( + :govuk_guix_revision, + class_name: 'GovukGuix::Revision', + foreign_key: 'govuk_guix_revision_commit_hash' + ) end |