summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2006-06-28 19:54:35 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2006-06-28 19:54:35 +0000
commitb1ede59d02891c0e284e15680abd73301374d3bc (patch)
treebe04dd194c03eb4688203070c9f818b849e6fbe5
parent6b7650e2f03156ea1e3985b30c1995e44c317e3d (diff)
downloadredmine-b1ede59d02891c0e284e15680abd73301374d3bc.tar.gz
redmine-b1ede59d02891c0e284e15680abd73301374d3bc.zip
SQL error using PostgreSQL
git-svn-id: http://redmine.rubyforge.org/svn/trunk@5 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--redmine/.project18
-rw-r--r--redmine/app/controllers/reports_controller.rb6
-rw-r--r--redmine/config/database.yml7
-rw-r--r--redmine/config/environments/development_pgsql.rb19
-rw-r--r--redmine/db/migrate/001_setup.rb6
5 files changed, 50 insertions, 6 deletions
diff --git a/redmine/.project b/redmine/.project
new file mode 100644
index 000000000..01b4f6dac
--- /dev/null
+++ b/redmine/.project
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>redmine</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.rubypeople.rdt.core.rubybuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.radrails.rails.ui.railsnature</nature>
+ <nature>org.rubypeople.rdt.core.rubynature</nature>
+ </natures>
+</projectDescription>
diff --git a/redmine/app/controllers/reports_controller.rb b/redmine/app/controllers/reports_controller.rb
index 7dd57cc3b..938d3b469 100644
--- a/redmine/app/controllers/reports_controller.rb
+++ b/redmine/app/controllers/reports_controller.rb
@@ -33,7 +33,7 @@ class ReportsController < ApplicationController
i.status_id=s.id
and i.tracker_id=t.id
and i.project_id=#{@project.id}
- group by s.id, t.id")
+ group by s.id, s.is_closed, t.id")
@priorities = Enumeration::get_values('IPRI')
@issues_by_priority =
ActiveRecord::Base.connection.select_all("select s.id as status_id,
@@ -46,7 +46,7 @@ class ReportsController < ApplicationController
i.status_id=s.id
and i.priority_id=p.id
and i.project_id=#{@project.id}
- group by s.id, p.id")
+ group by s.id, s.is_closed, p.id")
@categories = @project.issue_categories
@issues_by_category =
ActiveRecord::Base.connection.select_all("select s.id as status_id,
@@ -59,7 +59,7 @@ class ReportsController < ApplicationController
i.status_id=s.id
and i.category_id=c.id
and i.project_id=#{@project.id}
- group by s.id, c.id")
+ group by s.id, s.is_closed, c.id")
end
diff --git a/redmine/config/database.yml b/redmine/config/database.yml
index 1702510d0..f65dc8cbb 100644
--- a/redmine/config/database.yml
+++ b/redmine/config/database.yml
@@ -11,6 +11,13 @@ development:
host: localhost
username: root
password:
+
+development_pgsql:
+ adapter: postgresql
+ database: redmine
+ host: localhost
+ username: postgres
+ password: "postgres"
test:
adapter: mysql
diff --git a/redmine/config/environments/development_pgsql.rb b/redmine/config/environments/development_pgsql.rb
new file mode 100644
index 000000000..04b779200
--- /dev/null
+++ b/redmine/config/environments/development_pgsql.rb
@@ -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
diff --git a/redmine/db/migrate/001_setup.rb b/redmine/db/migrate/001_setup.rb
index e6288f61d..c075c89f5 100644
--- a/redmine/db/migrate/001_setup.rb
+++ b/redmine/db/migrate/001_setup.rb
@@ -15,13 +15,13 @@ class Setup < ActiveRecord::Migration
create_table "custom_fields", :force => true do |t|
t.column "name", :string, :limit => 30, :default => "", :null => false
- t.column "typ", :integer, :limit => 6, :default => 0, :null => false
+ t.column "typ", :integer, :default => 0, :null => false
t.column "is_required", :boolean, :default => false, :null => false
t.column "is_for_all", :boolean, :default => false, :null => false
t.column "possible_values", :text, :default => "", :null => false
t.column "regexp", :string, :default => "", :null => false
- t.column "min_length", :integer, :limit => 4, :default => 0, :null => false
- t.column "max_length", :integer, :limit => 4, :default => 0, :null => false
+ t.column "min_length", :integer, :default => 0, :null => false
+ t.column "max_length", :integer, :default => 0, :null => false
end
create_table "custom_fields_projects", :id => false, :force => true do |t|