Sha256: c481e39de084b476f56752a3140f77149374314bf968963bf12706fc75f9df73

Contents?: true

Size: 712 Bytes

Versions: 2

Compression:

Stored size: 712 Bytes

Contents

class UpgradeTo120 < ActiveRecord::Migration
  def self.up
    if ComfortableMexicanSofa.config.database_config && !Rails.env.test?
      establish_connection "#{ComfortableMexicanSofa.config.database_config}_#{Rails.env}"
    end
    create_table :cms_revisions, :force => true do |t|
      t.string    :record_type
      t.integer   :record_id
      t.text      :data
      t.datetime  :created_at
    end
    add_index :cms_revisions, [:record_type, :record_id, :created_at]
  end

  def self.down
    if ComfortableMexicanSofa.config.database_config && !Rails.env.test?
      establish_connection "#{ComfortableMexicanSofa.config.database_config}_#{Rails.env}"
    end
    drop_table :cms_revisions
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
comfortable_mexican_sofa-1.4.7 db/migrate/upgrades/03_upgrade_to_1_2_0.rb
comfortable_mexican_sofa-1.4.6 db/migrate/upgrades/03_upgrade_to_1_2_0.rb