Sha256: a79dc091b1f337acc210cee03ee3031e100c530a7fe5b7df5314ed1113e856bd

Contents?: true

Size: 622 Bytes

Versions: 10

Compression:

Stored size: 622 Bytes

Contents

class CreatePageAttachments < ActiveRecord::Migration[5.1]
  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

10 entries across 10 versions & 2 rubygems

Version Path
trusty-cms-3.3.2 db/migrate/031_create_page_attachments.rb
trusty-cms-3.3.1 db/migrate/031_create_page_attachments.rb
trusty-cms-3.2.1 db/migrate/031_create_page_attachments.rb
trusty-cms-3.3.0 db/migrate/031_create_page_attachments.rb
trusty-cms-3.2.0 db/migrate/031_create_page_attachments.rb
trusty-clipped-extension-3.1.4 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-3.1.3 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-3.1.2 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-3.1.1 db/migrate/004_create_page_attachments.rb
trusty-clipped-extension-3.1.0 db/migrate/004_create_page_attachments.rb