Closed MarchandMD closed 1 week ago
Looks good so far,
@ianperera
- I don't believe the promoted_templates table will be queried frequently enough to necessitate this index, though I'd listen to arguments in favor of one
- Considering the values will be similar to: daily, weekly, monthly, etc, I feel like integers wouldn't be appropriate.
@ianperera
typo, I meant enum.
Enum would be an unnecessary obfuscation, IMO. The idea of an "expected cadence" is already somewhat opaque, and considering all the potential values (daily, weekly, monthly, quarterly, one-time, adhoc, etc) the most informative and simplest way to store this information for each record is it's actual text value, as opposed to a representation of its value. The reason being, if an expected cadence for a single record is needed, we as engineers would be able to observe a single record and determine its expected cadence without needing to reference the base model to decipher its value from an enum key. IMO.
@MarchandMD before you ask for more approvals, please update the title to follow this convention (necessary for the release notes): PORTAL-2480 - blah blah
Also, this needs to be deployed to Dev to be able to merge (please use the branch name for both the 'workflow' and the 'branch name' in the action, so that the deploy properly links back to this PR) and then run the DB downgrade action, and both of those runs linked in your testing notes. Happy to help if that's unclear. Thank you!
Enum would be an unnecessary obfuscation, IMO. The idea of an "expected cadence" is already somewhat opaque, and considering all the potential values (daily, weekly, monthly, quarterly, one-time, adhoc, etc) the most informative and simplest way to store this information for each record is it's actual text value, as opposed to a representation of its value. The reason being, if an expected cadence for a single record is needed, we as engineers would be able to observe a single record and determine its expected cadence without needing to reference the base model to decipher its value from an enum key. IMO.
as engineers, if we document the enum values clearly, it would be easy to understand.
@cris-oddball With the help of you and Evan I was able to successfully perform both actions.
The PR description has been updated with links to both of those runs.
Please LMK if there's anything else I can do to expedite this PR! Thank you!
@MarchandMD thank you! If you want the llamas to review, you'll need to ask for that review. I think both Ian and Nathan are in our engineering channel and they can ask for you - see what they say?
Description
Adds the
expected_cadence
text field to thepromoted_templates
tableissue 2480 of the notification-portal
How Has This Been Tested?
ran
flask db upgrade
and thenflask db downgrade
locallydeploy to dev - api action run successful - verifies migration run successfully DB downgrade action run successful - verifies migration rollback successful
Checklist