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-09-27 02:19:14 -04:00
|
|
|
class CreatePages < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table :pages do |t|
|
|
|
|
t.column :title, :string
|
|
|
|
t.column :redcloth, :text
|
|
|
|
t.column :html, :text
|
|
|
|
t.column :owner_id, :integer
|
|
|
|
t.column :owner_type, :string, :limit => 32
|
|
|
|
t.column :version, :integer
|
2008-01-02 02:58:03 -05:00
|
|
|
t.column :created_by, :integer
|
|
|
|
t.column :updated_by, :integer
|
2007-09-27 02:19:14 -04:00
|
|
|
end
|
|
|
|
add_index :pages, :owner_id
|
2008-01-02 02:58:03 -05:00
|
|
|
add_index :pages, :created_by
|
|
|
|
add_index :pages, :updated_by
|
2007-09-27 02:19:14 -04:00
|
|
|
Page.create_versioned_table
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :pages
|
|
|
|
Page.drop_versioned_table
|
|
|
|
end
|
|
|
|
end
|