Class: Ripe::DB::WorkerMigration

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

Overview

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

Class Method Summary collapse

Class Method Details

.downObject

Destroy model in database.



35
36
37
# File 'lib/ripe/db/worker_migration.rb', line 35

def self.down
  drop_table :workers
end

.upObject

Create model in database.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/ripe/db/worker_migration.rb', line 14

def self.up
  create_table :workers do |t|
    t.string  :cpu_used
    t.string  :exit_code
    t.string  :handle
    t.string  :host
    t.string  :moab_id
    t.string  :memory_used
    t.integer :ppn
    t.string  :queue
    t.string  :time
    t.string  :status, default: :unprepared
    t.string  :walltime
    t.string  :user
    t.string  :project_name
  end
end