Commit 0b946a7b authored by Stan Hu's avatar Stan Hu

Merge branch 'fix-issue-assignee-trigger' into 'master'

Check if OLD is set when migrating issue assignees

Closes #32439

See merge request !11461
parents 92d1e26a cb4ee4b1
...@@ -47,7 +47,7 @@ class MigrateAssigneeToSeparateTable < ActiveRecord::Migration ...@@ -47,7 +47,7 @@ class MigrateAssigneeToSeparateTable < ActiveRecord::Migration
RETURNS trigger AS RETURNS trigger AS
$BODY$ $BODY$
BEGIN BEGIN
if OLD.assignee_id IS NOT NULL THEN if OLD IS NOT NULL AND OLD.assignee_id IS NOT NULL THEN
DELETE FROM issue_assignees WHERE issue_id = OLD.id; DELETE FROM issue_assignees WHERE issue_id = OLD.id;
END IF; END IF;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment