diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f7d282c1c..940d80469 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -84,7 +84,7 @@ jobs: services: postgres: - image: postgres:10 + image: postgres:11 env: POSTGRES_PASSWORD: postgres POSTGRES_HOST_AUTH_METHOD: trust @@ -211,7 +211,7 @@ jobs: services: postgres: - image: postgres:10 + image: postgres:11 env: POSTGRES_PASSWORD: postgres POSTGRES_HOST_AUTH_METHOD: trust diff --git a/lib/arjdbc/postgresql/adapter.rb b/lib/arjdbc/postgresql/adapter.rb index 6e1d42aab..61ad5ef07 100644 --- a/lib/arjdbc/postgresql/adapter.rb +++ b/lib/arjdbc/postgresql/adapter.rb @@ -232,6 +232,10 @@ def supports_insert_on_conflict? alias supports_insert_on_duplicate_update? supports_insert_on_conflict? alias supports_insert_conflict_target? supports_insert_on_conflict? + def supports_identity_columns? # :nodoc: + database_version >= 10_00_00 # >= 10.0 + end + def index_algorithms { concurrently: 'CONCURRENTLY' } end diff --git a/test/db/postgresql/table_name_test.rb b/test/db/postgresql/table_name_test.rb index 0f32d7065..d96fca39b 100644 --- a/test/db/postgresql/table_name_test.rb +++ b/test/db/postgresql/table_name_test.rb @@ -81,16 +81,18 @@ def self.down end end - class SerialWithTrigger < ActiveRecord::Base; + class SerialWithTrigger < ActiveRecord::Base self.table_name = 'serials' self.primary_key = :sid end - test 'serial with trigger' do - sn = SerialWithTrigger.create! :value => 1234567890.to_s + def test_serial_with_trigger + pend "Issue happens in active record 7.1 internals, issue wass logged in rails repo" + # issue link: https://github.com/rails/rails/issues/52485 + + sn = SerialWithTrigger.create!(value: 1_234_567_890.to_s) assert sn.reload SerialWithTrigger.columns end - end