Class: CreateTags

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

Class Method Summary collapse

Class Method Details

.downObject



12
13
14
15
16
# File 'lib/db/migrate/20091227003405_create_tags.rb', line 12

def self.down
  remove_index :tags, :slug
  
  drop_table :tags
end

.upObject



2
3
4
5
6
7
8
9
10
# File 'lib/db/migrate/20091227003405_create_tags.rb', line 2

def self.up
  create_table :tags do |t|
    t.string :slug
    
    t.timestamps
  end
  
  add_index :tags, :slug
end