diff --git a/db/migrate/20180118131417_change_container_quota_items_to_decimals.rb b/db/migrate/20180118131417_change_container_quota_items_to_decimals.rb new file mode 100644 index 000000000..d64d1cab4 --- /dev/null +++ b/db/migrate/20180118131417_change_container_quota_items_to_decimals.rb @@ -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