Skip to content

armgit / burr

Public Imported from GitHub
0

Build applications that make decisions (chatbots, agents, simulations, etc...). Monitor, trace, persist, and execute on your own infrastructure.

Removes `state` from persister primary key

elijahbenizzy7c55733e86a9
diff --git a/burr/core/persistence.py b/burr/core/persistence.py
index f0d025be..fcdc1cd2 100644
--- a/burr/core/persistence.py
+++ b/burr/core/persistence.py
@@ -166,7 +166,7 @@ class SQLLitePersister(BaseStatePersister):
status TEXT NOT NULL,
state TEXT NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (partition_key, app_id, sequence_id, position, state)
+ PRIMARY KEY (partition_key, app_id, sequence_id, position)
)"""
)
cursor.execute(
diff --git a/burr/integrations/persisters/postgresql.py b/burr/integrations/persisters/postgresql.py
index d81886a4..f2563d99 100644
--- a/burr/integrations/persisters/postgresql.py
+++ b/burr/integrations/persisters/postgresql.py
@@ -100,7 +100,7 @@ class PostgreSQLPersister(persistence.BaseStatePersister):
status TEXT NOT NULL,
state JSONB NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (partition_key, app_id, sequence_id, position, state)
+ PRIMARY KEY (partition_key, app_id, sequence_id, position)
)"""
)
cursor.execute(