aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/mini_environment.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/mini_environment.rb b/app/models/mini_environment.rb
index 77e2f1b..c92a62c 100644
--- a/app/models/mini_environment.rb
+++ b/app/models/mini_environment.rb
@@ -32,6 +32,7 @@
# backend_id :integer
# backend_data :jsonb
# signon_users :jsonb
+# data_snapshot_id :integer
#
class MiniEnvironment < ApplicationRecord
@@ -50,6 +51,11 @@ class MiniEnvironment < ApplicationRecord
belongs_to :backend, polymorphic: true
has_many :services, class_name: 'MiniEnvironmentService', dependent: :destroy
+ belongs_to(
+ :data_snapshot,
+ class_name: 'GovukGuix::DataSnapshot',
+ optional: true
+ )
def enqueued_terraform_jobs
Que.execute("SELECT * FROM que_jobs WHERE args->>0 = '#{id}'")