Actions
Bug #18130
closedFail to import facts and reports - auto increment ID is no longer set on many reports and facts table.
Description
After bec68fe2c the auto increment for ID column no longer works (at least on MySQL that I'm currently using).
a similar problem is described here: http://stackoverflow.com/questions/10849081/rails-db-migration-resetting-id-column-to-auto-increment
the actual error is:
2017-01-18T12:27:19 [foreman-tasks/action] [E] Mysql2::Error: Field 'id' doesn't have a default value: INSERT INTO `reports` (`host_id`, `reported_at`, `status`, `metrics`, `created_at`, `updated_at`) VALUES (84692, '2017-01-18 07:31:03', 0, '--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nresources: !ruby/hash:ActiveSupport::HashWithIndifferentAccess\n changed: 0\n failed: 0\n failed_to_restart: 0\n out_of_sync: 0\n restarted: 0\n scheduled: 0\n skipped: 0\n total: 41\ntime: !ruby/hash:ActiveSupport::HashWithIndifferentAccess\n anchor: 0.0009140340000000001\n concat_file: 0.000175876\n concat_fragment: 0.000283758\n config_retrieval: 1.860927091\n cron: 0.000317409\n file: 0.05307191\n filebucket: 0.000110096\n package: 0.001641752\n resources: 0.000131404\n schedule: 0.000660021\n service: 0.137300921\n ssh_authorized_key: 0.000380096\n total: 2.055914368\nchanges: !ruby/hash:ActiveSupport::HashWithIndifferentAccess\n total: 0\nevents: !ruby/hash:ActiveSupport::HashWithIndifferentAccess\n failure: 0\n success: 0\n total: 0', '2017-01-18 12:27:19', '2017-01-18 12:27:19') (ActiveRecord::StatementInvalid) | /home/foreman/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in `_query' | /home/foreman/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:120:in `block in query' | /home/foreman/gems/gems/mysql2-0.4.5/lib/mysql2/client.rb:119:in `handle_interrupt
Updated by Ohad Levy almost 8 years ago
- Related to Bug #13810: Reports fail to upload, Mysql2::Error: Out of range value for column 'id' (logs table) added
Updated by Ohad Levy almost 8 years ago
- Translation missing: en.field_release set to 209
Updated by Ohad Levy almost 8 years ago
- Subject changed from auto increment ID is no longer set on many tables to Fail to import facts and reports - auto increment ID is no longer set on many reports and facts table.
Updated by Timo Goebel almost 8 years ago
- Status changed from New to Assigned
- Assignee set to Timo Goebel
Updated by The Foreman Bot almost 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/4203 added
Updated by Timo Goebel almost 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 0f38d367f09867411b61eee0addf3f1d5711357f.
Actions