Sha256: 44f808be8ccd6da4cf90809e65879bd9e70817ffa814290c7fe4f2c7cabad518

Contents?: true

Size: 291 Bytes

Versions: 7

Compression:

Stored size: 291 Bytes

Contents

migration_class =
  if ActiveRecord::VERSION::MAJOR >= 5
    ActiveRecord::Migration[4.2]
  else
    ActiveRecord::Migration
  end

class CreatePosts < migration_class
  def change
    create_table :posts do |t|
      t.string :title
      t.text :body

      t.timestamps
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
archiving-0.6.1 test/dummy/db/migrate/20140220134827_create_posts.rb
archiving-0.6.0 test/dummy/db/migrate/20140220134827_create_posts.rb
archiving-0.5.0 test/dummy/db/migrate/20140220134827_create_posts.rb
archiving-0.4.4 test/dummy/db/migrate/20140220134827_create_posts.rb
archiving-0.4.3 test/dummy/db/migrate/20140220134827_create_posts.rb
archiving-0.4.1 test/dummy/db/migrate/20140220134827_create_posts.rb
archiving-0.4.0 test/dummy/db/migrate/20140220134827_create_posts.rb