diff options
Diffstat (limited to 'app/models/pages_deployment.rb')
-rw-r--r-- | app/models/pages_deployment.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/app/models/pages_deployment.rb b/app/models/pages_deployment.rb index de7b2416258..f05ed2aac6e 100644 --- a/app/models/pages_deployment.rb +++ b/app/models/pages_deployment.rb @@ -6,8 +6,6 @@ class PagesDeployment < ApplicationRecord include FileStoreMounter include Gitlab::Utils::StrongMemoize - MIGRATED_FILE_NAME = "_migrated.zip" - attribute :file_store, :integer, default: -> { ::Pages::DeploymentUploader.default_store } belongs_to :project, optional: false @@ -16,11 +14,11 @@ class PagesDeployment < ApplicationRecord belongs_to :ci_build, class_name: 'Ci::Build', optional: true scope :older_than, ->(id) { where('id < ?', id) } - scope :migrated_from_legacy_storage, -> { where(file: MIGRATED_FILE_NAME) } scope :with_files_stored_locally, -> { where(file_store: ::ObjectStorage::Store::LOCAL) } scope :with_files_stored_remotely, -> { where(file_store: ::ObjectStorage::Store::REMOTE) } scope :project_id_in, ->(ids) { where(project_id: ids) } scope :active, -> { where(deleted_at: nil) } + scope :deactivated, -> { where('deleted_at < ?', Time.now.utc) } validates :file, presence: true validates :file_store, presence: true, inclusion: { in: ObjectStorage::SUPPORTED_STORES } @@ -43,10 +41,6 @@ class PagesDeployment < ApplicationRecord .update_all(updated_at: now, deleted_at: time || now) end - def migrated? - file.filename == MIGRATED_FILE_NAME - end - private def set_size |