]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-2549 do not guess Oracle column type by name
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 6 Sep 2011 17:45:09 +0000 (19:45 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 6 Sep 2011 17:45:09 +0000 (19:45 +0200)
sonar-server/src/main/webapp/WEB-INF/config/initializers/oracle.rb [new file with mode: 0644]

diff --git a/sonar-server/src/main/webapp/WEB-INF/config/initializers/oracle.rb b/sonar-server/src/main/webapp/WEB-INF/config/initializers/oracle.rb
new file mode 100644 (file)
index 0000000..a5db832
--- /dev/null
@@ -0,0 +1,11 @@
+ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.class_eval do
+  # id columns and columns which end with _id will always be converted to integers
+  self.emulate_integers_by_column_name = false
+  # DATE columns which include "date" in name will be converted to Date, otherwise to Time
+  self.emulate_dates_by_column_name = false
+  # true and false will be stored as 'Y' and 'N'
+  self.emulate_booleans_from_strings = false
+  # start primary key sequences from 1 (and not 10000) and take just one next value in each session
+  self.default_sequence_start_value = "1 NOCACHE INCREMENT BY 1"
+  # other settings ...
+end
\ No newline at end of file