]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/025_add_end_time_to_changesets.rb
Autoselect new diary entry language to that of last posted entry rather than user...
[rails.git] / db / migrate / 025_add_end_time_to_changesets.rb
index 553fd9e2ac9a48ae0a7d69b8d6af5766e1368332..4941b72b92fb4b5264bfe42d84b2189394608e14 100644 (file)
@@ -7,8 +7,8 @@ class AddEndTimeToChangesets < ActiveRecord::Migration
     # it appears that execute will only accept string arguments, so
     # this is an ugly, ugly hack to get some sort of mysql/postgres
     # independence. now i have to go wash my brain with bleach.
-    #execute("update changesets set closed_at=(now()-'1 hour') where open=(1=0)")
-    #execute("update changesets set closed_at=(now()+'1 hour') where open=(1=1)")
+    execute("update changesets set closed_at=(now()-#{interval_constant('1 hour')}) where open=(1=0)")
+    execute("update changesets set closed_at=(now()+#{interval_constant('1 hour')}) where open=(1=1)")
 
     # remove the open column as it is unnecessary now and denormalises 
     # the table.