Sha256: 2a5809a278f340e1767ccfa4d31de4c2a2ae164e7702f3b7d941d7616fae11da

Contents?: true

Size: 351 Bytes

Versions: 4

Compression:

Stored size: 351 Bytes

Contents

# Creates the table for the category model.
# origin: M
class CreateCategory < ActiveRecord::Migration
  def self.up
    create_table :categories do |t|
      t.string :name
      t.string :ancestry
      t.integer :mother_id
      t.timestamps
    end
    add_index :categories, :mother_id
  end

  def self.down
    drop_table :categories
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
serum-rails-0.2.1 spec/test_apps/rails-2-3/db/migrate/20110118093503_create_category.rb
serum-rails-0.2.0 spec/test_apps/rails-2-3/db/migrate/20110118093503_create_category.rb
serum-rails-0.1.1 spec/test_app/db/migrate/20110118093503_create_category.rb
serum-rails-0.1.0 spec/test_app/db/migrate/20110118093503_create_category.rb