Skip to content

Instantly share code, notes, and snippets.

@mezis
Created June 10, 2016 13:20
Show Gist options
  • Save mezis/3f02188772ba75f4ce36d5a9b4db3359 to your computer and use it in GitHub Desktop.
Save mezis/3f02188772ba75f4ce36d5a9b4db3359 to your computer and use it in GitHub Desktop.
class TunesFillfactor < ActiveRecord::Migration
TABLES = %w[orders restaurant_assignment order_assignment order_item driver zone_metrics]
def up
TABLES.each do |table|
execute %{ALTER TABLE #{table} SET (fillfactor = 85)}
end
end
def down
TABLES.each do |table|
execute %{
ALTER TABLE #{table} SET (fillfactor = 100)
}
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment