discourse/db/migrate/20120727150428_rename_invisible.rb

10 lines
290 B
Ruby
Raw Normal View History

2013-02-05 14:16:51 -05:00
class RenameInvisible < ActiveRecord::Migration
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