diff --git a/lib/foreman_discovery/engine.rb b/lib/foreman_discovery/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/foreman_discovery/engine.rb
+++ b/lib/foreman_discovery/engine.rb
@@ -8,7 +8,7 @@ module ForemanDiscovery
     # Load this before the Foreman config initizializers, so that the Setting.descendants
     # list includes the plugin STI setting class
     initializer 'foreman_discovery.load_default_settings', :before => :load_config_initializers do |app|
-      require_dependency File.expand_path("../../../app/models/setting/discovered.rb", __FILE__)
+      require_dependency File.expand_path("../../../app/models/setting/discovered.rb", __FILE__) if (Setting.table_exists? rescue(false))
     end
 
     initializer 'foreman_discovery.helper' do |app|
Ensure setting table exists before trying to load the setting model