Skip to content

Fix chatflow's type null or blank#5065

Merged
HenryHengZJ merged 13 commits intomainfrom
fix/chatflow-type-null
Aug 15, 2025
Merged

Fix chatflow's type null or blank#5065
HenryHengZJ merged 13 commits intomainfrom
fix/chatflow-type-null

Conversation

@chungyau97
Copy link
Contributor

@chungyau97 chungyau97 commented Aug 13, 2025

Description

  • Sets the type column in the chat_flow table to non-nullable with a default value of CHATFLOW.
  • Adds validation for chatflow type on create and update.

Note: This PR contains a migration script that will modify the database schema.
Please ensure you have a full backup before running the migration.

Migration Result

Enterprise

Database Agentflow Chatflow Data Migrations Properties
SQLite --- --- --- --- ---
Before agentflow chatflow database-data database-migrations database-properties
After agentflow chatflow database-data database-migrations database-properties
PostgreSQL --- --- --- --- ---
Before agentflow chatflow database-data database-migrations databbase-properties
After agentflow chatflow database-data database-migrations database-properties
MySQL --- --- --- --- ---
Before agentflow chatflow database-data database-migrations database-properties
After agentflow chatflow database-data database-migrations database-properties
MariaDB --- --- --- --- ---
Before agentflow chatflow database-data database-migrations database-properties
After agentflow chatflow database-data database-migrations databbase-properties

Cloud

PostgreSQL Agentflow Chatflow Data Migrations Properties
Before agentflow chatflow database-data database-migrations database-properties
After agentflow chatflow databbase-data database-migrations database-properties

Create Update "Type" validation

Enterprise

ACTION Without Type With Invalid Type With Blank Type With Valid Type
Create create without type create with invalid type create with blank type create with correct type
Update update without type update with invalid type update with blank type update with valid type

Cloud

ACTION Without Type With Invalid Type With Blank Type With Valid Type
Create create without type create with invalid type create with blank type create with valid type
Update update without type update with invalid type update with blank type update with valid type

@chungyau97 chungyau97 self-assigned this Aug 13, 2025
@chungyau97 chungyau97 added the bug Something isn't working label Aug 13, 2025
@HenryHengZJ HenryHengZJ merged commit 4ce0851 into main Aug 15, 2025
3 checks passed
@chungyau97 chungyau97 deleted the fix/chatflow-type-null branch August 18, 2025 16:03
erhhung pushed a commit to erhhung/flowise that referenced this pull request Oct 5, 2025
* fix(entities/ChatFlow.ts): make type column non-nullable with default value

* fix(postgres/ModifyChatflowType): set default type and make column non-nullable

* fix(sqlite/ModifyChatflowType): set default type and make column non-nullable

* fix(mysql/ModifyChatflowType): set default type and make column non-nullable

* chore(sqlite/ModifyChatflowType): standardize type column to VARCHAR(20)

* chore(postgres/ModifyChatflowType): standardize type column to VARCHAR(20)

* fix(mariadb/ModifyChatflowType): set default type and make column non-nullable

* chore: rename ChatflowType to EnumChatflowType and update references

* feat(chatflows): add chatflow type validation

* fix(chatflows): empty string bypassing type validation on update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants