chainlit
chainlit copied to clipboard
Docs: Update data persistence table definition
I received the following error with SQLAlchemy data layer with postgresql DB.
- An error occurred: (sqlalchemy.dialects.postgresql.asyncpg.ProgrammingError) <class 'asyncpg.exceptions.UndefinedColumnError'>: column "defaultOpen" of relation "steps" does not exist
[SQL:
INSERT INTO steps ("name", "type", "id", "threadId", "parentId", "streaming", "input", "isError", "output", "createdAt", "start", "end", "defaultOpen", "showInput", "metadata", "generation")
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16)
ON CONFLICT (id) DO UPDATE
SET "name" = $1, "type" = $2, "threadId" = $4, "parentId" = $5, "streaming" = $6, "input" = $7, "isError" = $8, "output" = $9, "createdAt" = $10, "start" = $11, "end" = $12, "defaultOpen" = $13, "showInput" = $14, "metadata" = $15, "generation" = $16;
]
[parameters: ('on_message', 'run', '587a3e7e-ed5c-4f3a-8fda-4b7cc8cf4b86', 'b8002392-a4ca-41ad-b038-4c78445d1cb0', 'db1cfa7d-a652-43ed-b5c4-0685f2b2b8b6', False, 'hi', False, '', '2025-04-24T14:59:03.165014Z', '2025-04-24T14:59:03.165041Z', '2025-04-24T14:59:05.726986Z', False, 'json', '{}', 'null')]
docs: https://docs.chainlit.io/data-layers/sqlalchemy
These docs don't specify a defaultOpen column. please
I found a similar issue that might be helpful:
- [https://github.com/Chainlit/chainlit/issues/2126] BUG :
UndefinedColumnErrorwhen inserting intostepstable: column "defaultOpen" does not exist. The suggested solution is to update the DB Schema to match Chainlit's latest version, or alternatively, add the missing column with a SQL command.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
By executing:
ALTER TABLE steps ADD COLUMN "defaultOpen" BOOLEAN NOT NULL DEFAULT FALSE;
This error should be fixed. Although the schema for the SQL data layer should be updated
This issue is stale because it has been open for 14 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.