-
Notifications
You must be signed in to change notification settings - Fork 914
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: data migration for styling fixes #2640
Conversation
The latest updates on your projects. Learn more about Vercel for Git 鈫楋笌 2 Ignored Deployments
|
Thank you for following the naming conventions for pull request titles! 馃檹 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pandeymangg thanks for the PR :-) Looks good in general; I only have small suggestions for improvements :-)
|
||
for (const survey of surveysWithProductOverwrites) { | ||
if (survey.productOverwrites) { | ||
const { brandColor, highlightBorderColor, ...rest } = survey.productOverwrites; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to add a check here if brandColor
& highlightColor
is defined and only then update the survey. Because otherwise if the data-migration runs multiple times the surveys will be updated again.
packages/database/data-migrations/20240320090315_add_form_styling/data-migration-fix.ts
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pandeymangg thanks for making the changes; looks great!! 馃槉馃挭
What does this PR do?
Fixes a bug in the data migration script which leads to ignoring the product overwrites for the products that have default styling
Fixes #2625 (issue)
How should this be tested?
Checklist
Required
pnpm build
console.logs
git pull origin main
Appreciated