Sha256: 21c18d22d4b8433ac649aba5fbc673b0201ee4ce10e2c55421c6647cdee697be

Contents?: true

Size: 441 Bytes

Versions: 4

Compression:

Stored size: 441 Bytes

Contents

class AddNotifiedObject < ActiveRecord::Migration
  def self.up
    change_table :notifications do |t|
      t.references :notified_object, :polymorphic => true
      t.remove :object_id
      t.remove :object_type
    end
  end

  def self.down
    change_table :notifications do |t|
      t.remove :notified_object_id
      t.remove :notified_object_type
      t.references :object, :polymorphic => true
    end
  end
end

Version data entries

4 entries across 2 versions & 1 rubygems

Version Path
mailboxer-without-notification-0.11.2 db/migrate/20110719110700_add_notified_object.rb
mailboxer-without-notification-0.11.2 spec/dummy/db/migrate/20120305103201_add_notified_object.rb
mailboxer-without-notification-0.11.1 db/migrate/20110719110700_add_notified_object.rb
mailboxer-without-notification-0.11.1 spec/dummy/db/migrate/20120305103201_add_notified_object.rb