Class: Ripe::DB::TaskMigration

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/ripe/db/task_migration.rb

Overview

This class creates and destroys the Task model in the internal database.

Class Method Summary collapse

Class Method Details

.downObject

Destroy model in database.



25
26
27
# File 'lib/ripe/db/task_migration.rb', line 25

def self.down
  drop_table :tasks
end

.upObject

Create model in database.



14
15
16
17
18
19
20
# File 'lib/ripe/db/task_migration.rb', line 14

def self.up
  create_table :tasks do |t|
    t.belongs_to :worker
    t.string     :sample
    t.string     :block
  end
end