Files
ubicloud/migrate/20241213_archived_record.rb
Benjamin Satzger 7ba508f55a Migration: Add partitioned table archived_record
This commit introduces the archived_record table, similar in schema to
deleted_record but without an id column or a uniqueness constraint. The
table is range-partitioned by the archived_at column and includes an
index on (model_name, archived_at). This allows for efficient execution
of queries that filter on both model_name and archived_at.

Monthly partitions are pre-created until Jan 2026. A follow-up commit
adds a test that starts failing when it's getting time to create new
partitions.
2024-12-14 11:48:31 +01:00

682 B