Class: AddVersionedTables

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/plugins/acts_as_versioned/test/fixtures/migrations/1_add_versioned_tables.rb

Class Method Summary collapse

Class Method Details

.downObject


9
10
11
12
# File 'lib/plugins/acts_as_versioned/test/fixtures/migrations/1_add_versioned_tables.rb', line 9

def self.down
  Thing.drop_versioned_table
  drop_table "things" rescue nil
end

.upObject


2
3
4
5
6
7
# File 'lib/plugins/acts_as_versioned/test/fixtures/migrations/1_add_versioned_tables.rb', line 2

def self.up
  create_table("things") do |t|
    t.column :title, :text
  end
  Thing.create_versioned_table
end