mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-22 22:06:43 +00:00
17 lines
381 B
Ruby
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
|