Make expires_at idempotent

This commit is contained in:
William Fu-Hinthorn
2025-03-17 12:38:43 -07:00
parent def69c59d2
commit 697f878e36
2 changed files with 4 additions and 4 deletions
@@ -79,12 +79,12 @@ CREATE INDEX CONCURRENTLY IF NOT EXISTS store_prefix_idx ON store USING btree (p
"""
-- Add expires_at column to store table
ALTER TABLE store
ADD COLUMN expires_at TIMESTAMP WITH TIME ZONE,
ADD COLUMN ttl_minutes INT;
ADD COLUMN IF NOT EXISTS expires_at TIMESTAMP WITH TIME ZONE,
ADD COLUMN IF NOT EXISTS ttl_minutes INT;
""",
"""
-- Add indexes for efficient TTL sweeping
CREATE INDEX idx_store_expires_at ON store (expires_at)
CREATE INDEX IF NOT EXISTS idx_store_expires_at ON store (expires_at)
WHERE expires_at IS NOT NULL;
""",
]
+1 -1
View File
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langgraph-checkpoint-postgres"
version = "2.0.17"
version = "2.0.18"
description = "Library with a Postgres implementation of LangGraph checkpoint saver."
authors = []
license = "MIT"