test-app/db/migrate/20160218212104_create_blogs.rb

Summary

Maintainability
A
0 mins
Test Coverage
migration_class = if Gem::Version.new(Rails.version) >= Gem::Version.new("5.0")
                    ActiveRecord::Migration[4.2]
                  else
                    ActiveRecord::Migration
                  end

class CreateBlogs < migration_class
  def change
    create_table :blogs do |t|
      t.string :title
      t.text :content
      t.string :thumbnail
      t.string :status

      t.timestamps
    end
  end
end