Sha256: 56afd4f68212a8aebcb2cefcc39908ab79c6181cbd09fdd5d2b4e0d9fb0190af

Contents?: true

Size: 487 Bytes

Versions: 75

Compression:

Stored size: 487 Bytes

Contents

class ChangeDriverPolymorphicToBelongsToExtfaceDevices < ActiveRecord::Migration
  def up
    remove_index :extface_devices, [:driveable_id, :driveable_type]
    remove_column :extface_devices, :driveable_type
    rename_column :extface_devices, :driveable_id, :driver_id
  end
  
  def down
    rename_column :extface_devices, :driver_id, :driveable_id
    add_column :extface_devices, :driveable_type, :string
    add_index :extface_devices, [:driveable_id, :driveable_type]
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
extface-0.7.3 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.7.2 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.7.1 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.7.0 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.9 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.8 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.7 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.6 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.5 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.4 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.3 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.2 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.1 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.6.0 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.5.9 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.5.8 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.5.7 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.5.6 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.5.5 db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
extface-0.5.4b db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb