@@ -133,18 +133,32 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).
133
133
* ` EcommerceDotnet` as the database.
134
134
135
135
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`
137
137
database:
138
138
139
139
` ` ` sh
140
140
fauna schema push
141
141
` ` `
142
142
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
145
159
` schema` directory.
146
160
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:
148
162
149
163
` ` ` sh
150
164
fauna create-key --environment=' ' EcommerceDotnet server
@@ -153,13 +167,13 @@ docs](https://docs.fauna.com/fauna/current/tools/shell/).
153
167
Copy the returned ` secret` . The app can use the key' s secret to authenticate
154
168
requests to the database.
155
169
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:
157
171
158
172
```sh
159
173
cp .env.example .env
160
174
```
161
175
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
163
177
copied earlier:
164
178
165
179
```
@@ -279,15 +293,30 @@ Customer documents and related API responses:
279
293
280
294
Save `schema/collections.fsl`.
281
295
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:
283
299
284
300
```sh
285
301
fauna schema push
286
302
```
287
303
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
+ ```
289
318
290
- 5 . In `sample-app/Models/Customers.cs`, add the
319
+ 7 . In `sample-app/Models/Customers.cs`, add the
291
320
`totalPurchaseAmt` field to the `Customer` class:
292
321
293
322
```diff
@@ -320,7 +349,7 @@ Customer documents and related API responses:
320
349
Customer-related endpoints use this template to project Customer
321
350
document fields in responses.
322
351
323
- 6 . Start the app server:
352
+ 8 . Start the app server:
324
353
325
354
```sh
326
355
dotnet run
@@ -337,7 +366,7 @@ Customer documents and related API responses:
337
366
dotnet-sample-app
338
367
` ` `
339
368
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
341
370
following curl request to the ` POST /customers` endpoint:
342
371
343
372
` ` ` sh
0 commit comments