tapsoob 0.5.16-java → 0.5.18-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tapsoob/cli/data_stream.rb +1 -0
- data/lib/tapsoob/cli/root.rb +2 -0
- data/lib/tapsoob/operation.rb +1 -1
- data/lib/tapsoob/schema.rb +2 -2
- data/lib/tapsoob/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 264143377d615e0ea97a2a4662223fc092d596439e04d26dd4d55a6573f42376
|
4
|
+
data.tar.gz: f529f8fc13c44d6fa58bbf93bc31024c25356ef24f2618ce9891d50e49849ddd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 945524a15035febcf6e8e29f4a158012128e7144cbfcd7d63207e9608554adf23989865f620932a1afc00e93db234be7108b8fdaa2bd08af71052bb1d80fb385
|
7
|
+
data.tar.gz: b7351a86a5f4c3e37dc9751adb9c4c9e0cd2e52d4b0c53caa38b73e94e1e953bb5ab4921819940ca50a66d96f7d8529d7484aa986e3e948ed7dd9b239bae1e01
|
data/lib/tapsoob/cli/root.rb
CHANGED
@@ -18,6 +18,7 @@ module Tapsoob
|
|
18
18
|
option :"disable-compression", desc: "Disable Compression", default: false, type: :boolean, aliases: "-g"
|
19
19
|
option :tables, desc: "Shortcut to filter on a list of tables", type: :array, aliases: "-t"
|
20
20
|
option :"exclude-tables", desc: "Shortcut to exclude a list of tables", type: :array, aliases: "-e"
|
21
|
+
option :"indexes", type: :boolean, default: false
|
21
22
|
option :"same-db", type: :boolean, default: false
|
22
23
|
option :progress, desc: "Show progress", default: true, type: :boolean
|
23
24
|
option :debug, desc: "Enable debug messages", default: false, type: :boolean
|
@@ -80,6 +81,7 @@ module Tapsoob
|
|
80
81
|
}
|
81
82
|
|
82
83
|
# Pull only options
|
84
|
+
opts[:indexes] = options[:"indexes"] if options.key?(:"indexes")
|
83
85
|
opts[:same_db] = options[:"same-db"] if options.key?(:"same-db")
|
84
86
|
|
85
87
|
# Push only options
|
data/lib/tapsoob/operation.rb
CHANGED
@@ -183,7 +183,7 @@ module Tapsoob
|
|
183
183
|
|
184
184
|
progress = ProgressBar.new('Schema', tables.size)
|
185
185
|
tables.each do |table_name, count|
|
186
|
-
schema_data = Tapsoob::Schema.dump_table(database_url, table_name)
|
186
|
+
schema_data = Tapsoob::Schema.dump_table(database_url, table_name, @opts.slice(:indexes, :same_db))
|
187
187
|
log.debug "Table: #{table_name}\n#{schema_data}\n"
|
188
188
|
output = Tapsoob::Utils.export_schema(dump_path, table_name, schema_data)
|
189
189
|
puts output if dump_path.nil? && output
|
data/lib/tapsoob/schema.rb
CHANGED
@@ -31,14 +31,14 @@ END_MIG
|
|
31
31
|
template.result(binding)
|
32
32
|
end
|
33
33
|
|
34
|
-
def dump_table(database_url, table)
|
34
|
+
def dump_table(database_url, table, options)
|
35
35
|
table = table.to_sym
|
36
36
|
Sequel.connect(database_url) do |db|
|
37
37
|
db.extension :schema_dumper
|
38
38
|
<<END_MIG
|
39
39
|
Class.new(Sequel::Migration) do
|
40
40
|
def up
|
41
|
-
#{db.dump_table_schema(table,
|
41
|
+
#{db.dump_table_schema(table, options)}
|
42
42
|
end
|
43
43
|
|
44
44
|
def down
|
data/lib/tapsoob/version.rb
CHANGED