SequelizeMeta structure incompatible with SingleStore/memsql
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, sql
Research direction
Start at the SequelizeMeta table initialization that emits the shown CREATE TABLE statement and trace how its name column constraints are assembled for the memsql/SingleStore dialect. Verify the generated schema against the reported SingleStore error; done means SequelizeMeta initializes without the duplicate UNIQUE constraint while preserving the primary key behavior.
Written by the indexing model from the issue text.
Description
What you are doing?
The table schema for the SequelizeMeta table is in conflict with the memsql/SingleStore dbms. The problematic query is the following table create:
CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL UNIQUE , PRIMARY KEY (`name`));
which causes an error due to validation on the memsql side with name being the PK and also defined as UNIQUE explicitly
SQL Error [1706] [HY000]: Feature 'Multiple HASH indices on the same columns' is not supported by
SingleStore.
simply skipping the explicit UNIQUE constraint on name avoids this issue
CREATE TABLE IF NOT EXISTS `SequelizeMeta` (`name` VARCHAR(255) NOT NULL , PRIMARY KEY (`name`));
Is there any reason not to remove the unique flag in the table definition? It is theoretically extraneous since it is the PK already.
What do you expect to happen?
I would expect the SequelizeMeta table to initialize successfully without intervention - or for there to be a way to configure my way out of the problem.
What is actually happening?
Error is being thrown due to validation on the dbms being confused that the key is also manually defined as unique.
SQL Error [1706] [HY000]: Feature 'Multiple HASH indices on the same columns' is not supported by
SingleStore.
Dialect: memsql/SingleStore
Database version: 8.1
Sequelize CLI version: 5.5.1
Sequelize version: 6.17.0
- Dominant language
- JavaScript
- Stars
- 2.6k
- Forks
- 524
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sequelize/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
georgestephanis/p2026#40 ·
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·