summaryrefslogtreecommitdiffstats
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160416072926_remove_position_defaults.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20160416072926_remove_position_defaults.rb b/db/migrate/20160416072926_remove_position_defaults.rb
new file mode 100644
index 000000000..ab3af1499
--- /dev/null
+++ b/db/migrate/20160416072926_remove_position_defaults.rb
@@ -0,0 +1,13 @@
+class RemovePositionDefaults < ActiveRecord::Migration
+ def up
+ [Board, CustomField, Enumeration, IssueStatus, Role, Tracker].each do |klass|
+ change_column klass.table_name, :position, :integer, :default => nil
+ end
+ end
+
+ def down
+ [Board, CustomField, Enumeration, IssueStatus, Role, Tracker].each do |klass|
+ change_column klass.table_name, :position, :integer, :default => 1
+ end
+ end
+end