tapsoob 0.5.12-java → 0.5.15-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/root.rb +4 -0
- data/lib/tapsoob/cli/schema.rb +7 -1
- data/lib/tapsoob/schema.rb +2 -2
- data/lib/tapsoob/version.rb +1 -1
- data/tapsoob.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b51adf658b9af21c0386a4533839158a6fd3a3f6c57b5a15da11aef8b6850580
|
4
|
+
data.tar.gz: ae2e9dfde6726aa931aebd9f83cd009c649a52aaca0bfc99acd29a6d2c3fa29b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2bd2278deb8deffaeef61bd8cac6be7262c6e41c30cd6ecbd31e5a2062ca946e4a49285a11aa4ec9ef9b2c523976c99602337896ffa2b0935226dfea0349067
|
7
|
+
data.tar.gz: 8f5752e79519d5db1bafd0c3df5e128bb6daed0f77083cd47da18317cf60ae6771de903298678100a48516aa9a987986f576eecdf5632b6d0f0bf810ad464dc9
|
data/lib/tapsoob/cli/root.rb
CHANGED
@@ -40,6 +40,7 @@ module Tapsoob
|
|
40
40
|
option :tables, desc: "Shortcut to filter on a list of tables", type: :array, aliases: "-t"
|
41
41
|
option :"exclude-tables", desc: "Shortcut to exclude a list of tables", type: :array, aliases: "-e"
|
42
42
|
option :purge, desc: "Purge data in tables prior to performing the import", default: false, type: :boolean, aliases: "-p"
|
43
|
+
option :"same-db", type: :boolean, default: false
|
43
44
|
option :"skip-duplicates", desc: "Remove duplicates when loading data", default: false, type: :boolean
|
44
45
|
option :"discard-identity", desc: "Remove identity when pushing data (may result in creating duplicates)", default: false, type: :boolean
|
45
46
|
option :progress, desc: "Show progress", default: true, type: :boolean
|
@@ -78,6 +79,9 @@ module Tapsoob
|
|
78
79
|
debug: options[:debug]
|
79
80
|
}
|
80
81
|
|
82
|
+
# Pull only options
|
83
|
+
opts[:same_db] = options[:"same-db"] if options.key?(:"same-db")
|
84
|
+
|
81
85
|
# Push only options
|
82
86
|
opts[:purge] = options[:purge] if options.key?(:purge)
|
83
87
|
opts[:"skip-duplicates"] = options[:"skip-duplicates"] if options.key?(:"skip-duplicates")
|
data/lib/tapsoob/cli/schema.rb
CHANGED
@@ -14,8 +14,14 @@ module Tapsoob
|
|
14
14
|
end
|
15
15
|
|
16
16
|
desc "dump DATABASE_URL", "Dump a database using a database URL"
|
17
|
+
option :indexes, type: :boolean, default: false
|
18
|
+
option :"same-db", type: :boolean, default: false
|
17
19
|
def dump(database_url)
|
18
|
-
|
20
|
+
opts = {}
|
21
|
+
opts[:indexes] = options[:"indexes"]
|
22
|
+
opts[:same_db] = options[:"same-db"]
|
23
|
+
|
24
|
+
puts Tapsoob::Schema.dump(database_url, opts)
|
19
25
|
end
|
20
26
|
|
21
27
|
desc "dump_table DATABASE_URL TABLE", "Dump a table from a database using a database URL"
|
data/lib/tapsoob/schema.rb
CHANGED
@@ -9,14 +9,14 @@ module Tapsoob
|
|
9
9
|
module Schema
|
10
10
|
extend self
|
11
11
|
|
12
|
-
def dump(database_url)
|
12
|
+
def dump(database_url, options = {})
|
13
13
|
db = Sequel.connect(database_url)
|
14
14
|
db.extension :schema_dumper
|
15
15
|
template = ERB.new <<-END_MIG
|
16
16
|
Class.new(Sequel::Migration) do
|
17
17
|
def up
|
18
18
|
<% db.send(:sort_dumped_tables, db.tables, {}).each do |table| %>
|
19
|
-
<%= db.dump_table_schema(table,
|
19
|
+
<%= db.dump_table_schema(table, options) %>
|
20
20
|
<% end %>
|
21
21
|
end
|
22
22
|
|
data/lib/tapsoob/version.rb
CHANGED
data/tapsoob.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapsoob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.15
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Félix Bellanger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 5.
|
33
|
+
version: 5.65.0
|
34
34
|
name: sequel
|
35
35
|
prerelease: false
|
36
36
|
type: :runtime
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 5.
|
41
|
+
version: 5.65.0
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
|
-
rubygems_version: 3.
|
152
|
+
rubygems_version: 3.2.33
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Simple tool to import/export databases.
|