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

refactor: migrate pricing entities to DML models #10335

Merged
merged 16 commits into from
Dec 2, 2024
Merged

Conversation

thetutlage
Copy link
Contributor

@thetutlage thetutlage commented Nov 28, 2024

Fixes: FRMW-2810

Breaking changes

There is only one breaking change

  • The min_quantity and max_quantity properties are now consistently typed as numbers. Earlier, it was typed as numbers in some API responses and as string in others. I did not go to the bottom of this inconsistency, but the tests reveals them.

@thetutlage thetutlage requested a review from a team as a code owner November 28, 2024 07:00
Copy link

changeset-bot bot commented Nov 28, 2024

⚠️ No Changeset found

Latest commit: 8c932a2

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

Copy link

vercel bot commented Nov 28, 2024

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

Name Status Preview Comments Updated (UTC)
medusa-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 9:30am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Dec 2, 2024 9:30am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Dec 2, 2024 9:30am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Dec 2, 2024 9:30am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Dec 2, 2024 9:30am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Dec 2, 2024 9:30am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Dec 2, 2024 9:30am

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

Overall LGTM, nice work!

@@ -40,7 +40,7 @@ const createPriceLists = async (
rules: object = defaultRules,
prices = defaultPriceListPrices
) => {
return await service.createPriceLists([
return service.createPriceLists([
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope. By mistake, but it shouldn't change the flow or the behavior of the code. However, happy to revert it back

@@ -1,6 +1,6 @@
import { Migration } from "@mikro-orm/migrations"

export class Migration20241127223829 extends Migration {
export class Migration20241129094116 extends Migration {
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: We probably shouldn't rename migrations, as it would otherwise be re-applied no?

@kodiakhq kodiakhq bot merged commit 913cf15 into develop Dec 2, 2024
23 checks passed
@kodiakhq kodiakhq bot deleted the feat/pricing-dml branch December 2, 2024 09:44
hirotaka pushed a commit to hirotaka/medusa that referenced this pull request Dec 7, 2024
Fixes: FRMW-2810

## Breaking changes
There is only one breaking change

- The `min_quantity` and `max_quantity` properties are now consistently typed as numbers. Earlier, it was [typed as numbers](https://github.com/medusajs/medusa/blob/develop/integration-tests/http/__tests__/price-list/admin/price-list.spec.ts#L68-L69) in some API responses and as [string in others](https://github.com/medusajs/medusa/blob/develop/integration-tests/http/__tests__/price-list/admin/price-list.spec.ts#L186-L187). I did not go to the bottom of this inconsistency, but the tests reveals them.

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants