Class: CreatePages

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/db/migrate/20091229164415_create_pages.rb

Class Method Summary collapse

Class Method Details

.downObject



15
16
17
18
# File 'lib/db/migrate/20091229164415_create_pages.rb', line 15

def self.down
  remove_index :pages, :title_slug
  drop_table :pages
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/db/migrate/20091229164415_create_pages.rb', line 2

def self.up
  create_table :pages do |t|
    t.string :title
    t.string :title_slug
    t.text :body
    t.text :body_html
    
    t.timestamps
  end
  
  add_index :pages, :title_slug
end