aboutsummaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-06-21 23:07:02 +0100
committerChristopher Baines <mail@cbaines.net>2018-06-21 23:07:02 +0100
commitd20ab544d75cf504abefae7a2611958bf07103f4 (patch)
treeec8ead1f3b0d60f8a9b1f56aa9408bdaf1a26d88 /app/models
parent7ae6a547c0bd87aa884080dc239e6392051d50f6 (diff)
downloadgovuk-mini-environment-admin-d20ab544d75cf504abefae7a2611958bf07103f4.tar
govuk-mini-environment-admin-d20ab544d75cf504abefae7a2611958bf07103f4.tar.gz
Remove FinishedTerraformJob
This is no longer necessary, as Que now supports keeping the job entries around in the que_jobs table.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/finished_terraform_job.rb34
-rw-r--r--app/models/mini_environment.rb9
2 files changed, 0 insertions, 43 deletions
diff --git a/app/models/finished_terraform_job.rb b/app/models/finished_terraform_job.rb
deleted file mode 100644
index ca2cb94..0000000
--- a/app/models/finished_terraform_job.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-# GOV.UK Mini Environment Admin
-# Copyright © 2018 Christopher Baines <mail@cbaines.net>
-#
-# This file is part of the GOV.UK Mini Environment Admin.
-#
-# The GOV.UK Mini Environment Admin is free software: you can
-# redistribute it and/or modify it under the terms of the GNU Affero
-# General Public License as published by the Free Software Foundation,
-# either version 3 of the License, or (at your option) any later
-# version.
-#
-# The GOV.UK Mini Environment Admin is distributed in the hope that it
-# will be useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public
-# License along with the GOV.UK Mini Environment Admin. If not, see
-# <http://www.gnu.org/licenses/>.
-
-# == Schema Information
-#
-# Table name: finished_terraform_jobs
-#
-# id :integer not null, primary key
-# model_id :integer
-# job_class :string
-# created_at :datetime not null
-# updated_at :datetime not null
-#
-
-class FinishedTerraformJob < ApplicationRecord
- belongs_to :mini_environment
-end
diff --git a/app/models/mini_environment.rb b/app/models/mini_environment.rb
index 502cff2..d3f8ec3 100644
--- a/app/models/mini_environment.rb
+++ b/app/models/mini_environment.rb
@@ -36,15 +36,6 @@
#
class MiniEnvironment < ApplicationRecord
- has_many(
- :finished_terraform_jobs,
- lambda do |mini_environment|
- unscope(:where).where(
- 'finished_terraform_jobs.model_id = ?', mini_environment.id
- )
- end,
- dependent: :destroy
- )
belongs_to :govuk_guix_revision, class_name: 'GovukGuix::Revision'
belongs_to :backend, polymorphic: true