Class: ChangeWebVulnsConfidenceToInteger

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
db/migrate/20130515164311_change_web_vulns_confidence_to_integer.rb

Overview

Changes web_vulns.confidence from text to integer as it is populated with integers.

Constant Summary collapse

COLUMN =

Columns in TABLE whose type needs to be change.

:confidence
NEW_TYPE =

The correct type for COLUMN.

:integer
OLD_TYPE =

The incorrect type for COLUMN.

:text
TABLE =

The table in which COLUMN is defined.

:web_vulns

Instance Method Summary collapse

Instance Method Details

#downvoid

This method returns an undefined value.

Changes web_vulns.confidence back to text



23
24
25
# File 'db/migrate/20130515164311_change_web_vulns_confidence_to_integer.rb', line 23

def down
  alter_type(:to => OLD_TYPE)
end

#upvoid

This method returns an undefined value.

Changes web_vulns.confidence to integer



30
31
32
# File 'db/migrate/20130515164311_change_web_vulns_confidence_to_integer.rb', line 30

def up
  alter_type(:to => NEW_TYPE)
end