-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Composite index name too long #1944
Copy link
Copy link
Closed
Labels
dialect: mariadbFor issues and PRs. Things that involve MariaDB (and do not involve all dialects).For issues and PRs. Things that involve MariaDB (and do not involve all dialects).dialect: mysqlFor issues and PRs. Things that involve MySQL (and do not involve all dialects).For issues and PRs. Things that involve MySQL (and do not involve all dialects).existing workaroundFor issues. There is a known workaround for this issue.For issues. There is a known workaround for this issue.type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type
Description
So I was creating a table tonight with 6 fields put into a compound index per the docs.
field: {type:Sequelize.STRING(34), unique:'main'},
another_field: {type:Sequelize.STRING(34), unique:'main'},
a_date_field: {type:Sequelize.STRING(34), unique:'main'},
yet_another_field: {type:Sequelize.STRING(34), unique:'main'},
almost_done_field: {type:Sequelize.STRING(34), unique:'main'},
last_field: {type:Sequelize.STRING(34), unique:'main'}
I'm getting an error from MySQL. ER_TOO_LONG_IDENT "Identifier name is too long".
Sequelize is combining my field names to create an index name rather than using the 'main' string I'm providing.
Is there a way to provide the index name to avoid this issue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
dialect: mariadbFor issues and PRs. Things that involve MariaDB (and do not involve all dialects).For issues and PRs. Things that involve MariaDB (and do not involve all dialects).dialect: mysqlFor issues and PRs. Things that involve MySQL (and do not involve all dialects).For issues and PRs. Things that involve MySQL (and do not involve all dialects).existing workaroundFor issues. There is a known workaround for this issue.For issues. There is a known workaround for this issue.type: bugDEPRECATED: replace with the "bug" issue typeDEPRECATED: replace with the "bug" issue type