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

feat: Migrate customer module to DML #10499

Merged
merged 13 commits into from
Dec 11, 2024
Merged

feat: Migrate customer module to DML #10499

merged 13 commits into from
Dec 11, 2024

Conversation

thetutlage
Copy link
Contributor

@thetutlage thetutlage commented Dec 9, 2024

Fixes: FRMW-2837
RESOLVES FRMW-2839

Features

This PR introduces the ability to detach many to many relationships by defining the relationship name within the detach array.

In the following example, the entry from the pivot table will be removed when a CustomerGroup is deleted.

model
  .define("CustomerGroup", {
    id: model.id({ prefix: "cusgroup" }).primaryKey(),
    customers: model.manyToMany(() => Customer, {
      pivotEntity: () => CustomerGroupCustomer,
    }),
  })
  .cascades({
    detach: ["customers"]
  })

@thetutlage thetutlage requested a review from a team as a code owner December 9, 2024 08:03
Copy link

vercel bot commented Dec 9, 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 11, 2024 7:50am
6 Skipped Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Dec 11, 2024 7:50am
api-reference-v2 ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2024 7:50am
docs-ui ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2024 7:50am
docs-v2 ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2024 7:50am
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2024 7:50am
resources-docs ⬜️ Ignored (Inspect) Visit Preview Dec 11, 2024 7:50am

Copy link

changeset-bot bot commented Dec 9, 2024

🦋 Changeset detected

Latest commit: d522b0c

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

This PR includes changesets to release 65 packages
Name Type
@medusajs/customer Patch
@medusajs/types Patch
@medusajs/utils Patch
integration-tests-http Patch
@medusajs/dashboard Patch
@medusajs/cli Patch
@medusajs/medusa Patch
@medusajs/test-utils Patch
@medusajs/api-key Patch
@medusajs/auth Patch
@medusajs/cache-inmemory Patch
@medusajs/cache-redis Patch
@medusajs/cart Patch
@medusajs/currency Patch
@medusajs/event-bus-local Patch
@medusajs/event-bus-redis Patch
@medusajs/file Patch
@medusajs/fulfillment Patch
@medusajs/index Patch
@medusajs/inventory Patch
@medusajs/link-modules Patch
@medusajs/locking Patch
@medusajs/notification Patch
@medusajs/order Patch
@medusajs/payment Patch
@medusajs/pricing Patch
@medusajs/product Patch
@medusajs/promotion Patch
@medusajs/region Patch
@medusajs/sales-channel Patch
@medusajs/stock-location Patch
@medusajs/store Patch
@medusajs/tax Patch
@medusajs/user Patch
@medusajs/workflow-engine-inmemory Patch
@medusajs/workflow-engine-redis Patch
@medusajs/auth-emailpass Patch
@medusajs/auth-github Patch
@medusajs/auth-google Patch
@medusajs/file-local Patch
@medusajs/file-s3 Patch
@medusajs/fulfillment-manual Patch
@medusajs/locking-postgres Patch
@medusajs/locking-redis Patch
@medusajs/notification-local Patch
@medusajs/notification-sendgrid Patch
@medusajs/payment-stripe Patch
@medusajs/core-flows Patch
@medusajs/framework Patch
@medusajs/js-sdk Patch
@medusajs/modules-sdk Patch
@medusajs/orchestration Patch
@medusajs/workflows-sdk Patch
@medusajs/medusa-oas-cli Patch
@medusajs/oas-github-ci Patch
@medusajs/telemetry Patch
@medusajs/admin-bundler Patch
@medusajs/admin-sdk Patch
@medusajs/admin-shared Patch
@medusajs/admin-vite-plugin Patch
@medusajs/icons Patch
@medusajs/toolbox Patch
@medusajs/ui-preset Patch
create-medusa-app Patch
medusa-dev-cli 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

@olivermrbl olivermrbl changed the title Feat/customer dml feat: Migrate customer module to DML Dec 10, 2024
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.

LGTM

@thetutlage thetutlage merged commit 16d27ea into develop Dec 11, 2024
23 checks passed
@thetutlage thetutlage deleted the feat/customer-dml branch December 11, 2024 09:07
jimrarras pushed a commit to jimrarras/medusa that referenced this pull request Jan 28, 2025
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.

4 participants