Skip to content

Commit

Permalink
Merge pull request #151 from cben/quota-decimal
Browse files Browse the repository at this point in the history
Change container_quota_items float columns to decimals
  • Loading branch information
Fryguy authored Jan 18, 2018
2 parents 78f3316 + 06227a5 commit 909736e
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class ChangeContainerQuotaItemsToDecimals < ActiveRecord::Migration[5.0]
def up
%i(quota_desired quota_enforced quota_observed).each do |column|
change_column :container_quota_items, column, :decimal, :scale => 3, :precision => 30
end
end

def down
%i(quota_desired quota_enforced quota_observed).each do |column|
change_column :container_quota_items, column, :float
end
end
end

0 comments on commit 909736e

Please sign in to comment.