Files
ubicloud/model/archived_record.rb
Benjamin Satzger fce76f6126 Create ArchivedRecord model
ArchivedRecord is created with a structure similar to DeletedRecord but
based on a partitioned table. A test is included that triggers a failure
45 days before the table's partitions are exhausted.
2024-12-14 11:48:31 +01:00

16 lines
456 B
Ruby

# frozen_string_literal: true
require_relative "../model"
class ArchivedRecord < Sequel::Model
no_primary_key
end
# Table: archived_record
# Columns:
# archived_at | timestamp with time zone | NOT NULL DEFAULT CURRENT_TIMESTAMP
# model_name | text | NOT NULL
# model_values | jsonb | NOT NULL DEFAULT '{}'::jsonb
# Indexes:
# archived_record_model_name_archived_at_index | btree (model_name, archived_at)