Sha256: 20f8cd7e5389e3e40207aefd8d2284032410c236ee016cc5aa33753b45f8e0cd

Contents?: true

Size: 334 Bytes

Versions: 3

Compression:

Stored size: 334 Bytes

Contents

require 'active_record'

module Wlog
# Add type, id polymorphic fields
# @author Simon Symeonidis
# @date Sun Oct  5 22:43:12 EDT 2014
class FixAttachmentsPolymorphicTable < ActiveRecord::Migration

  def change
    add_column :attachments, :attachable_id, :integer
    add_column :attachments, :attachable_type, :text
  end

end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wlog-1.2.2 lib/wlog/migrations/fix_attachments_polymorphic_table.rb
wlog-1.2.1 lib/wlog/migrations/fix_attachments_polymorphic_table.rb
wlog-1.2.0 lib/wlog/migrations/fix_attachments_polymorphic_table.rb