lib/motor/admin.rb in motor-admin-0.2.54 vs lib/motor/admin.rb in motor-admin-0.2.55
- old
+ new
@@ -95,23 +95,27 @@
end
end
initializer 'motor.upgrade' do
config.after_initialize do
+ next unless Motor.server?
+
unless Motor::Query.table_exists?
puts
puts ' => Run `rails g motor:install && rake db:migrate` in order to create Motor Admin configuration tables'
puts
+
+ raise
end
unless Motor::ApiConfig.table_exists?
puts
puts ' => Run `rails g motor:upgrade && rake db:migrate`' \
' to perform data migration and enable the latest features'
puts
+
+ raise
end
- rescue ActiveRecord::NoDatabaseError
- nil
end
end
end
end