Sha256: d1b2420ac04e2308ffa10901742a54e5d1368d8e12e79f997b38bba908e469f0

Contents?: true

Size: 363 Bytes

Versions: 20

Compression:

Stored size: 363 Bytes

Contents

class CreateComments < ActiveRecord::Migration
  def self.up
    create_table :comments do |t|
      t.integer :entry_id
      t.string :name
      t.string :email
      t.string :url
      t.text :body

      t.timestamps
    end

    add_index :comments, :entry_id
  end

  def self.down
    remove_index :comments, :entry_id
    drop_table :comments
  end
end

Version data entries

20 entries across 10 versions & 1 rubygems

Version Path
jabe-0.5.9 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.9 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.8 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.8 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.7 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.7 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.6 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.6 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.5 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.5 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.4 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.4 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.3 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.3 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.2 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.2 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.1 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.1 lib/generators/jabe/templates/migrations/create_comments.rb
jabe-0.5.0 test/dummy/db/migrate/20101229224031_create_comments.rb
jabe-0.5.0 lib/generators/jabe/templates/migrations/create_comments.rb