From b455949b54c39efec0bb2b204553e3e44808a228 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 6 Sep 2011 19:45:09 +0200 Subject: [PATCH] SONAR-2549 do not guess Oracle column type by name --- .../main/webapp/WEB-INF/config/initializers/oracle.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 sonar-server/src/main/webapp/WEB-INF/config/initializers/oracle.rb 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 index 00000000000..a5db8326420 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/config/initializers/oracle.rb @@ -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 -- 2.39.5