switchman 3.5.4 → 3.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/switchman/active_record/predicate_builder.rb +2 -2
- data/lib/switchman/engine.rb +1 -4
- data/lib/switchman/version.rb +1 -1
- data/lib/tasks/switchman.rake +22 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1d87b95f94fe959e18717de83ef0b39415dbf1479e57d4d3dde269aebde2f6e
|
4
|
+
data.tar.gz: 660a121e4d107cf2db3792eab635ee0847fdc7a950d0338281c4b63b77a5d4fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e09ee49ddff4718ca169890eff74e9d4bf4b8122e152762a6220b68093c185cbc7dc9c3bc82035a5f336fead51b98847f56ba2291da5ad2f98a355bc1cf04f90
|
7
|
+
data.tar.gz: 15772217715f825b21433adef3548e938ac891770809dc2eed5bf9384fa3e9b8259ccaed696841c5c442d195d73f7f465d0171834021d5d23fec747a0ca72fd4
|
data/lib/switchman/engine.rb
CHANGED
@@ -87,11 +87,8 @@ module Switchman
|
|
87
87
|
::ActiveRecord::Relation.include(ActiveRecord::SpawnMethods)
|
88
88
|
::ActiveRecord::Relation.include(CallSuper)
|
89
89
|
|
90
|
-
::ActiveRecord::PredicateBuilder::AssociationQueryValue.prepend(
|
91
|
-
ActiveRecord::PredicateBuilder::AssociationQueryValue
|
92
|
-
)
|
93
90
|
::ActiveRecord::PredicateBuilder::PolymorphicArrayValue.prepend(
|
94
|
-
ActiveRecord::PredicateBuilder::
|
91
|
+
ActiveRecord::PredicateBuilder::PolymorphicArrayValue
|
95
92
|
)
|
96
93
|
|
97
94
|
::ActiveRecord::Tasks::DatabaseTasks.singleton_class.prepend(ActiveRecord::Tasks::DatabaseTasks)
|
data/lib/switchman/version.rb
CHANGED
data/lib/tasks/switchman.rake
CHANGED
@@ -209,21 +209,28 @@ module Switchman
|
|
209
209
|
|
210
210
|
module ActiveRecord
|
211
211
|
module PostgreSQLDatabaseTasks
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
212
|
+
if ::Rails.version < "7.0"
|
213
|
+
def structure_dump(filename, extra_flags = nil)
|
214
|
+
set_psql_env
|
215
|
+
args = ["--schema-only", "--no-privileges", "--no-owner", "--file", filename]
|
216
|
+
args.concat(Array(extra_flags)) if extra_flags
|
217
|
+
shard = Shard.current.name
|
218
|
+
serialized_search_path = shard
|
219
|
+
args << "--schema=#{Shellwords.escape(shard)}"
|
220
|
+
|
221
|
+
ignore_tables = ::ActiveRecord::SchemaDumper.ignore_tables
|
222
|
+
args += ignore_tables.flat_map { |table| ["-T", table] } if ignore_tables.any?
|
223
|
+
|
224
|
+
args << db_config.database
|
225
|
+
run_cmd("pg_dump", args, "dumping")
|
226
|
+
remove_sql_header_comments(filename)
|
227
|
+
File.open(filename, "a") { |f| f << "SET search_path TO #{serialized_search_path};\n\n" }
|
228
|
+
end
|
229
|
+
else
|
230
|
+
def structure_dump(...)
|
231
|
+
::ActiveRecord.dump_schemas = Switchman::Shard.current.name
|
232
|
+
super
|
233
|
+
end
|
227
234
|
end
|
228
235
|
end
|
229
236
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-
|
13
|
+
date: 2023-07-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|