mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 02:34:43 +08:00
f216c6d60b
The "backup" schema is used to rollback a failed restore. It isn't useful after a longer period of time and turns into a waste of disk space.
19 lines
367 B
Ruby
19 lines
367 B
Ruby
# frozen_string_literal: true
|
|
|
|
class BackupMetadata < ActiveRecord::Base
|
|
LAST_RESTORE_DATE = "last_restore_date"
|
|
|
|
def self.value_for(name)
|
|
where(name: name).pluck_first(:value).presence
|
|
end
|
|
end
|
|
|
|
# == Schema Information
|
|
#
|
|
# Table name: backup_metadata
|
|
#
|
|
# id :bigint not null, primary key
|
|
# name :string not null
|
|
# value :string
|
|
#
|