Data truncated for column

From Kolmisoft Wiki
Revision as of 12:22, 29 May 2014 by Mindaugas (talk | contribs) (Created page with 'Example: SQL (1.6ms) INSERT INTO `devices` (`auth`, `calleridpres`, `context`, `control_c.... (0.6ms) ROLLBACK --- !ruby/exception:Mysql2::Error message: Data truncated …')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Example:

SQL (1.6ms)  INSERT INTO `devices` (`auth`, `calleridpres`, `context`, `control_c....
  (0.6ms)  ROLLBACK
--- !ruby/exception:Mysql2::Error
message: Data truncated for column 'calleridpres' at row 1
error_number: 1265
sql_state: '01000'
/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:286:in `query'
/usr/local/rvm/gems/ruby-2.0.0-p247@x5/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:286:in `block in execute'

Fix:

In /home/mor/config/database.yml make sure there is

production:
   strict: false