sequelize / cli

The Sequelize CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

migration with snowflake dialect giving SQL compilation error

bhushangoel opened this issue · comments

What you are doing?

Attempting to run migration on snowflake. I am following the steps mentioned here - https://sequelize.org/docs/v6/other-topics/migrations/#installing-the-cli

What do you expect to happen?

I want to run npx sequelize-cli db:migrate migration successfully

What is actually happening?

But I am getting SQL compilation error

Output, either JSON or SQL

PS C:\projects\snowflake\migration-poc> npx sequelize-cli db:migrate

Sequelize CLI [Node: 18.12.1, CLI: 6.5.2, ORM: 6.28.0]

Loaded configuration file "config\config.json".
Using environment "development".
Disconnected connection with id: 03eabb72-293c-4caa-841a-9d7713c34e7c

ERROR: SQL compilation error:
syntax error line 1 at position 112 unexpected 'CHARSET'.
syntax error line 1 at position 133 unexpected 'utf8_unicode_ci'.

Dialect: snowflake
Database version: XXX
Sequelize CLI version: 6.5.2
Sequelize version: 6.28.0

Snowflake is not supported by the CLI. But it is possible that there is a bug in createTableQuery generating an invalid query. Feel free to open a PR in the core repo for this if that turns out to be the problem.