Here's the same error with Postgres:
2018-06-28T14:20:47 836b75d7 [app] [I] Started POST "/api/hosts/facts" for 192.168.1.239 at 2018-06-28 14:20:47 -0500
2018-06-28T14:20:47 836b75d7 [app] [I] Processing by Api::V2::HostsController#facts as JSON
2018-06-28T14:20:47 836b75d7 [app] [I] Parameters: {"name"=>"foreman-rutabaga.thecitybase.net", "facts"=>"[FILTERED]", "apiv"=>"v2", "host"=>{"name"=>"foreman-rutabaga.thecitybase.net"}}
2018-06-28T14:20:47 836b75d7 [app] [I] Current user: foreman_api_admin (administrator)
2018-06-28T14:20:47 836b75d7 [audit] [I] [foreman-rutabaga.thecitybase.net] deleted 0 (6.6ms)
2018-06-28T14:20:47 836b75d7 [audit] [I] [foreman-rutabaga.thecitybase.net] updated 0 (5.0ms)
2018-06-28T14:20:47 836b75d7 [app] [W] Action failed
| ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: missing FROM-clause entry for table "fact_names"
| LINE 1: SELECT fact_names.name FROM "fact_values" WHERE "fact_values...
| ^
| : SELECT fact_names.name FROM "fact_values" WHERE "fact_values"."host_id" = $1 AND "fact_values"."fact_name_id" IN (363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567)
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:614:in `async_exec'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:614:in `block (2 levels) in exec_no_cache'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:613:in `block in exec_no_cache'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:612:in `block (2 levels) in log'
| /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:611:in `block in log'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activesupport-5.1.4/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract_adapter.rb:603:in `log'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:612:in `exec_no_cache'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql_adapter.rb:601:in `execute_and_clear'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:79:in `exec_query'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:371:in `select'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:42:in `select_all'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:95:in `block in select_all'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:117:in `block in cache_sql'
| /usr/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:104:in `cache_sql'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/query_cache.rb:95:in `select_all'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/activerecord-5.1.4/lib/active_record/relation/calculations.rb:169:in `pluck'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_salt-10.0.0/app/services/foreman_salt/fact_importer.rb:56:in `facts_to_create'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_salt-10.0.0/app/services/foreman_salt/fact_importer.rb:48:in `add_fact'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_salt-10.0.0/app/services/foreman_salt/fact_importer.rb:42:in `block in add_missing_facts'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_salt-10.0.0/app/services/foreman_salt/fact_importer.rb:26:in `each'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_salt-10.0.0/app/services/foreman_salt/fact_importer.rb:26:in `add_missing_facts'
| /usr/share/foreman/vendor/ruby/2.3.0/gems/foreman_salt-10.0.0/app/services/foreman_salt/fact_importer.rb:21:in `add_new_facts'