diff --git a/tracks/db/migrate/038_projects_contexts_remove_not_null_from_position.rb b/tracks/db/migrate/038_projects_contexts_remove_not_null_from_position.rb index 2e2e5acc..12e1b745 100644 --- a/tracks/db/migrate/038_projects_contexts_remove_not_null_from_position.rb +++ b/tracks/db/migrate/038_projects_contexts_remove_not_null_from_position.rb @@ -1,7 +1,7 @@ class ProjectsContextsRemoveNotNullFromPosition < ActiveRecord::Migration def self.up - change_column :projects, :position, :integer, {:null => true, :default => false} - change_column :contexts, :position, :integer, {:null => true, :default => false} + change_column :projects, :position, :integer, {:null => true, :default => nil} + change_column :contexts, :position, :integer, {:null => true, :default => nil} end def self.down @@ -10,13 +10,13 @@ class ProjectsContextsRemoveNotNullFromPosition < ActiveRecord::Migration project.position = 0 if !project.position? project.save end - change_column :projects, :position, :integer, {:null => false, :default => false} + change_column :projects, :position, :integer, {:null => false, :default => nil} @contexts = Context.find(:all) @contexts.each do |context| context.position = 0 if !context.position? context.save end - change_column :contexts, :position, :integer, {:null => false, :default => false} + change_column :contexts, :position, :integer, {:null => false, :default => nil} end end