migration with snowflake dialect giving SQL compilation error

Open
#1,229 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Domain
cli, databases

Research direction

Start by reproducing the issue with npx sequelize-cli db:migrate using the configuration and migration setup described in the issue. Inspect the generated SQL around the CHARSET and utf8_unicode_ci clauses, then verify that the migration completes successfully for the Snowflake dialect without those incompatible clauses.

Written by the indexing model from the issue text.

Description

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

Dominant language
JavaScript
Stars
2.6k
Forks
524
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sequelize/cli

All issues in sequelize/cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.