Skip to content

Unique constraint #815

@xahon

Description

@xahon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions