Skip to content

Commit 9cc3533

Browse files
authored
Merge pull request #1155 from JesseChavez/rails_71_own_tests_bootup
Rails booting up and running PostgreSQL rails tests
2 parents 81506f0 + afca8f7 commit 9cc3533

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/ruby.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484

8585
services:
8686
postgres:
87-
image: postgres:10
87+
image: postgres:11
8888
env:
8989
POSTGRES_PASSWORD: postgres
9090
POSTGRES_HOST_AUTH_METHOD: trust
@@ -211,7 +211,7 @@ jobs:
211211

212212
services:
213213
postgres:
214-
image: postgres:10
214+
image: postgres:11
215215
env:
216216
POSTGRES_PASSWORD: postgres
217217
POSTGRES_HOST_AUTH_METHOD: trust

lib/arjdbc/postgresql/adapter.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ def supports_insert_on_conflict?
232232
alias supports_insert_on_duplicate_update? supports_insert_on_conflict?
233233
alias supports_insert_conflict_target? supports_insert_on_conflict?
234234

235+
def supports_identity_columns? # :nodoc:
236+
database_version >= 10_00_00 # >= 10.0
237+
end
238+
235239
def index_algorithms
236240
{ concurrently: 'CONCURRENTLY' }
237241
end

test/db/postgresql/table_name_test.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,18 @@ def self.down
8181
end
8282
end
8383

84-
class SerialWithTrigger < ActiveRecord::Base;
84+
class SerialWithTrigger < ActiveRecord::Base
8585
self.table_name = 'serials'
8686
self.primary_key = :sid
8787
end
8888

89-
test 'serial with trigger' do
90-
sn = SerialWithTrigger.create! :value => 1234567890.to_s
89+
def test_serial_with_trigger
90+
pend "Issue happens in active record 7.1 internals, issue wass logged in rails repo"
91+
# issue link: https://github.com/rails/rails/issues/52485
92+
93+
sn = SerialWithTrigger.create!(value: 1_234_567_890.to_s)
9194

9295
assert sn.reload
9396
SerialWithTrigger.columns
9497
end
95-
9698
end

0 commit comments

Comments
 (0)