You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/[platform]/build-a-backend/data/connect-to-existing-data-sources/connect-postgres-mysql-database/index.mdx
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -404,6 +404,7 @@ This allows the Amplify team to maintain and enhance the SQL Layer without needi
404
404
| integer | a.integer() |
405
405
| bigint | a.integer() |
406
406
| tinyint | a.integer() |
407
+
| serial*| a.integer().default() |
407
408
| float | a.float() |
408
409
| double | a.float() |
409
410
| decimal | a.float() |
@@ -429,6 +430,8 @@ This allows the Amplify team to maintain and enhance the SQL Layer without needi
429
430
| json | a.json() |
430
431
| enum | a.enum() |
431
432
433
+
*Support for auto increment (serial) fields is limited to PostgreSQL datasources.
Copy file name to clipboardExpand all lines: src/pages/[platform]/build-a-backend/data/data-modeling/add-fields/index.mdx
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -233,6 +233,9 @@ const schema = a.schema({
233
233
}),
234
234
}).authorization((allow) =>allow.publicApiKey());
235
235
```
236
+
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).
238
+
236
239
<Callout>
237
240
**Note:** The `.default(...)` modifier can't be applied to required fields.
0 commit comments