Skip to content

Commit 686ae8a

Browse files
authored
[DOCS-3571] README: Update for staged schema default (#5)
1 parent 76eac96 commit 686ae8a

File tree

1 file changed

+40
-11
lines changed

1 file changed

+40
-11
lines changed

README.md

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,18 +133,32 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).
133133
* `EcommerceDotnet` as the database.
134134

135135

136-
5. Push the FSL files in the `schema` directory to the `EcommerceDotnet`
136+
5. Push the `.fsl` files in the `schema` directory to the `EcommerceDotnet`
137137
database:
138138

139139
```sh
140140
fauna schema push
141141
```
142142

143-
When prompted, accept and push the changes. The push creates the collections
144-
and user-defined functions (UDFs) defined in the FSL files of the
143+
When prompted, accept and stage the schema.
144+
145+
6. Check the status of the staged schema:
146+
147+
```sh
148+
fauna schema status
149+
```
150+
151+
7. When the status is `ready`, commit the staged schema to the database:
152+
153+
```sh
154+
fauna schema commit
155+
```
156+
157+
The commit applies the staged schema to the database. The commit creates the
158+
collections and user-defined functions (UDFs) defined in the `.fsl` files of the
145159
`schema` directory.
146160

147-
6. Create a key with the `server` role for the `EcommerceDotnet` database:
161+
8. Create a key with the `server` role for the `EcommerceDotnet` database:
148162

149163
```sh
150164
fauna create-key --environment='' EcommerceDotnet server
@@ -153,13 +167,13 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).
153167
Copy the returned `secret`. The app can use the key's secret to authenticate
154168
requests to the database.
155169
156-
7. Make a copy of the `.env.example` file and name the copy `.env`. For example:
170+
9. Make a copy of the `.env.example` file and name the copy `.env`. For example:
157171
158172
```sh
159173
cp .env.example .env
160174
```
161175
162-
8. In `.env`, set the `FAUNA_SECRET` environment variable to the secret you
176+
10. In `.env`, set the `FAUNA_SECRET` environment variable to the secret you
163177
copied earlier:
164178
165179
```
@@ -279,15 +293,30 @@ Customer documents and related API responses:
279293
280294
Save `schema/collections.fsl`.
281295
282-
4. Push the updated schemas to the `EcommerceDotnet` database:
296+
297+
4. Push the updated `.fsl` files in the `schema` directory to the `EcommerceDotnet`
298+
database to stage the changes:
283299
284300
```sh
285301
fauna schema push
286302
```
287303
288-
When prompted, accept and push the changes.
304+
When prompted, accept and stage the schema.
305+
306+
5. Check the status of the staged schema:
307+
308+
```sh
309+
fauna schema status
310+
```
311+
312+
6. When the status is `ready`, commit the staged schema changes to the
313+
database:
314+
315+
```sh
316+
fauna schema commit
317+
```
289318
290-
5. In `sample-app/Models/Customers.cs`, add the
319+
7. In `sample-app/Models/Customers.cs`, add the
291320
`totalPurchaseAmt` field to the `Customer` class:
292321
293322
```diff
@@ -320,7 +349,7 @@ Customer documents and related API responses:
320349
Customer-related endpoints use this template to project Customer
321350
document fields in responses.
322351
323-
6. Start the app server:
352+
8. Start the app server:
324353
325354
```sh
326355
dotnet run
@@ -337,7 +366,7 @@ Customer documents and related API responses:
337366
dotnet-sample-app
338367
```
339368

340-
7. With the local server running in a separate terminal tab, run the
369+
9. With the local server running in a separate terminal tab, run the
341370
following curl request to the `POST /customers` endpoint:
342371

343372
```sh

0 commit comments

Comments
 (0)