diff options
author | Stan Hu <stanhu@gmail.com> | 2017-05-17 23:15:41 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-05-17 23:15:41 +0000 |
commit | 0b946a7bc69058a952a558a9530cd3e8302361e7 (patch) | |
tree | d5af4264252c434da72f20df20c8d4236c1a49b1 | |
parent | 92d1e26ac8f636fa46523578d645149b9b0e52cd (diff) | |
parent | cb4ee4b1314de77554db10645c5f2f5717088f63 (diff) | |
download | gitlab-ce-0b946a7bc69058a952a558a9530cd3e8302361e7.tar.gz |
Merge branch 'fix-issue-assignee-trigger' into 'master'
Check if OLD is set when migrating issue assignees
Closes #32439
See merge request !11461
-rw-r--r-- | db/migrate/20170516153305_migrate_assignee_to_separate_table.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb b/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb index f269ca7fc34..eed9f00d8b2 100644 --- a/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb +++ b/db/migrate/20170516153305_migrate_assignee_to_separate_table.rb @@ -47,7 +47,7 @@ class MigrateAssigneeToSeparateTable < ActiveRecord::Migration RETURNS trigger AS $BODY$ 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; END IF; |