This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
2007-11-27 20:09:41 -05:00
|
|
|
class CreateDiscussions < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table :discussions do |t|
|
|
|
|
t.column :page_id, :integer
|
|
|
|
t.column :text, :text
|
2007-11-28 01:17:25 -05:00
|
|
|
t.column :created_at, :timestamp
|
2007-11-27 20:09:41 -05:00
|
|
|
end
|
2007-11-28 01:17:25 -05:00
|
|
|
add_column :pages, :allow_discussions, :boolean, :default => false
|
|
|
|
add_column :page_versions, :allow_discussions, :boolean, :default => false
|
2007-11-27 20:09:41 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :discussions
|
2007-11-28 01:17:25 -05:00
|
|
|
remove_column :pages, :allow_discussions
|
|
|
|
remove_column :page_versions, :allow_discussions
|
2007-11-27 20:09:41 -05:00
|
|
|
end
|
|
|
|
end
|