To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / vendor / plugins / acts_as_versioned / test / fixtures / migrations / 1_add_versioned_tables.rb @ 442:753f1380d6bc

History | View | Annotate | Download (269 Bytes)

1
class AddVersionedTables < ActiveRecord::Migration
2
  def self.up
3
    create_table("things") do |t|
4
      t.column :title, :text
5
    end
6
    Thing.create_versioned_table
7
  end
8
  
9
  def self.down
10
    Thing.drop_versioned_table
11
    drop_table "things" rescue nil
12
  end
13
end