mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 13:31:44 +08:00
10 lines
324 B
Ruby
10 lines
324 B
Ruby
# frozen_string_literal: true
|
|
|
|
class RenameInvisible < ActiveRecord::Migration[4.2]
|
|
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
|