tapsoob 0.7.1-java → 0.7.3-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tapsoob/operation/push.rb +4 -1
- data/lib/tapsoob/utils.rb +17 -4
- data/lib/tapsoob/version.rb +1 -1
- metadata +11 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fe784ad6a63e0148654d3c557507cbd8279bcbaff7c907d4de574fe246234e7e
|
|
4
|
+
data.tar.gz: 0e758f2f2adc8ecc528042124b2a1dbc2fbae382dc6b767dc69b28394a6e5dfc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73b275d8bf8d588efcfde337a61945a82266406a4e9666df01eada8a58cb419ba2f079b793a5579294c44a8ef7f161617f7f594b54455f39d630114f48fda285
|
|
7
|
+
data.tar.gz: ab62b43a54ca8ad045372c27a04c745ef0012076d7133d9d95cf922327cbe357e42ac01dd5a611e6079e5b05df07ff38d7e2b524baacde0c9a4596aa5f5e2dc9
|
|
@@ -56,7 +56,10 @@ module Tapsoob
|
|
|
56
56
|
filtered_idxs.each do |table, indexes|
|
|
57
57
|
progress = opts[:progress] ? Tapsoob::Progress::Bar.new("#{table} indexes", indexes.size, STDOUT, max_title_width) : nil
|
|
58
58
|
indexes.each do |idx|
|
|
59
|
-
|
|
59
|
+
# Handle both string format (correct) and array format (from older buggy version)
|
|
60
|
+
# idx should be a migration string, but may have been incorrectly stored as [string]
|
|
61
|
+
migration_string = idx.is_a?(Array) ? idx.first : idx
|
|
62
|
+
Tapsoob::Utils.load_indexes(database_url, migration_string)
|
|
60
63
|
progress.inc(1) if progress
|
|
61
64
|
end
|
|
62
65
|
progress.finish if progress
|
data/lib/tapsoob/utils.rb
CHANGED
|
@@ -98,8 +98,6 @@ Data : #{data}
|
|
|
98
98
|
# this is not true for other databases so we must check if the field is
|
|
99
99
|
# actually text and manually convert it back to a string
|
|
100
100
|
def incorrect_blobs(db, table)
|
|
101
|
-
return [] if (db.url =~ /(mysql|mysql2):\/\//).nil?
|
|
102
|
-
|
|
103
101
|
columns = []
|
|
104
102
|
db.schema(table).each do |data|
|
|
105
103
|
column, cdata = data
|
|
@@ -109,10 +107,23 @@ Data : #{data}
|
|
|
109
107
|
end
|
|
110
108
|
|
|
111
109
|
def encode_blobs(row, columns)
|
|
112
|
-
|
|
110
|
+
# Encode columns known to be blobs
|
|
113
111
|
columns.each do |c|
|
|
114
|
-
|
|
112
|
+
if row[c].is_a?(Sequel::SQL::Blob)
|
|
113
|
+
row[c] = base64encode(row[c]) unless row[c].nil?
|
|
114
|
+
elsif !row[c].nil? && row[c].encoding == Encoding::ASCII_8BIT
|
|
115
|
+
# Handle binary data that might not be wrapped in Sequel::SQL::Blob
|
|
116
|
+
row[c] = base64encode(row[c])
|
|
117
|
+
end
|
|
118
|
+
end unless columns.size == 0
|
|
119
|
+
|
|
120
|
+
# Also check all values for Sequel::SQL::Blob objects that might not be in the columns list
|
|
121
|
+
row.each do |key, value|
|
|
122
|
+
if value.is_a?(Sequel::SQL::Blob) && !columns.include?(key)
|
|
123
|
+
row[key] = base64encode(value)
|
|
124
|
+
end
|
|
115
125
|
end
|
|
126
|
+
|
|
116
127
|
row
|
|
117
128
|
end
|
|
118
129
|
|
|
@@ -144,9 +155,11 @@ Data : #{data}
|
|
|
144
155
|
|
|
145
156
|
def export_indexes(dump_path, table, index_data)
|
|
146
157
|
# Use append-only writes to avoid O(n²) complexity
|
|
158
|
+
# Each index_data is a migration string that should be stored as NDJSON
|
|
147
159
|
index_file = File.join(dump_path, "indexes", "#{table}.json")
|
|
148
160
|
|
|
149
161
|
File.open(index_file, 'a') do |file|
|
|
162
|
+
# Store as NDJSON - each line is a JSON-encoded migration string
|
|
150
163
|
file.write(JSON.generate(index_data) + "\n")
|
|
151
164
|
end
|
|
152
165
|
end
|
data/lib/tapsoob/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tapsoob
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.3
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Félix Bellanger
|
|
8
8
|
- Michael Chrisco
|
|
9
|
+
autorequire:
|
|
9
10
|
bindir: bin
|
|
10
11
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
12
|
+
date: 2025-11-25 00:00:00.000000000 Z
|
|
12
13
|
dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name: sequel
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: 5.96.0
|
|
20
|
+
name: sequel
|
|
20
21
|
type: :runtime
|
|
21
22
|
prerelease: false
|
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -25,12 +26,12 @@ dependencies:
|
|
|
25
26
|
- !ruby/object:Gem::Version
|
|
26
27
|
version: 5.96.0
|
|
27
28
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name: thor
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: 1.4.0
|
|
34
|
+
name: thor
|
|
34
35
|
type: :runtime
|
|
35
36
|
prerelease: false
|
|
36
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -39,12 +40,12 @@ dependencies:
|
|
|
39
40
|
- !ruby/object:Gem::Version
|
|
40
41
|
version: 1.4.0
|
|
41
42
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: jdbc-mysql
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: 9.1.0.1
|
|
48
|
+
name: jdbc-mysql
|
|
48
49
|
type: :runtime
|
|
49
50
|
prerelease: false
|
|
50
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -53,12 +54,12 @@ dependencies:
|
|
|
53
54
|
- !ruby/object:Gem::Version
|
|
54
55
|
version: 9.1.0.1
|
|
55
56
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: jdbc-postgres
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: 42.7.0
|
|
62
|
+
name: jdbc-postgres
|
|
62
63
|
type: :runtime
|
|
63
64
|
prerelease: false
|
|
64
65
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -67,12 +68,12 @@ dependencies:
|
|
|
67
68
|
- !ruby/object:Gem::Version
|
|
68
69
|
version: 42.7.0
|
|
69
70
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: jdbc-sqlite3
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: 3.46.1.1
|
|
76
|
+
name: jdbc-sqlite3
|
|
76
77
|
type: :runtime
|
|
77
78
|
prerelease: false
|
|
78
79
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -131,6 +132,7 @@ homepage: https://github.com/Keeguon/tapsoob
|
|
|
131
132
|
licenses:
|
|
132
133
|
- MIT
|
|
133
134
|
metadata: {}
|
|
135
|
+
post_install_message:
|
|
134
136
|
rdoc_options: []
|
|
135
137
|
require_paths:
|
|
136
138
|
- lib
|
|
@@ -145,7 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
145
147
|
- !ruby/object:Gem::Version
|
|
146
148
|
version: '0'
|
|
147
149
|
requirements: []
|
|
148
|
-
rubygems_version: 3.
|
|
150
|
+
rubygems_version: 3.3.26
|
|
151
|
+
signing_key:
|
|
149
152
|
specification_version: 4
|
|
150
153
|
summary: Simple tool to import/export databases.
|
|
151
154
|
test_files:
|