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(customer): add migration file #6205

Merged
merged 2 commits into from
Jan 25, 2024
Merged

feat(customer): add migration file #6205

merged 2 commits into from
Jan 25, 2024

Conversation

srindom
Copy link
Collaborator

@srindom srindom commented Jan 24, 2024

No description provided.

Copy link

changeset-bot bot commented Jan 24, 2024

⚠️ No Changeset found

Latest commit: 89ec9d0

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 Jan 24, 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 Jan 25, 2024 4:29pm
3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
api-reference ⬜️ Ignored (Inspect) Jan 25, 2024 4:29pm
docs-ui ⬜️ Ignored (Inspect) Visit Preview Jan 25, 2024 4:29pm
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Jan 25, 2024 4:29pm

@srindom
Copy link
Collaborator Author

srindom commented Jan 24, 2024

@carlos-r-l-rodrigues redid the file please take another look

Copy link
Contributor

@carlos-r-l-rodrigues carlos-r-l-rodrigues left a comment

Choose a reason for hiding this comment

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

LGTM
It is just missing the create table customer if not exists.

@carlos-r-l-rodrigues
Copy link
Contributor

Sorry, I just spotted a couple of other details.
customer_group table is also not being created if not exists, and we have to add the delete_at to it. (indexes created on this table also need the where delete_at is null)

All the tables involved in public methods exposed by the module will have to be "soft deletable", that way the workflows can restore it if needed.

@srindom srindom changed the base branch from feat/cusmod-interface to develop January 25, 2024 13:50
@srindom
Copy link
Collaborator Author

srindom commented Jan 25, 2024

Sorry, I just spotted a couple of other details.
customer_group table is also not being created if not exists, and we have to add the delete_at to it. (indexes created on this table also need the where delete_at is null)
All the tables involved in public methods exposed by the module will have to be "soft deletable", that way the workflows can restore it if needed.

@carlos-r-l-rodrigues - Is there something that needs to be done from a MikroORM perspective for this to work properly right now I just added it in the raw SQL?

@srindom
Copy link
Collaborator Author

srindom commented Jan 25, 2024

Seems like it's only supported through custom expressions mikro-orm/mikro-orm#2837

So this should be sufficient right?

@carlos-r-l-rodrigues
Copy link
Contributor

Seems like it's only supported through custom expressions mikro-orm/mikro-orm#2837

So this should be sufficient right?

Correct. if we want to auto generate that.
for the if [not] exists I haven't found anything

@kodiakhq kodiakhq bot merged commit 21c1c5c into develop Jan 25, 2024
16 checks passed
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