discourse/db/migrate/20120727150428_rename_invisible.rb

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

10 lines
324 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class RenameInvisible < ActiveRecord::Migration[4.2]
2013-02-06 03:16:51 +08:00
def change
add_column :forum_threads, :visible, :boolean, default: true, null: false
execute "UPDATE forum_threads SET visible = CASE WHEN invisible THEN false ELSE true END"
remove_column :forum_threads, :invisible
end
end