Sha256: 5a5bb20e9989fbf92ac84c7b47bb1a550b27114c5f3cd5155120a1efbe12faaa

Contents?: true

Size: 452 Bytes

Versions: 9

Compression:

Stored size: 452 Bytes

Contents

class AddVersionedTables < ActiveRecord::Migration
  
  def self.up
    drop_table :things rescue nil
    drop_table :thing_versions rescue nil
    create_table :things do |t|
      t.column :title, :text
      t.column :price, :decimal, :precision => 7, :scale => 2
      t.column :type, :string
    end
    Thing.create_versioned_table
  end
  
  def self.down
    drop_table :things rescue nil
    drop_table :thing_versions rescue nil
  end
  
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
decisiv-acts_as_versioned-0.6.1 test/migrations/1_add_versioned_tables.rb
decisiv-acts_as_versioned-0.6.2.1 test/migrations/1_add_versioned_tables.rb
decisiv-acts_as_versioned-0.6.3.1 test/migrations/1_add_versioned_tables.rb
metaskills-acts_as_versioned-0.6.0 test/migrations/1_add_versioned_tables.rb
metaskills-acts_as_versioned-0.6.1 test/migrations/1_add_versioned_tables.rb
metaskills-acts_as_versioned-0.6.2 test/migrations/1_add_versioned_tables.rb
metaskills-acts_as_versioned-0.6.3 test/migrations/1_add_versioned_tables.rb
xmlblog-acts_as_versioned-0.6.4 test/migrations/1_add_versioned_tables.rb
xmlblog-acts_as_versioned-0.6.5 test/migrations/1_add_versioned_tables.rb