Sha256: 826d65dd9d62476e9e8fae305397bac0e12a1598242fe99f48d4076fbf32680e

Contents?: true

Size: 622 Bytes

Versions: 106

Compression:

Stored size: 622 Bytes

Contents

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

106 entries across 106 versions & 1 rubygems

Version Path
trusty-cms-4.2.3 db/migrate/031_create_page_attachments.rb
trusty-cms-4.2.2 db/migrate/031_create_page_attachments.rb
trusty-cms-4.2.1 db/migrate/031_create_page_attachments.rb
trusty-cms-4.2 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.9 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.8 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.7 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.6 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.5 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.4 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.3 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.2 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.1 db/migrate/031_create_page_attachments.rb
trusty-cms-4.1.0 db/migrate/031_create_page_attachments.rb
trusty-cms-4.0.2 db/migrate/031_create_page_attachments.rb
trusty-cms-3.9.7 db/migrate/031_create_page_attachments.rb
trusty-cms-3.9.6 db/migrate/031_create_page_attachments.rb
trusty-cms-3.9.5 db/migrate/031_create_page_attachments.rb
trusty-cms-4.0.1 db/migrate/031_create_page_attachments.rb
trusty-cms-3.9.4 db/migrate/031_create_page_attachments.rb