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