-
Notifications
You must be signed in to change notification settings - Fork 192
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: Update Forms to Campaigns migration #7532
Conversation
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.
@kjohnson Looks good to me! I just left a comment related to a minor change, but I'll approve it to advance things.
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.
@kjohnson I left a comment about the trash
status, but I am not sure if my point should be a concern. So let me know your thoughts on it.
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.
@kjohnson Thanks for the feedback and update. Great work!
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.
Great work! This is well done and future-proof. 💪
Resolves GIVE-1178
Description
This PR updates the
migrate_forms_to_campaign_forms
migration to remove use of business logic specific code (that is prone to change/refactor) in favor of moving the data directly (or directly as possible) from one database table/column to another.Specifically, this avoids use of the
FormSettings
DTO and theCampaign
model and repository (prone to changes), while continuing to leverageDonationStatus
andCampaignStatus
Enums (unlikely to change).Additionally, this PR updates the migration to add support for "upgraded" forms. This includes a secondary process in the migration that adds upgraded forms to existing campaigns alongside the form resulting from the upgrade process.
The
Campaign
model has been updated with aform()
method to get the "default" form. This is in addition to theforms()
relationship method which returns a prepared query for campaign related donation forms.Pre-review Checklist
@unreleased
tags included in DocBlocks