Skip to content

postgrelize / UniqueOptions

Type Alias: UniqueOptions ​

UniqueOptions = Readonly<{ msg?: string; name?: string; nullsNotDistinct?: boolean; }>

Defined in: src/model/attribute-options.ts:25

Named unique constraint of an attribute.

Give several attributes the same name to form one composite unique key.

Example ​

ts
const email: UniqueOptions = { name: 'users_email_unique', msg: 'Email already taken', nullsNotDistinct: true };

Released under the MIT License.