switchman 3.5.4 → 3.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -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: a1565732de1d00cf5e04683eb1d14da6e7a6407aab14dc036ff85b400de8fded
|
4
|
+
data.tar.gz: 6b47f28566414d1bacb7089d5a836c72246ddcdd864f0635950823a80418b09e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41352fccd2fe5346655e06820b8d0afe5f560480b3978f3bbca500dbc62e198a38b3fda435bef7d6d0836887343970a0a35b4fc866132e8331f7dcbfd6ba6cc8
|
7
|
+
data.tar.gz: 3d3fb827b20c7495b6bb70eaa054ed0a972a1ad823861abe7a00b5cf77d80cbbc58e3f9077d02acd3847e2b59ea24501abd525b7116d794dc626fded8430537b
|
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.5
|
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
|