Class: CreateDogs
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- CreateDogs
- Defined in:
- lib/tasks/templates/migrate/050_create_dogs.rb
Class Method Summary collapse
Class Method Details
.down ⇒ Object
14 15 16 |
# File 'lib/tasks/templates/migrate/050_create_dogs.rb', line 14 def self.down drop_table :dogs end |
.up ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/tasks/templates/migrate/050_create_dogs.rb', line 2 def self.up create_table :dogs do |t| t.string :name, :null => false t.string :color, :null => true t.text :description, :null => true t.integer :fleas, :null => true t. end add_index :dogs, :name end |