title: Error: Out of range value for column mysql rails
body: <p>I have sql table:</p>
  
  <pre><code>-- Table structure for rb_amazon_daily
  -- ----------------------------
  DROP TABLE IF EXISTS `rb_amazon_daily`;
  CREATE TABLE `rb_amazon_daily` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `date` date DEFAULT NULL,
    `book_title` varchar(255) DEFAULT NULL,
    `marketplace` varchar(255) DEFAULT NULL,
    `amazon_kdp_avg_list_price` decimal(12,10) DEFAULT NULL,
    `amazon_kdp_royalty_type` varchar(255) DEFAULT NULL,
    `amazon_kdp_revenue_in_usd` decimal(13,13) DEFAULT NULL,
    `amazon_kdp_royalty_in_usd` decimal(13,13) DEFAULT NULL,
    `amazon_kdp_paid_downloads` int(11) DEFAULT NULL,
    `amazon_kdp_free_downloads` int(11) DEFAULT NULL,
    `amazon_ku_pages_read` int(11) DEFAULT NULL,
    `amazon_ku_revenue_in_usd` decimal(12,10) DEFAULT NULL,
    `create_space_revenue_in_usd` decimal(12,10) DEFAULT NULL,
    `create_space_royalty_in_usd` decimal(12,10) DEFAULT NULL,
    `create_space_paperbacks_sold` int(11) DEFAULT NULL,
    `daily_total_revenue` decimal(12,10) DEFAULT NULL,
    `daily_total_royalty` decimal(12,10) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=301 DEFAULT CHARSET=latin1;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/nGQLT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nGQLT.png" alt="enter image description here"></a>
  And I have </p>
  
  <pre><code>class AmazonDaily &lt; ActiveRecord::Base
      self.table_name = "rb_amazon_daily"
  end
  </code></pre>
  
  <p>But then when I try to save somedata to database </p>
  
  <pre><code>#&lt;AmazonDaily:0x007fffef743a00
   id: nil,
   date: Sat, 16 Jul 2016,
   book_title: "Catalyst Moon: Incursion",
   marketplace: "Amazon.com",
   amazon_kdp_avg_list_price: 0.299e1,
   amazon_kdp_royalty_type: "70%",
   amazon_kdp_revenue_in_usd: 0.598e1,
   amazon_kdp_royalty_in_usd: 0.408e1,
   amazon_kdp_paid_downloads: 2,
   amazon_kdp_free_downloads: 0,
   amazon_ku_pages_read: 0,
   amazon_ku_revenue_in_usd: 0.0,
   create_space_revenue_in_usd: 0.0,
   create_space_royalty_in_usd: 0.0,
   create_space_paperbacks_sold: 0,
   daily_total_revenue: 0.598e1,
   daily_total_royalty: 0.408e1&gt;
  </code></pre>
  
  <p>I got an error:
  Error: Out of range value for column
      `</p>
  
  <blockquote>
    <p>home/jonsdirewolf/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/mysql2-0.4.9/lib/mysql2/client.rb:120:in
    <code>_query': Mysql2::Error: Out of range value for column
    'amazon_kdp_revenue_in_usd' at row 1: INSERT INTO</code>rb_amazon_daily<code>
    (</code>date<code>,</code>book_title<code>,</code>marketplace<code>,</code>amazon_kdp_avg_list_price<code>,
    </code>amazon_kdp_royalty_type<code>,</code>amazon_kdp_revenue_in_usd<code>,
    </code>amazon_kdp_royalty_in_usd<code>,</code>amazon_kdp_paid_downloads<code>,
    </code>amazon_kdp_free_downloads<code>,</code>amazon_ku_pages_read<code>,
    </code>amazon_ku_revenue_in_usd<code>,</code>create_space_revenue_in_usd<code>,
    </code>create_space_royalty_in_usd<code>,</code>create_space_paperbacks_sold<code>,
    </code>daily_total_revenue<code>,</code>daily_total_royalty`) VALUES ('2016-07-16',
    'Catalyst Moon: Incursion', 'Amazon.com', 2.99, '70%', 5.98, 4.08, 2,
    0, 0, 0.0, 0.0, 0.0, 0, 5.98, 4.08) (ActiveRecord::StatementInvalid)</p>
  </blockquote>
  
  <p>`
  What do I do?</p>