Hello all,
I'm trying to index a model in a new application but using a legacy database. My index definition is pretty simple:
class Donor < ActiveRecord::Base
define_index do
indexes name, :sortable => true
end
end
And I'm getting the following error:
indexing index 'donor_core'...
ERROR: index 'donor_core': sql_query_range: : range-query failed: ERROR: COALESCE types text and bigint cannot be matched
LINE 1: SELECT COALESCE(MIN("id"), 1::bigint), COALESCE(MAX("id"), 1...
^
(DSN=pgsql://cmarques:***@localhost:5432/csh-web_development).
The name column in the donors table is a varchar(255). What is this bigint/text thing all about?
I really don't know what's wrong here. Anyone?
Thank you very much!
--
Cássio Marques
Blog:
http://cassiomarques.wordpress.com
If you're writing code and you're not testing it, the code is wrong. I don't care if it does the right thing, and people need to understand this. If it works by accident, you're still wrong.
Bryan Liles - Ruby Hoedown 2008