Skip to content

Commit

Permalink
Rails 5: Use versioned migration
Browse files Browse the repository at this point in the history
  • Loading branch information
ledermann committed May 26, 2016
1 parent 57d95ad commit cfd9e6c
Showing 1 changed file with 7 additions and 1 deletion.
@@ -1,4 +1,10 @@
class RailsSettingsMigration < ActiveRecord::Migration
MIGRATION_BASE_CLASS = if ActiveRecord::VERSION::MAJOR >= 5
ActiveRecord::Migration[5.0]
else
ActiveRecord::Migration
end

class RailsSettingsMigration < MIGRATION_BASE_CLASS
def self.up
create_table :settings do |t|
t.string :var, :null => false
Expand Down

0 comments on commit cfd9e6c

Please sign in to comment.