Skip to content

Commit 7ee7fed

Browse files
author
Hein
committed
PR feedback
1 parent 109dd08 commit 7ee7fed

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

mint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@
400400
"pages": [
401401
"tutorials/client/data/overview",
402402
"tutorials/client/data/cascading-delete",
403-
"tutorials/client/data/map-local-uuid"
403+
"tutorials/client/data/sequential-id-mapping"
404404
]
405405
}
406406
]

tutorials/client/data/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ description: "A collection of tutorials showcasing various data management strat
55

66
<CardGroup>
77
<Card title="Cascading Delete" icon="database" href="/tutorials/client/data/cascading-delete" horizontal/>
8-
<Card title="Auto-Incrementing ID Mapping " icon="database" href="/tutorials/client/data/map-local-uuid" horizontal/>
8+
<Card title="Sequential ID Mapping" icon="database" href="/tutorials/client/data/sequential-id-mapping" horizontal/>
99
</CardGroup>

tutorials/client/data/map-local-uuid.mdx renamed to tutorials/client/data/sequential-id-mapping.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Sequential ID Mapping
33
description: In this tutorial we will show you how to map a local UUID to a remote sequential (auto-incrementing) ID.
4-
sidebarTitle: Auto-Incrementing ID Mapping
4+
sidebarTitle: Sequential ID Mapping
55
keywords: ["data", "uuid", "map", "auto increment", "id", "sequential id"]
66
---
77

@@ -20,7 +20,7 @@ on the client and map them to sequential IDs on the backend database (Supabase i
2020
### Overview
2121
Before we get started, let's outline the changes we will have to make:
2222
<Steps>
23-
<Step title={"Data model"}>
23+
<Step title={"Schema"}>
2424
Update the `lists` and `todos` tables
2525
</Step>
2626

@@ -46,14 +46,14 @@ Before we get started, let's outline the changes we will have to make:
4646
</Step>
4747
</Steps>
4848

49-
# Data Model
49+
# Schema
5050

5151
In order to map the UUID to the integer ID, we need to update the
5252
- `lists` table by adding a `uuid` column, which will be the secondary ID, and
5353
- `todos` table by adding a `uuid` column, and a `list_uuid` foreign key column which references the `uuid` column in the `lists` table.
5454

5555
<CodeGroup>
56-
```sql data model {3, 13, 21, 26}
56+
```sql schema {3, 13, 21, 26}
5757
create table public.lists (
5858
id serial,
5959
uuid uuid not null unique,
@@ -84,7 +84,7 @@ In order to map the UUID to the integer ID, we need to update the
8484
```
8585
</CodeGroup>
8686

87-
With the data mode updated, we now need a method to synchronize and map the `list_id` and `list_uuid` in the `todos` table, with the `id` and `uuid` columns in the `lists` table.
87+
With the schema updated, we now need a method to synchronize and map the `list_id` and `list_uuid` in the `todos` table, with the `id` and `uuid` columns in the `lists` table.
8888
We can achieve this by creating SQL triggers.
8989

9090
# Create SQL Triggers
@@ -182,7 +182,7 @@ We will create the following two triggers that cover either scenario of updating
182182
</Accordion>
183183
</AccordionGroup>
184184

185-
We now have triggers in place that will handle the mapping for our updated data model and
185+
We now have triggers in place that will handle the mapping for our updated schema and
186186
can move on to updating the Sync Rules to use the UUID column instead of the integer ID.
187187

188188
# Update Sync Rules

usage/sync-rules/client-id.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ Use UUIDs on the client, then map them to sequential IDs when performing an upda
5454

5555
This mapping must be performed wherever the UUIDs are referenced, including for every foreign key column.
5656

57-
For more information, have a look at the [ID mapping tutorial](/tutorials/client/data/map-local-uuid).
57+
For more information, have a look at the [Sequential ID Mapping tutorial](/tutorials/client/data/sequential-id-mapping).

0 commit comments

Comments
 (0)