Sha256: 5389ba4deea512e26bf8daaecd0e8b21aaed8565de1b2870d3b5b13003c64cf7

Contents?: true

Size: 532 Bytes

Versions: 6

Compression:

Stored size: 532 Bytes

Contents

class AddElementTypeToAttachmentsElements < ActiveRecord::Migration
  def self.up
    change_table :attachments_elements do |t|
      t.string :element_type,
        :attachment_type
      t.column :id, :primary_key
    end
    rename_table :attachments_elements, :attachment_links
  end

  def self.down
    rename_table :attachment_links, :attachments_elements 
    remove_column :attachments_elements, :element_type
    remove_column :attachments_elements, :attachment_type
    remove_column :attachments_elements, :id
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
forgeos_core-1.9.5.rc2 db/migrate/20091106163507_add_element_type_to_attachments_elements.rb
forgeos_core-1.9.5.rc1 db/migrate/20091106163507_add_element_type_to_attachments_elements.rb
forgeos_core-1.9.4 db/migrate/20091106163507_add_element_type_to_attachments_elements.rb
forgeos_core-1.9.3 db/migrate/20091106163507_add_element_type_to_attachments_elements.rb
forgeos_core-1.9.2 db/migrate/20091106163507_add_element_type_to_attachments_elements.rb
forgeos_core-1.9.1 db/migrate/20091106163507_add_element_type_to_attachments_elements.rb