]> source.dussan.org Git - redmine.git/commitdiff
SQL error using PostgreSQL
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 28 Jun 2006 19:54:35 +0000 (19:54 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 28 Jun 2006 19:54:35 +0000 (19:54 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@5 e93f8b46-1217-0410-a6f0-8f06a7374b81

redmine/.project [new file with mode: 0644]
redmine/app/controllers/reports_controller.rb
redmine/config/database.yml
redmine/config/environments/development_pgsql.rb [new file with mode: 0644]
redmine/db/migrate/001_setup.rb

diff --git a/redmine/.project b/redmine/.project
new file mode 100644 (file)
index 0000000..01b4f6d
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<projectDescription>\r
+       <name>redmine</name>\r
+       <comment></comment>\r
+       <projects>\r
+       </projects>\r
+       <buildSpec>\r
+               <buildCommand>\r
+                       <name>org.rubypeople.rdt.core.rubybuilder</name>\r
+                       <arguments>\r
+                       </arguments>\r
+               </buildCommand>\r
+       </buildSpec>\r
+       <natures>\r
+               <nature>org.radrails.rails.ui.railsnature</nature>\r
+               <nature>org.rubypeople.rdt.core.rubynature</nature>\r
+       </natures>\r
+</projectDescription>\r
index 7dd57cc3b8d9e88f49610470b9352508237c71b9..938d3b4692a84c09876e8c44bb32ab4ee82b79db 100644 (file)
@@ -33,7 +33,7 @@ class ReportsController < ApplicationController
                                                   i.status_id=s.id \r
                                                   and i.tracker_id=t.id\r
                                                   and i.project_id=#{@project.id}\r
-                                                group by s.id, t.id")\r
+                                                group by s.id, s.is_closed, t.id")\r
     @priorities = Enumeration::get_values('IPRI')\r
     @issues_by_priority = \r
       ActiveRecord::Base.connection.select_all("select    s.id as status_id, \r
@@ -46,7 +46,7 @@ class ReportsController < ApplicationController
                                                   i.status_id=s.id \r
                                                   and i.priority_id=p.id\r
                                                   and i.project_id=#{@project.id}\r
-                                                group by s.id, p.id")\r
+                                                group by s.id, s.is_closed, p.id")\r
     @categories = @project.issue_categories\r
     @issues_by_category = \r
       ActiveRecord::Base.connection.select_all("select    s.id as status_id, \r
@@ -59,7 +59,7 @@ class ReportsController < ApplicationController
                                                   i.status_id=s.id \r
                                                   and i.category_id=c.id\r
                                                   and i.project_id=#{@project.id}\r
-                                                group by s.id, c.id")\r
+                                                group by s.id, s.is_closed, c.id")\r
   end\r
   \r
   \r
index 1702510d014255fe334c041ecfa94f7b8b5ecda9..f65dc8cbb7c899f8014b15e8b06bcae7aa50607b 100644 (file)
@@ -11,6 +11,13 @@ development:
   host: localhost
   username: root
   password:
+  
+development_pgsql:
+  adapter: postgresql
+  database: redmine
+  host: localhost
+  username: postgres
+  password: "postgres"
 \r
 test:
   adapter: mysql
diff --git a/redmine/config/environments/development_pgsql.rb b/redmine/config/environments/development_pgsql.rb
new file mode 100644 (file)
index 0000000..04b7792
--- /dev/null
@@ -0,0 +1,19 @@
+# Settings specified here will take precedence over those in config/environment.rb
+
+# In the development environment your application's code is reloaded on
+# every request.  This slows down response time but is perfect for development
+# since you don't have to restart the webserver when you make code changes.
+config.cache_classes     = false
+
+# Log error messages when you accidentally call methods on nil.
+config.whiny_nils        = true
+
+# Enable the breakpoint server that script/breakpointer connects to
+config.breakpoint_server = true
+
+# Show full error reports and disable caching
+config.action_controller.consider_all_requests_local = true
+config.action_controller.perform_caching             = false
+
+# Don't care if the mailer can't send
+config.action_mailer.raise_delivery_errors = false
index e6288f61dc49e42d19ffb75aee43500325f9eb5b..c075c89f5e1b3534de43b28cdb88888287e8290a 100644 (file)
@@ -15,13 +15,13 @@ class Setup < ActiveRecord::Migration
   \r
     create_table "custom_fields", :force => true do |t|\r
       t.column "name", :string, :limit => 30, :default => "", :null => false\r
-      t.column "typ", :integer, :limit => 6, :default => 0, :null => false\r
+      t.column "typ", :integer, :default => 0, :null => false\r
       t.column "is_required", :boolean, :default => false, :null => false\r
       t.column "is_for_all", :boolean, :default => false, :null => false\r
       t.column "possible_values", :text, :default => "", :null => false\r
       t.column "regexp", :string, :default => "", :null => false\r
-      t.column "min_length", :integer, :limit => 4, :default => 0, :null => false\r
-      t.column "max_length", :integer, :limit => 4, :default => 0, :null => false\r
+      t.column "min_length", :integer, :default => 0, :null => false\r
+      t.column "max_length", :integer, :default => 0, :null => false\r
     end\r
   \r
     create_table "custom_fields_projects", :id => false, :force => true do |t|\r