From 7e760a4aa3901bd31195a1af3d7371239590a908 Mon Sep 17 00:00:00 2001 From: Craz1k0ek Date: Thu, 25 Jun 2020 14:59:42 +0200 Subject: [PATCH] Updated field constraint example (#515) The .unique is not a valid field constraint. I've updated the docs to correct this minor mistake. --- 4.0/docs/fluent/schema.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4.0/docs/fluent/schema.md b/4.0/docs/fluent/schema.md index 61bc7400..4de6f7df 100644 --- a/4.0/docs/fluent/schema.md +++ b/4.0/docs/fluent/schema.md @@ -58,7 +58,7 @@ Fields can be added when creating or updating a schema. ```swift // Adds a new field -.field("name", .string, .unique) +.field("name", .string, .required) ``` The first parameter is the name of the field. This should match the key used on the associated model property. The second parameter is the field's [data type](#data-type). Finally, zero or more [constraints](#field-constraint) can be added.