rswag/test-app/db/migrate/20160218212104_create_blogs.rb
2017-05-18 11:47:40 +02:00

17 lines
381 B
Ruby

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.timestamps
end
end
end