Created
May 7, 2012 08:52
-
-
Save retorquere/2626762 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/db/migrate/033_unique_positions.rb b/db/migrate/033_unique_positions.rb | |
index d269dba..62dc665 100644 | |
--- a/db/migrate/033_unique_positions.rb | |
+++ b/db/migrate/033_unique_positions.rb | |
@@ -26,6 +26,9 @@ class UniquePositions < ActiveRecord::Migration | |
from issues story | |
") | |
+ execute("select id, position from issues left join _backlogs_tmp_position on id = issue_id where new_position is null").each{|row| | |
+ puts row.inspect | |
+ } | |
execute("update issues set position = (select new_position from _backlogs_tmp_position where id = issue_id)") | |
execute("drop table _backlogs_tmp_position") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment