X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3e99bbf5a9e124a59fc5ae72c863e89af7fa8c46..c3e2e6462f293596aef5d5de18b0a173edc046c7:/db/migrate/025_add_end_time_to_changesets.rb diff --git a/db/migrate/025_add_end_time_to_changesets.rb b/db/migrate/025_add_end_time_to_changesets.rb index eaccc008f..32d27959a 100644 --- a/db/migrate/025_add_end_time_to_changesets.rb +++ b/db/migrate/025_add_end_time_to_changesets.rb @@ -9,8 +9,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()-#{interval_constant('1 hour')}) where open=(1=0)") - execute("update changesets set closed_at=(now()+#{interval_constant('1 hour')}) where open=(1=1)") + execute("update changesets set closed_at=(now()-'1 hour'::interval) where open=(1=0)") + execute("update changesets set closed_at=(now()+'1 hour'::interval) where open=(1=1)") # remove the open column as it is unnecessary now and denormalises # the table.