Sha256: 349d49ffa7e113ebe6e75314a8383e259892fd6c5f8675b2635712b857b0f257

Contents?: true

Size: 553 Bytes

Versions: 18

Compression:

Stored size: 553 Bytes

Contents

module Comatose
  class Page < ActiveRecord::Base
    set_table_name 'comatose_pages'
    acts_as_versioned :if_changed => [:title, :slug, :keywords, :body]
  end
end

class <%= class_name %> < ActiveRecord::Migration

  # Upgrades schema from version 0.6 to version 0.7 
  def self.up
    add_column :comatose_pages, "version", :integer
    Comatose::Page.create_versioned_table
  end

  # Downgrades schema from version 0.7 to version 0.6
  def self.down
    Comatose::Page.drop_versioned_table
    remove_column :comatose_pages, "version"
  end

end

Version data entries

18 entries across 18 versions & 6 rubygems

Version Path
aslakjo-aslakjo-comatose-2.0.5.1 generators/comatose_migration/templates/v7_upgrade.rb
aslakjo-comatose-2.0.5.2 generators/comatose_migration/templates/v7_upgrade.rb
aslakjo-comatose-2.0.5.3 generators/comatose_migration/templates/v7_upgrade.rb
darthapo-comatose-2.0.3 generators/comatose_migration/templates/v7_upgrade.rb
darthapo-comatose-2.0.4 generators/comatose_migration/templates/v7_upgrade.rb
darthapo-comatose-2.0.5 generators/comatose_migration/templates/v7_upgrade.rb
darthapo-comatose-2.0 generators/comatose_migration/templates/v7_upgrade.rb
jcnetdev-comatose-2.0.1 generators/comatose_migration/templates/v7_upgrade.rb
staugaard-comatose-2.0.2 generators/comatose_migration/templates/v7_upgrade.rb
staugaard-comatose-2.0.3 generators/comatose_migration/templates/v7_upgrade.rb
comatose-2.0.5 generators/comatose_migration/templates/v7_upgrade.rb
comatose-2.0.1 generators/comatose_migration/templates/v7_upgrade.rb
aslakjo-comatose-2.0.5.12 generators/comatose_migration/templates/v7_upgrade.rb
aslakjo-comatose-2.0.5.11 generators/comatose_migration/templates/v7_upgrade.rb
aslakjo-comatose-2.0.5.10 generators/comatose_migration/templates/v7_upgrade.rb
aslakjo-comatose-2.0.5.9 generators/comatose_migration/templates/v7_upgrade.rb
aslakjo-comatose-2.0.5.8 generators/comatose_migration/templates/v7_upgrade.rb
aslakjo-comatose-2.0.5.7 generators/comatose_migration/templates/v7_upgrade.rb