medusa icon indicating copy to clipboard operation
medusa copied to clipboard

docs: run migration before starting Medusa server

Open bytrangle opened this issue 3 years ago • 3 comments

As I understand, the Quickstart guide for setting a Medusa server uses SQLite, so it doesn't mention running migrations before running medusa develop.

This may trip up users who use PostgreSQL. Because the Quickstart page is the only page on creating a Medusa server, I added a small reminder about running migrations to seed Postgres after installing the server.

bytrangle avatar Aug 27 '22 10:08 bytrangle

⚠️ No Changeset found

Latest commit: 5bfd73cb74d142420ebdfd469ebd3ae020c1ea41

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Aug 27 '22 10:08 changeset-bot[bot]

I've changed the command to yarn run seed. This command, in addition to runing migrations if necessary, will seed the Postgres with dummy data. Without running it, when users run Gatsby storefront, it will fail because gatsby-node.js expects its GraphQL data to contain at least Medusa regions, products and collections.

bytrangle avatar Aug 27 '22 16:08 bytrangle

@shahednasser Thank you so much for the feedback. Hope the new change is what you're looking for.

bytrangle avatar Aug 30 '22 07:08 bytrangle