"Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for"
This commit is contained in:
parent
2b0a7708e6
commit
66a0d50baf
|
@ -51,7 +51,7 @@ class Device < Product
|
|||
end
|
||||
|
||||
#migrations
|
||||
class CreateAllTables < ActiveRecord::Migration
|
||||
class CreateAllTables < ActiveRecord::VERSION::MAJOR >= 5 ? ActiveRecord::Migration[5.0] : ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table(:gem_defined_models) { |t| t.string :name; t.integer :age }
|
||||
create_table(:users) {|t| t.string :name; t.integer :age}
|
||||
|
|
Loading…
Reference in New Issue