Sha256: 0c388a17e389be854315afd84b7050c3a35db1171d76db892cab66a14eb1dfac

Contents?: true

Size: 617 Bytes

Versions: 57

Compression:

Stored size: 617 Bytes

Contents

class CreatePageAttachments < ActiveRecord::Migration
  def self.up
    # See if a page_attachments table from the original 'page_attachments' extension already exists
    # If so, rename the table to old_page_attachments so they can be migrated later
    if self.connection.tables.include?('page_attachments')
      rename_table :page_attachments, :old_page_attachments
    end
    create_table :page_attachments do |t|
      t.column :asset_id,     :integer
      t.column :page_id,      :integer
      t.column :position,    :integer
    end
    
  end
  
  def self.down
    drop_table :page_attachments
  end
end

Version data entries

57 entries across 57 versions & 5 rubygems

Version Path
trusty-clipped-extension-3.0.0 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.15 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.14 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.13 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.12 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.11 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.10 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.9 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.8 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.7 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.6 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.5 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.4 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.3.pre.beta db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.2.pre.beta db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.1.pre.beta db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-2.0.0.pre.beta db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-1.1.1 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-1.1.0 db/migrate/004_create_page_attachments.rb
radiant-clipped-extension-1.1.2 db/migrate/004_create_page_attachments.rb