I have mytable
which has 3 integer fields: id
, status
, project_id
.
I've told people that they should not progress status past 4 before assigning it a project_id
value. Naturally people don't listen and then there are problems down the road.
Is there a way to return an error if someone tries to update from status 4 to 5 while project_id
column is null
? I still need people to be able to update status from 2 or 3 to status 4 regardless of it having a project_id
.