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-6.3.1 db/migrate/031_create_page_attachments.rb
trusty-cms-7.0.2 db/migrate/031_create_page_attachments.rb
trusty-cms-7.0.1 db/migrate/031_create_page_attachments.rb
trusty-cms-7.0.0 db/migrate/031_create_page_attachments.rb
trusty-cms-6.3 db/migrate/031_create_page_attachments.rb
trusty-cms-6.2.1 db/migrate/031_create_page_attachments.rb
trusty-cms-6.2.2.1 db/migrate/031_create_page_attachments.rb
trusty-cms-6.2.0 db/migrate/031_create_page_attachments.rb
trusty-cms-6.1.2 db/migrate/031_create_page_attachments.rb
trusty-cms-6.1.1 db/migrate/031_create_page_attachments.rb
trusty-cms-6.0.5 db/migrate/031_create_page_attachments.rb
trusty-cms-6.0.4 db/migrate/031_create_page_attachments.rb
trusty-cms-6.0.3 db/migrate/031_create_page_attachments.rb
trusty-cms-6.0.2 db/migrate/031_create_page_attachments.rb
trusty-cms-6.0.1 db/migrate/031_create_page_attachments.rb
trusty-cms-5.6.1 db/migrate/031_create_page_attachments.rb
trusty-cms-6.0.0 db/migrate/031_create_page_attachments.rb
trusty-cms-5.6.0 db/migrate/031_create_page_attachments.rb
trusty-cms-5.5.9 db/migrate/031_create_page_attachments.rb
trusty-cms-5.5.8 db/migrate/031_create_page_attachments.rb