From 13d1d29a772ebba0e0f9878594318b3deea59a94 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Thu, 13 Mar 2025 13:27:32 +0100 Subject: [PATCH] Add a comment on the migration stating that we keep an history of the policy data --- .../migrations/20250225091000_dynamic_policy_data.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/storage-pg/migrations/20250225091000_dynamic_policy_data.sql b/crates/storage-pg/migrations/20250225091000_dynamic_policy_data.sql index 4a0984925..38f87d100 100644 --- a/crates/storage-pg/migrations/20250225091000_dynamic_policy_data.sql +++ b/crates/storage-pg/migrations/20250225091000_dynamic_policy_data.sql @@ -4,6 +4,10 @@ -- Please see LICENSE in the repository root for full details. -- Add a table which stores the latest policy data +-- +-- Every time the policy data is updated, it creates a new row, so that we keep +-- an history of the policy data, trace back which version of the data was used +-- on each evaluation. CREATE TABLE IF NOT EXISTS policy_data ( policy_data_id UUID PRIMARY KEY, created_at TIMESTAMP WITH TIME ZONE NOT NULL,