torque-postgresql 3.1.0 → 3.2.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 -15
- data/lib/torque/postgresql/adapter/schema_creation.rb +3 -9
- 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 +74 -22
- data/lib/torque/postgresql/auxiliary_statement.rb +39 -40
- data/lib/torque/postgresql/base.rb +11 -1
- 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: 3.1
|
4
|
+
version: 3.2.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
|
@@ -208,6 +208,7 @@ files:
|
|
208
208
|
- lib/torque/postgresql/attributes/period.rb
|
209
209
|
- lib/torque/postgresql/autosave_association.rb
|
210
210
|
- lib/torque/postgresql/auxiliary_statement.rb
|
211
|
+
- lib/torque/postgresql/auxiliary_statement/recursive.rb
|
211
212
|
- lib/torque/postgresql/auxiliary_statement/settings.rb
|
212
213
|
- lib/torque/postgresql/base.rb
|
213
214
|
- lib/torque/postgresql/collector.rb
|
@@ -251,6 +252,7 @@ files:
|
|
251
252
|
- spec/models/activity_post/sample.rb
|
252
253
|
- spec/models/author.rb
|
253
254
|
- spec/models/author_journalist.rb
|
255
|
+
- spec/models/category.rb
|
254
256
|
- spec/models/comment.rb
|
255
257
|
- spec/models/course.rb
|
256
258
|
- spec/models/geometry.rb
|
@@ -329,6 +331,7 @@ test_files:
|
|
329
331
|
- spec/models/activity_post.rb
|
330
332
|
- spec/models/author.rb
|
331
333
|
- spec/models/author_journalist.rb
|
334
|
+
- spec/models/category.rb
|
332
335
|
- spec/models/comment.rb
|
333
336
|
- spec/models/course.rb
|
334
337
|
- spec/models/geometry.rb
|