Open xahon opened 6 years ago
Is it possible to define field of table as unique?
unique
{ type: '', key: true } is buggy
{ type: '', key: true }
Using { type: 'text', key: true } and ...createAsync({ name: 'Ilya' }) it throws
{ type: 'text', key: true }
...createAsync({ name: 'Ilya' })
(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
Is it possible to define field of table as
unique
?{ type: '', key: true }
is buggyUsing
{ type: 'text', key: true }
and...createAsync({ name: 'Ilya' })
it throws