You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chatflow and workflow cannot be created, after updating to the latest main code #28046
This error is caused by a mismatch between the ORM model and your actual database schema after updating to the latest main code. PR #28014 changed the workflows.updated_at field to use onupdate=func.current_timestamp() but kept server_default=func.current_timestamp() in the model definition. However, if your database schema did not get updated correctly, new workflow/chatflow inserts can result in a null value for updated_at, violating the NOT NULL constraint and causing the integrity error you’re seeing (PR #28014 details).
There is an open issue tracking this bug (issue #28046). The recommended fix is to ensure your database schema sets a default value for the workflows.updated_at column. For self-hosted setups, you can manually apply a migration like:
ALTERTABLE workflows ALTER COLUMN updated_at SET DEFAULT CURRENT_TIMESTAMP;
After running this, restart your application and new workflows/chatflows should be created without error. If you use Alembic for migrations, make sure your migration scripts reflect this change.
Activity
dosubot commentedon Nov 10, 2025
This error is caused by a mismatch between the ORM model and your actual database schema after updating to the latest main code. PR #28014 changed the workflows.updated_at field to use
onupdate=func.current_timestamp()but keptserver_default=func.current_timestamp()in the model definition. However, if your database schema did not get updated correctly, new workflow/chatflow inserts can result in a null value for updated_at, violating the NOT NULL constraint and causing the integrity error you’re seeing (PR #28014 details).There is an open issue tracking this bug (issue #28046). The recommended fix is to ensure your database schema sets a default value for the workflows.updated_at column. For self-hosted setups, you can manually apply a migration like:
After running this, restart your application and new workflows/chatflows should be created without error. If you use Alembic for migrations, make sure your migration scripts reflect this change.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
