-
Notifications
You must be signed in to change notification settings - Fork 1.7k
DB schema mismatch: autoCollapse column missing after 2.10.0 #2865
Description
Describe the bug
Since upgrading from 2.9.6 to 2.10.0, the autoCollapse parameter was added to the Step class (commit: #2818 ), but the corresponding database schema column was not documented in release notes or included in the SQLAlchemy Data Layer example. Existing deployments upgrading to 2.10.0 experience persistence failures when steps with auto_collapse=True are created, because the autoCollapse column does not exist in the database.
This causes a silent failure: steps fail to persist, and when threads are resumed, step data is missing (manifesting as disappearing assistant messages and other step data).
To Reproduce
Steps to reproduce the behavior:
- Have an existing Chainlit 2.9.6 deployment with a PostgreSQL database
- Upgrade to 2.10.0
- Create a new thread and send a message
- Wait for the LLM response to appear in a step
- Switch to a different thread
- Navigate back to the first thread
- See that the assistant message is no longer visible (only user messages are shown)
Expected behavior
Threads and their step data should be persisted to the database correctly.
Screenshots
N/A (data persistence issue, not UI)
Environment
- OS: Linux
- Chainlit version: 2.10.0 (regression from 2.9.6)
- Database: PostgreSQL
- Data Layer: SQLAlchemy-based custom implementation
- Python version: 3.12
Additional context
-
Documentation Gap: The 2.10.0 release notes did not include a "Breaking Changes" section (unlike 2.9.4 which explicitly documented the
modescolumn migration). Users who rely on persistence cannot discover the required schema change. -
Missing from SQLAlchemy Example: The Chainlit documentation for the SQLAlchemy Data Layer (https://docs.chainlit.io/data-layers/sqlalchemy) does not include the
autoCollapsecolumn in thestepstable schema definition. -
Workaround:
ALTER TABLE steps ADD COLUMN IF NOT EXISTS "autoCollapse" BOOLEAN;
-
Precedent: Version 2.9.4 correctly documented a breaking change for the
modescolumn with the exact migration SQL required.
Suggested fix:
- Document the required schema change in 2.10.0 release notes.
- Update the SQLAlchemy Data Layer documentation with the up-to-date schema including
autoCollapse
Metadata
Metadata
Assignees
Labels
Type
Projects
Status