Skip to content

Commit bba221e

Browse files
committed
doc(data): specify .default() can only be applied to integers
1 parent e1edddc commit bba221e

File tree

1 file changed

+1
-1
lines changed
  • src/pages/[platform]/build-a-backend/data/data-modeling/add-fields

1 file changed

+1
-1
lines changed

src/pages/[platform]/build-a-backend/data/data-modeling/add-fields/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ const schema = a.schema({
234234
}).authorization((allow) => allow.publicApiKey());
235235
```
236236

237-
If you're working with a Postgres datasource, `.default()` can be used to represent [serial fields](/[platform]/build-a-backend/data/connect-to-existing-data-sources/connect-postgres-mysql-database/#mapping-of-sql-data-types-to-field-types-for-auto-generated-schema).
237+
If you're working with a Postgres datasource, `.default()` can be applied to integer fields to represent [serial fields](/[platform]/build-a-backend/data/connect-to-existing-data-sources/connect-postgres-mysql-database/#mapping-of-sql-data-types-to-field-types-for-auto-generated-schema).
238238

239239
<Callout>
240240
**Note:** The `.default(...)` modifier can't be applied to required fields.

0 commit comments

Comments
 (0)