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.
682 B
682 B