Skip to content

Commit

Permalink
Merge pull request #1155 from JesseChavez/rails_71_own_tests_bootup
Browse files Browse the repository at this point in the history
Rails booting up and running PostgreSQL rails tests
  • Loading branch information
enebo authored Aug 1, 2024
2 parents 81506f0 + afca8f7 commit 9cc3533
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:

services:
postgres:
image: postgres:10
image: postgres:11
env:
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:

services:
postgres:
image: postgres:10
image: postgres:11
env:
POSTGRES_PASSWORD: postgres
POSTGRES_HOST_AUTH_METHOD: trust
Expand Down
4 changes: 4 additions & 0 deletions lib/arjdbc/postgresql/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 6 additions & 4 deletions test/db/postgresql/table_name_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9cc3533

Please sign in to comment.