aboutsummaryrefslogtreecommitdiffstats
path: root/test/fixtures/migrations/1_add_versioned_tables.rb
blob: 5007b16ada46a1aa8db0309c09e9f91f59034bf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class AddVersionedTables < ActiveRecord::Migration
  def self.up
    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
    Thing.drop_versioned_table
    drop_table "things" rescue nil
  end
end