LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph.store.postgresbaseMIGRATIONS
    Attribute●Since v1.0

    MIGRATIONS

    Copy
    MIGRATIONS: Sequence[str] = ["\nCREATE TABLE IF NOT EXISTS store (
      \n    -- 'prefix' represents the doc's 'namespace'\n    prefix text NOT NULL,
      \n    key text NOT NULL,
      \n    value jsonb NOT NULL,
      \n    created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
      \n    updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
      \n    PRIMARY KEY (prefix, key)\n);\n", '\n-- For faster lookups by prefix\nCREATE INDEX CONCURRENTLY IF NOT EXISTS store_prefix_idx ON store USING btree (prefix text_pattern_ops);\n', '\n-- Add expires_at column to store table\nALTER TABLE store\nADD COLUMN IF NOT EXISTS expires_at TIMESTAMP WITH TIME ZONE,\nADD COLUMN IF NOT EXISTS ttl_minutes INT;\n', '\n-- Add indexes for efficient TTL sweeping\nCREATE INDEX IF NOT EXISTS idx_store_expires_at ON store (expires_at
    )\nWHERE expires_at IS NOT NULL;\n']
    View source on GitHub