learnshopify.dev/Workspace
local task

Add a table called `BundleLog` to your app's database, with a migration.

Pass criterion: `prisma/schema.prisma` has the `BundleLog` model, and a migration in `prisma/migrations` creates the table.
$ npx @learnshopifydev/cli check add-a-table-to-your-database
1. Open `prisma/schema.prisma` in your editor

At the bottom is `model Session`. A model describes one table.

2. Paste this at the end of the file and save

Each line is one column: a name and the kind of value it holds. `productId` will hold the ID of a bundle's product on the store.

3. Create the migration

It adds a folder to `prisma/migrations` and the table to your database. If `shopify app dev` is running, restart it afterwards, because your app only sees a new table when it starts.

4. Open the database and look

A page opens in your browser. `Session` has one row for your store, and `BundleLog` is still empty.

0 / 1 task solved