Skip to content
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

SequelizeMeta structure incompatible with SingleStore/memsql #1397

Open
jsking216 opened this issue Oct 18, 2023 · 2 comments
Open

SequelizeMeta structure incompatible with SingleStore/memsql #1397

jsking216 opened this issue Oct 18, 2023 · 2 comments

Comments

@jsking216
Copy link

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

@WikiRik
Copy link
Member

WikiRik commented Oct 18, 2023

A quick workaround is to remove this line locally;

unique: true,

We officially do not support memsql/SingleStore btw. What dialect did you use in the sequelize config?

@jsking216
Copy link
Author

A quick workaround is to remove this line locally;

unique: true,

We officially do not support memsql/SingleStore btw. What dialect did you use in the sequelize config?

We are using mysql dialect w/ sequelize.

Since you don't officially support it, we may be able to ask the SingleStore team to support a flag instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants