Skip to content

[BUG] MariaDB SQL syntax error when reverting migration with TypeORM CLI #4564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ejrtks1020 opened this issue Jun 3, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@ejrtks1020
Copy link
Contributor

Describe the bug
When running pnpm typeorm:migration-revert, the CLI throws a MariaDB syntax error due to incorrect SQL generation. The query includes double quotes around the table name and column name, which is invalid in MariaDB syntax.

To Reproduce
Steps to reproduce the behavior:

  1. Run pnpm typeorm:migration-revert
  2. A migration attempting to DROP COLUMN is triggered
  3. The generated SQL is invalid for MariaDB
  4. Error is thrown

Expected behavior

https://github.com/FlowiseAI/Flowise/blob/63ff703e7a223bdb37d8fe0dcf0a06800adc2755/packages/server/src/database/migrations/mariadb/1744964560174-AddErrorToEvaluationRun.ts#L10C47-L10C61

The generated SQL should be valid for MariaDB. Specifically, double quotes (") should be replaced with backticks (`) when referring to table and column names.

Screenshots
Image

Flow
No specific flow needed to reproduce — issue occurs during migration revert.

Setup

  • Flowise Version : 3.0.1
  • OS: macOS
ejrtks1020 added a commit to ejrtks1020/Flowise that referenced this issue Jun 3, 2025
ejrtks1020 added a commit to ejrtks1020/Flowise that referenced this issue Jun 3, 2025
ejrtks1020 added a commit to ejrtks1020/Flowise that referenced this issue Jun 3, 2025
@HenryHengZJ HenryHengZJ added the bug Something isn't working label Jun 4, 2025
HenryHengZJ pushed a commit that referenced this issue Jun 5, 2025
* Bugfix/Use backticks when dropping `errors` column for MariaDB compatibility (#4564)

* Bugfix/Use backticks when dropping `sequence_no` column for MariaDB compatibility (#4564)

* Bugfix/Use backticks when dropping sso columns for MariaDB compatibility (#4564)
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

No branches or pull requests

2 participants