From 1edb9fdc8d5eb4e12ccf1ff544fd92994315be6d Mon Sep 17 00:00:00 2001 From: Colin Johnson Date: Mon, 13 Aug 2012 22:46:16 +0000 Subject: [PATCH] using decimal instead of float for mysql cost table. --- .../ec2cc-mysql/ec2cc-table-create.sql | 2 +- ec2-cost-calculate-ruby/ec2cc-mysql/ec2cc.mwb | Bin 4989 -> 5065 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/ec2-cost-calculate-ruby/ec2cc-mysql/ec2cc-table-create.sql b/ec2-cost-calculate-ruby/ec2cc-mysql/ec2cc-table-create.sql index 548633b..8559092 100644 --- a/ec2-cost-calculate-ruby/ec2cc-mysql/ec2cc-table-create.sql +++ b/ec2-cost-calculate-ruby/ec2cc-mysql/ec2cc-table-create.sql @@ -14,7 +14,7 @@ CREATE TABLE IF NOT EXISTS `ec2cc`.`costs` ( `platform` VARCHAR(7) NOT NULL , `instance_type` VARCHAR(13) NOT NULL , `status` VARCHAR(7) NOT NULL , - `cost` FLOAT NOT NULL , + `cost` DECIMAL(10,4) NOT NULL , `name` VARCHAR(40) NULL , `autoscalinggroup` VARCHAR(40) NULL , `date` DATETIME NOT NULL ) diff --git a/ec2-cost-calculate-ruby/ec2cc-mysql/ec2cc.mwb b/ec2-cost-calculate-ruby/ec2cc-mysql/ec2cc.mwb index 246552cc0999389be24795714b9168f0ac7fbd4e..191a4afd347ae371e9c4a0171a73dcf3e4ddea83 100644 GIT binary patch delta 4219 zcmZvgXD}R&*2Y)2(M8k{Vf7GYBdjhKt9Mopix9o{#RgHL*ClMU#1gD1L87j@;jcxM z=p_+CSVWDRciua5=g!EQB=DB_n46007hg&SpBb#RA-VHUj|A zg#`c@|8@~R&Ou%--hmQcAx;vZUY>a#Dyrx z8Afu_TlS1o(;G%}(kd@yH(*fbP53KR_?d6Uru*uqx*p%mX@e>UoR~sO6?^UeWDY>0 zl|xSbN{|<%u9mL>SEZc3HL96R(Zh@!>8M>$@B$x zm1a?nWA2W$h&~bQ-d!sb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