db_preferences.rb 476 B

123456789101112
  1. case ActiveRecord::Base.connection_config[:adapter]
  2. when 'mysql2'
  3. Rails.application.config.db_4bytes_utf8 = false
  4. Rails.application.config.db_case_sensitive = false
  5. Rails.application.config.db_like = 'LIKE'
  6. Rails.application.config.db_null_byte = true
  7. when 'postgresql'
  8. Rails.application.config.db_4bytes_utf8 = true
  9. Rails.application.config.db_case_sensitive = true
  10. Rails.application.config.db_like = 'ILIKE'
  11. Rails.application.config.db_null_byte = false
  12. end