Project

General

Profile

Redmine trunk (2.3.4) on SQLServer

Added by Marco Mastrodonato over 14 years ago

I did some updates to use Redmine with SQL Server

In many many places, I tried to change:
"is_default = #{connection.quoted_false}"

with:
["is_default = ?", false]

but where strings were joined was an hard work so i add quoted_true and quoted_false to sqlserver_adapter (there wasn't, i don't know why)


#RedMine\app\models\enumeration.rb:19

I had to comment default_scope otherwise there are already a clause :order in others scope
#default_scope :order => "#{Enumeration.table_name}.position ASC"


SQL Server doesn't like it for text field

#RedMine\app\models\journal.rb:39

#before:
" (#{JournalDetail.table_name}.prop_key = 'status_id' OR #{Journal.table_name}.notes <> '')"}

#now:
" (#{JournalDetail.table_name}.prop_key = 'status_id' OR NOT #{Journal.table_name}.notes IS NULL)"}


This i can't fix, i think the error is inside paginator, it couldn't be?

DBI::DatabaseError: Execute
OLE error code:80040E14 in Microsoft OLE DB Provider for SQL Server
Line 1: Incorrect syntax near '\'.
HRESULT error code:0x80020009
Eccezione.: SELECT * FROM (SELECT TOP 1 * FROM (SELECT TOP 1 ... ORDER BY issues.id DESC) AS tmp1 ORDER BY issues\.\[id\] ASC) AS tmp2 ORDER BY issues\.\[id\] DESC

RedMine/app/controllers/issues_controller.rb:66:in `index'