mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-14 15:16:04 +10:00
Fixed locking syntax for PostgreSQL
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user