Skip to content

Unique constraint #815

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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