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

Unique constraint #815

Open
xahon opened this issue Oct 16, 2017 · 0 comments
Open

Unique constraint #815

xahon opened this issue Oct 16, 2017 · 0 comments

Comments

@xahon
Copy link

xahon commented Oct 16, 2017

Is it possible to define field of table as unique?

{ type: '', key: true } is buggy

Using { type: 'text', key: true } and ...createAsync({ name: 'Ilya' }) it throws

(node:21380) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ER_TRUNCATED_WRONG_VALUE_FOR_FIELD: Incorrect integer value: 'Ilya' for column 'name' at row 1

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

1 participant