# File lib/thinking_sphinx/active_record.rb, line 164 def define_indexes superclass.define_indexes unless superclass == ::ActiveRecord::Base return if sphinx_index_blocks.nil? || defined_indexes? || !ThinkingSphinx.define_indexes? sphinx_index_blocks.each do |block| block.call end self.defined_indexes = true # We want to make sure that if the database doesn't exist, then Thinking # Sphinx doesn't mind when running non-TS tasks (like db:create, db:drop # and db:migrate). It's a bit hacky, but I can't think of a better way. rescue StandardError => err case err.class.name when "Mysql::Error", "Java::JavaSql::SQLException", "ActiveRecord::StatementInvalid" return else raise err end end