Project

General

Profile

Actions

Defect #23930

closed

Firebird & RedDatabase support problem

Added by Andrey Lobanov (RedSoft) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

Redmine have some queries that uses firebird keywords, ex. count

          result_scope = ActsAsTaggableOn::Tag
            .joins(:taggings)
            .select('tags.id, tags.name, tags.taggings_count, COUNT(taggings.id) as count')
            .group('tags.id, tags.name, tags.taggings_count')
            .where(taggings: { taggable_type: 'Issue', taggable_id: issues_scope})

In this example used fragment of code from plugins/redmine_tags/lib/redmine_tags/patches/issue_patch.rb (available_tags)

The problem is that count is reserved keyword and to name column it should look like this

'COUNT(taggings.id) as "COUNT"'

In my fork i located few more used keywords: position, admin.

I'll make a patch, if i'll have time, but it would be nice if someone fix it.

Actions #1

Updated by Toshi MARUYAMA over 7 years ago

  • Status changed from New to Closed
  • Resolution set to Invalid

Please contact plugin author.
Redmine core does not support such DBs.

Actions #2

Updated by Andrey Lobanov (RedSoft) over 7 years ago

But plugin maker, doesn't write hardcoded redmine queries.

Actions

Also available in: Atom PDF