summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20091225164732_remove_enumerations_opt.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20091225164732_remove_enumerations_opt.rb b/db/migrate/20091225164732_remove_enumerations_opt.rb
new file mode 100644
index 000000000..72c39e05b
--- /dev/null
+++ b/db/migrate/20091225164732_remove_enumerations_opt.rb
@@ -0,0 +1,12 @@
+class RemoveEnumerationsOpt < ActiveRecord::Migration
+ def self.up
+ remove_column :enumerations, :opt
+ end
+
+ def self.down
+ add_column :enumerations, :opt, :string, :limit => 4, :default => '', :null => false
+ Enumeration.update_all("opt = 'IPRI'", "type = 'IssuePriority'")
+ Enumeration.update_all("opt = 'DCAT'", "type = 'DocumentCategory'")
+ Enumeration.update_all("opt = 'ACTI'", "type = 'TimeEntryActivity'")
+ end
+end