-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
If you have a case-sensitive model attribute and create a mutli-column index like this:
var User = schema.define('User', {
userId: {
type: Number
},
messageId: {
type: Number
}
}, {
indexes: {
indexPrimary: {
columns: 'userId,messageId',
type: 'btree'
}
}
});The constructed sql doesn't wrap the column names for the btree's Using context:
CREATE INDEX "indexPrimary" ON "User" USING btree (userId,messageId)This will result in something like "Cannot find column 'userid'" failure.
Workaround (manually adding the quotes inline):
indexPrimary: {
columns: '"userId","messageId"',
type: 'btree'
}I am guessing that this should be handled in the library itself, as it does this for single columns perfectly.
Thanks for the hard work!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels