[Fix] Bookmark column to support null
#9009
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Resolves #8977
👋 Introduction
Without a default value/nullable the bookmark column was causing issues for existing rows. This updates the migration to make it nullable with null as a default value. As well, it makes the field optional in the factory so we can simulate this locally as well.
🕵️ Details
I wasn't sure if we had already ran this migration but the AC mentioned updating the migration instead of creating a new one. If we have and it would be safer to create a new migration, let me know and I can fix that.
🧪 Testing
docker-compose exec -w /home/site/wwwroot/api webserver sh -c "php artisan migrate"
/graphiql
docker-compose exec -w /home/site/wwwroot/api webserver sh -c "php artisan migrate:fresh --seed"
null
,true
,false
bookmarked candidatesnull
fromnull
totrue
from thegrappql
mutationtrue
andfalse