rswag/test-app/db/migrate/20160218212104_create_blogs.rb
2017-07-04 09:45:33 +04:30

18 lines
407 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.string :thumbnail
t.timestamps
end
end
end