Skip to content

Add new field isApplicationPageActive to the Job model #169

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

Conversation

imcaizheng
Copy link
Contributor

Verification

isApplicationPageActive in Job creation

  • Set the value of isApplicationPageActive by m2m user when creating a job:

    success_with_m2m_user

  • Setting the value of isApplicationPageActive by adminstrator when creating a job results in 403 error:

    403_with_admin

  • Setting the value of isApplicationPageActive to null when creating a job is forbidden:

    null_value_not_allow

isApplicationPageActive in Job updating

  • Update the value of isApplicationPageActive by m2m user when updating a job:

    success_with_m2m_user

  • Updating the value of isApplicationPageActive by adminstrator when updating a job results in 403 error:

    403_with_admin

  • Updating the value of isApplicationPageActive to null when updating a job is forbidden:

    null_value_not_allow

Copy link
Contributor

@maxceem maxceem left a comment

Choose a reason for hiding this comment

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

Thank you @imcaizheng, all works good.

up: queryInterface => {
return Promise.all([
queryInterface.sequelize.query('ALTER TABLE bookings.jobs ADD is_application_page_active BOOLEAN NOT NULL DEFAULT false'),
queryInterface.sequelize.query('UPDATE bookings.jobs SET is_application_page_active=false WHERE is_application_page_active is NULL'),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we don't need this second query UPDATE bookings.jobs SET is_application_page_active=false WHERE is_application_page_active is NULL as the previous one would already set all the values bye default, and it also sets NOT NUL so there cannot be null values.

But it doesn't harm either.

@nkumar-topcoder nkumar-topcoder merged commit 8f1d3bb into topcoder-platform:dev Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants