lib/generators/templates/migration.rb.erb in acts_as_belongable-2.1.2 vs lib/generators/templates/migration.rb.erb in acts_as_belongable-3.0.0
- old
+ new
@@ -1,15 +1,15 @@
+# frozen_string_literal: true
+
class ActsAsBelongableMigration < ActiveRecord::Migration<%= migration_version %>
- def change
- create_table :belongings do |t|
+ def change
+ create_table :belongings do |t|
+ t.references :belonger, polymorphic: true, index: true
+ t.references :belongable, polymorphic: true, index: true
- t.references :belonger, polymorphic: true, index: true
- t.references :belongable, polymorphic: true, index: true
+ t.string :scope
+ t.integer :position
- t.string :scope
- t.integer :position
-
- t.timestamps null: false
-
- end
+ t.timestamps null: false
end
+ end
end