This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
barleysodas/db/migrate/006_create_discussions.rb

18 lines
519 B
Ruby

class CreateDiscussions < ActiveRecord::Migration
def self.up
create_table :discussions do |t|
t.column :page_id, :integer
t.column :text, :text
t.column :created_at, :timestamp
end
add_column :pages, :allow_discussions, :boolean, :default => false
add_column :page_versions, :allow_discussions, :boolean, :default => false
end
def self.down
drop_table :discussions
remove_column :pages, :allow_discussions
remove_column :page_versions, :allow_discussions
end
end