torque-postgresql 2.3.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/torque/postgresql/adapter/database_statements.rb +13 -14
- data/lib/torque/postgresql/adapter/schema_statements.rb +5 -0
- data/lib/torque/postgresql/auxiliary_statement/recursive.rb +149 -0
- data/lib/torque/postgresql/auxiliary_statement/settings.rb +75 -22
- data/lib/torque/postgresql/auxiliary_statement.rb +39 -40
- data/lib/torque/postgresql/base.rb +10 -0
- data/lib/torque/postgresql/config.rb +5 -1
- data/lib/torque/postgresql/inheritance.rb +3 -1
- data/lib/torque/postgresql/railtie.rb +5 -1
- data/lib/torque/postgresql/relation/auxiliary_statement.rb +28 -15
- data/lib/torque/postgresql/version.rb +1 -1
- data/spec/models/category.rb +2 -0
- data/spec/schema.rb +7 -1
- data/spec/tests/auxiliary_statement_spec.rb +374 -35
- data/spec/tests/schema_spec.rb +9 -0
- metadata +5 -2
data/spec/tests/schema_spec.rb
CHANGED
@@ -73,6 +73,15 @@ RSpec.describe 'Schema' do
|
|
73
73
|
expect(dump_result).to match /create_table \"users\",.*schema: +"internal"/
|
74
74
|
end
|
75
75
|
end
|
76
|
+
|
77
|
+
it 'does not affect serial ids' do
|
78
|
+
connection.create_table(:primary_keys, id: :serial) do |t|
|
79
|
+
t.string :title
|
80
|
+
end
|
81
|
+
|
82
|
+
parts = '"primary_keys", id: :serial, force: :cascade'
|
83
|
+
expect(dump_result).to match(/create_table #{parts} do /)
|
84
|
+
end
|
76
85
|
end
|
77
86
|
|
78
87
|
context 'on relation' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: torque-postgresql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -213,6 +213,7 @@ files:
|
|
213
213
|
- lib/torque/postgresql/attributes/period.rb
|
214
214
|
- lib/torque/postgresql/autosave_association.rb
|
215
215
|
- lib/torque/postgresql/auxiliary_statement.rb
|
216
|
+
- lib/torque/postgresql/auxiliary_statement/recursive.rb
|
216
217
|
- lib/torque/postgresql/auxiliary_statement/settings.rb
|
217
218
|
- lib/torque/postgresql/base.rb
|
218
219
|
- lib/torque/postgresql/collector.rb
|
@@ -257,6 +258,7 @@ files:
|
|
257
258
|
- spec/models/activity_post/sample.rb
|
258
259
|
- spec/models/author.rb
|
259
260
|
- spec/models/author_journalist.rb
|
261
|
+
- spec/models/category.rb
|
260
262
|
- spec/models/comment.rb
|
261
263
|
- spec/models/course.rb
|
262
264
|
- spec/models/geometry.rb
|
@@ -336,6 +338,7 @@ test_files:
|
|
336
338
|
- spec/models/activity_post.rb
|
337
339
|
- spec/models/author.rb
|
338
340
|
- spec/models/author_journalist.rb
|
341
|
+
- spec/models/category.rb
|
339
342
|
- spec/models/comment.rb
|
340
343
|
- spec/models/course.rb
|
341
344
|
- spec/models/geometry.rb
|