aboutsummaryrefslogtreecommitdiff
path: root/app/models/govuk_guix/data_snapshot.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/govuk_guix/data_snapshot.rb')
-rw-r--r--app/models/govuk_guix/data_snapshot.rb18
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