Class: OpenWFE::Extras::ProcessErrorTables

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/openwfe/extras/expool/dberrorjournal.rb

Overview

A migration for creating/dropping the “process errors” table, the content of this table makes up for an error journal.

There is one record per process error, the log journal can be easily rebuilt by doing find_all_by_wfid().

Class Method Summary collapse

Class Method Details

.downObject



73
74
75
76
# File 'lib/openwfe/extras/expool/dberrorjournal.rb', line 73

def self.down

    drop_table :process_errors
end

.upObject



61
62
63
64
65
66
67
68
69
70
71
# File 'lib/openwfe/extras/expool/dberrorjournal.rb', line 61

def self.up

    create_table :process_errors do |t|

        t.column :wfid, :string, :null => false
        t.column :svalue, :text, :null => false
            # 'value' could be reserved, using 'svalue' instead
            # It stands for 'serialized value'.
    end
    add_index :process_errors, :wfid
end