lib/generators/templates/migration.rb.erb in sandboxy-2.0.0 vs lib/generators/templates/migration.rb.erb in sandboxy-3.0.0

- old
+ new

@@ -1,14 +1,9 @@ class SandboxyMigration < ActiveRecord::Migration<%= migration_version %> - def self.up - create_table :sandboxy, force: true do |t| - t.references :sandboxed, polymorphic: true, null: false + def change + create_table :sandboxy do |t| + t.references :sandboxed, polymorphic: true, index: true + t.string :environment, index: true t.timestamps end - - add_index :sandboxy, ['sandboxed_id', 'sandboxed_type'], name: 'sandboxy_sandboxed' - end - - def self.down - drop_table :sandboxy end end