summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-06-14 12:17:41 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2016-06-14 12:19:38 +0200
commitc6744b49497fca340c8ee5b9913f805ec8ea9be8 (patch)
tree0d299572c979e89ead69cef57dff7028037fdbe6 /db
parentd032c6b0ff77a9a7568e1be8c728e252ddc1b11a (diff)
downloadgitlab-ce-c6744b49497fca340c8ee5b9913f805ec8ea9be8.tar.gz
Fixed locking syntax for PostgreSQL
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160416182152_convert_award_note_to_emoji_award.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
index 6d57b796151..95ee03611d9 100644
--- a/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
+++ b/db/migrate/20160416182152_convert_award_note_to_emoji_award.rb
@@ -19,7 +19,7 @@ class ConvertAwardNoteToEmojiAward < ActiveRecord::Migration
def migrate_postgresql
connection.transaction do
- execute 'LOCK notes IN EXCLUSIVE'
+ execute 'LOCK notes IN EXCLUSIVE MODE'
execute "INSERT INTO award_emoji (awardable_type, awardable_id, user_id, name, created_at, updated_at) (SELECT noteable_type, noteable_id, author_id, note, created_at, updated_at FROM notes WHERE is_award = true)"
execute "DELETE FROM notes WHERE is_award = true"
remove_column :notes, :is_award, :boolean