Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(product): when running migrations, prevent exploding on isolated case #5643

Merged
merged 8 commits into from
Nov 20, 2023

Conversation

riqwan
Copy link
Contributor

@riqwan riqwan commented Nov 15, 2023

what:

When executing the SQL in migrations, its currently throwing an error when products dont exist, but the catch is not stopping the migration from going through the fail route.

Copy link

changeset-bot bot commented Nov 15, 2023

🦋 Changeset detected

Latest commit: a11fc33

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@medusajs/product Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

vercel bot commented Nov 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Visit Preview Nov 20, 2023 4:19pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Nov 20, 2023 4:19pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Nov 20, 2023 4:19pm

@riqwan riqwan marked this pull request as ready for review November 15, 2023 16:55
@riqwan riqwan requested a review from a team as a code owner November 15, 2023 16:55
@riqwan riqwan requested review from fPolic and adrien2p November 15, 2023 16:56
@riqwan
Copy link
Contributor Author

riqwan commented Nov 15, 2023

@adrien2p - I'm not sure why this is here, but if its needed, I added a non exploding sql to check if table exists.

Copy link
Contributor

@fPolic fPolic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@adrien2p
Copy link
Member

Now that we have the if exists or not exists everywhere, couldn't we remove this totally?

@adrien2p
Copy link
Member

PS: I love the changeset name "complain" 😂

@riqwan riqwan requested a review from olivermrbl November 16, 2023 10:19
Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@riqwan riqwan merged commit c472271 into develop Nov 20, 2023
12 checks passed
@riqwan riqwan deleted the fix/product-migration branch November 20, 2023 17:08
@github-actions github-actions bot mentioned this pull request Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants