-
Notifications
You must be signed in to change notification settings - Fork 7
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
[TTAHUB-3484] Insert standard goals #2424
Conversation
Language updated with most recent 10/24 |
Co-authored-by: GarrettEHill <[email protected]>
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.
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.
Looks good. I left a couple of comments.
hash: md5(templateName), | ||
createdAt: new Date(), | ||
updatedAt: new Date(), | ||
templateNameModifiedAt: new Date(), |
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.
It might be helpful to capture new Date()
in a variable, e.g. now
and then use it for all of the dates.
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.
`, { transaction }); | ||
}, | ||
), | ||
}; |
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.
I got an error with the down migration.
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.
Perhaps we could have something like this:
down: async (queryInterface) => queryInterface.sequelize.transaction(
async (transaction) => {
await prepMigration(queryInterface, transaction, __filename);
await queryInterface.bulkDelete(
'GoalTemplates',
{
creationMethod: CREATION_METHOD.CURATED,
templateName: standardGoalTexts,
},
{ transaction }
);
},
),
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.
thanks! 26494f1
Description of change
A database migration to insert the new standard goals into the database
How to test
Issue(s)
Checklists
Every PR
Before merge to main
Production Deploy
After merge/deploy