discourse/db/migrate/20120705181724_add_user_to_...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

10 lines
263 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AddUserToVersions < ActiveRecord::Migration[4.2]
2013-02-05 14:16:51 -05:00
def change
execute "UPDATE versions SET user_type = 'User', user_id = posts.user_id
FROM posts
WHERE posts.id = versions.versioned_id"
end
end