diff --git a/src/mvp/15-item-cid.md b/src/mvp/15-item-cid.md new file mode 100644 index 0000000..7dc53f7 --- /dev/null +++ b/src/mvp/15-item-cid.md @@ -0,0 +1,12 @@ +# Use `cid` for `items` + +By default the `items` table uses an auto-incrementing (`Serial`) +for the `id` (Primary Key): + +![items-id-integer](https://github.com/dwyl/mvp/assets/194400/d3020e53-2ad8-43ff-b0ed-95251ee21a87) + +This is fine for a _server_-side rendered app +with a _single_ relational database instance. +But our ambition has always been +to build a mobile + offline-first distributed App. + diff --git a/src/mvp/17-list_items.md b/src/mvp/17-list_items.md index 4201604..9266fb2 100644 --- a/src/mvp/17-list_items.md +++ b/src/mvp/17-list_items.md @@ -65,9 +65,11 @@ if we want to avoid conflicts. As previously noted, the `mix phx.gen.schema` command -does not create any `CRUD` functions +does _not_ create any `CRUD` functions or the corresponding `test` file for the `schema`. +In our case that's OK, +because we want to write a few bespoke functions. Create the file with the path: `test/app/list_items_test.exs` diff --git a/touch b/touch new file mode 100644 index 0000000..e69de29