From 67ee4d669f532e0ba72d6053a6cde32f97f2e622 Mon Sep 17 00:00:00 2001 From: Yuri Rudman Date: Tue, 11 Jul 2017 17:15:41 -0400 Subject: [PATCH] change datatype to bigint - converting to bytes in SQL can throw PG::NumericValueOutOfRange error https://bugzilla.redhat.com/show_bug.cgi?id=1464154 --- ...0740_change_memory_mb_in_hardwares_table_to_bigint.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20170711210740_change_memory_mb_in_hardwares_table_to_bigint.rb diff --git a/db/migrate/20170711210740_change_memory_mb_in_hardwares_table_to_bigint.rb b/db/migrate/20170711210740_change_memory_mb_in_hardwares_table_to_bigint.rb new file mode 100644 index 000000000..abf4bc146 --- /dev/null +++ b/db/migrate/20170711210740_change_memory_mb_in_hardwares_table_to_bigint.rb @@ -0,0 +1,9 @@ +class ChangeMemoryMbInHardwaresTableToBigint < ActiveRecord::Migration[5.0] + def up + change_column :hardwares, :memory_mb, :bigint + end + + def down + change_column :hardwares, :memory_mb, :integer + end +end