debian-mirror-gitlab/app/models/postgresql/detached_partition.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
395 B
Ruby
Raw Normal View History

2021-10-27 15:23:28 +05:30
# frozen_string_literal: true
module Postgresql
2021-11-11 11:23:49 +05:30
class DetachedPartition < ::Gitlab::Database::SharedModel
2021-10-27 15:23:28 +05:30
scope :ready_to_drop, -> { where('drop_after < ?', Time.current) }
2023-01-13 00:05:48 +05:30
def fully_qualified_table_name
"#{Gitlab::Database::DYNAMIC_PARTITIONS_SCHEMA}.#{table_name}"
end
2023-03-04 22:38:38 +05:30
def table_schema
Gitlab::Database::GitlabSchema.table_schema(table_name)
end
2021-10-27 15:23:28 +05:30
end
end