schleyfox / gigantron

Framework for Data Processing

This URL has Read+Write access

gigantron / test / template_migration.rb
100644 17 lines (13 sloc) 0.241 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class CreateFoos < ActiveRecord::Migration
  def self.up
    create_table :foos do |t|
      t.string :title
    end
 
    %w(Foo Bar).each do |t|
      Foo.new(:title => t).save
    end
  end
 
  def self.down
    drop_table :foos
  end
end