Skip to content

Commit

Permalink
🔧 Add configuration to preserve pre-existing behavior of 'activerecor…
Browse files Browse the repository at this point in the history
…d-oracle_enhanced-adapter'

oracle-enhanced v6.00 changes the default sequence start value from 10,000 to 1:
  Release Notes: https://github.com/rsim/oracle-enhanced/blob/v6.0.6/History.md#600--2019-08-17
  Related PR: rsim/oracle-enhanced#1636

Preserve the original default value of 10,000
  • Loading branch information
jcroteau committed Aug 24, 2023
1 parent 125ac46 commit bd3a449
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/initializers/oracle.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

ActiveSupport.on_load(:active_record) do
ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter.class_eval do
# oracle-enhanced v6.00 changes the default sequence start value from 10,000 to 1:
# Release Notes: https://github.com/rsim/oracle-enhanced/blob/v6.0.6/History.md#600--2019-08-17
# Related PR: https://github.com/rsim/oracle-enhanced/pull/1636
#
# Preserve the original default value of 10,000
self.default_sequence_start_value = 10_000
end
end

0 comments on commit bd3a449

Please sign in to comment.