Closed nagi1 closed 3 years ago
Would appreciate a PR 👍
Hey @nagi1 ,
This felt like a breaking change that was not documented appropriately.
If one ran the old migrations pre this PR and updated their composer.json
to a version post this PR, trying to run any approval or rejection would lead to a database exception due to the reason column not being found in the approval or rejection query.
Illuminate\Database\QueryException
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'reason' in 'where clause' (SQL: select * from `approvals` where (`approver_id` = 34 and `approver_type` = App\User and `modification_id` = 726 and `reason` is null) limit 1)
The readme.md
should have contained this information as an upgrade note and allowed users to create a migration that added the reason
column to their Approvals
models (or rather any of the schemas that were modified). I do not believe this affects new users as their migrations will contain the reason
column.
Hey @maggz69, You're absolutely right! I had this problem personally :) but didn't find the time at all to fix, properly document this!
I love everything about this package but one thing, we as humans always need to know why our request rejected.
It would be wonderful if reason field was added to approval and disapproval models for references.
I'm open to PR this idea :)
Thanks.