diff --git a/.gitignore b/.gitignore index eb176dc..fbf8361 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .mypy_cache/ __pycache__/ +.idea/ \ No newline at end of file diff --git a/langgraph/checkpoint/mysql/__init__.py b/langgraph/checkpoint/mysql/__init__.py index 6ba6bfb..34a9f9d 100644 --- a/langgraph/checkpoint/mysql/__init__.py +++ b/langgraph/checkpoint/mysql/__init__.py @@ -119,6 +119,7 @@ def setup(self) -> None: ): cur.execute(migration) cur.execute(f"INSERT INTO checkpoint_migrations (v) VALUES ({v})") + cur.execute("COMMIT") def list( self, diff --git a/langgraph/checkpoint/mysql/base.py b/langgraph/checkpoint/mysql/base.py index 3f80370..8eb7c5e 100644 --- a/langgraph/checkpoint/mysql/base.py +++ b/langgraph/checkpoint/mysql/base.py @@ -69,6 +69,9 @@ """ CREATE INDEX checkpoints_checkpoint_id_idx ON checkpoints (checkpoint_id); """, + "ALTER TABLE checkpoints MODIFY COLUMN `checkpoint_ns` VARCHAR(255) NOT NULL DEFAULT '';", + "ALTER TABLE checkpoint_blobs MODIFY COLUMN `checkpoint_ns` VARCHAR(255) NOT NULL DEFAULT '';", + "ALTER TABLE checkpoint_writes MODIFY COLUMN `checkpoint_ns` VARCHAR(255) NOT NULL DEFAULT '';", ] SELECT_SQL = f"""