To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / db / migrate / 20091225164732_remove_enumerations_opt.rb @ 1298:4f746d8966dd
History | View | Annotate | Download (442 Bytes)
| 1 |
class RemoveEnumerationsOpt < ActiveRecord::Migration |
|---|---|
| 2 |
def self.up |
| 3 |
remove_column :enumerations, :opt |
| 4 |
end
|
| 5 |
|
| 6 |
def self.down |
| 7 |
add_column :enumerations, :opt, :string, :limit => 4, :default => '', :null => false |
| 8 |
Enumeration.update_all("opt = 'IPRI'", "type = 'IssuePriority'") |
| 9 |
Enumeration.update_all("opt = 'DCAT'", "type = 'DocumentCategory'") |
| 10 |
Enumeration.update_all("opt = 'ACTI'", "type = 'TimeEntryActivity'") |
| 11 |
end
|
| 12 |
end
|