exwiw 0.4.4 → 0.4.6
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/CHANGELOG.md +12 -0
- data/lib/exwiw/adapter/mysql_adapter.rb +5 -4
- data/lib/exwiw/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: dac24d68af7c0c39949a11c810cccc14e6818ac0edb9198a3a6b846d2d81bcee
|
|
4
|
+
data.tar.gz: c4b111dc3dccc8940627b7dcabf2ea5633300eb5e670b52ec8683e78a2922040
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15cdaa9351b32c3159f27a79204506f557825441d2c8253da5981d0e903504240963fcf279a34c28b02f084004f9d728499ee8fb3ea609a94b3583b72f8b8ce8
|
|
7
|
+
data.tar.gz: 7b7de3276484ce8bb97164f26aed9dc23f25f51736065c0f3f15337be49f82db322bbe16534fc77c0ad85fefd55fa1e825b25933b8c2f0e85e50694da6333f2f
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.4.6] - 2026-06-08
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- MySQL: INSERT statements now escape backslashes (`\` → `\\`) in string literals. Previously, values containing backslashes — such as JSON columns with `\"` sequences — were corrupted on restore because MySQL interprets `\` as an escape character in single-quoted strings. ([#85](https://github.com/heyinc/exwiw/pull/85))
|
|
10
|
+
|
|
11
|
+
## [0.4.5] - 2026-06-08
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- MySQL: INSERT statements now backtick-quote table and column names. Previously, columns whose name is a MySQL reserved word (e.g. `key` in `active_storage_blobs`) caused syntax errors on restore. ([#83](https://github.com/heyinc/exwiw/pull/83))
|
|
16
|
+
|
|
5
17
|
## [0.4.4] - 2026-06-05
|
|
6
18
|
|
|
7
19
|
### Fixed
|
|
@@ -111,10 +111,10 @@ module Exwiw
|
|
|
111
111
|
values = value_list.join(",\n")
|
|
112
112
|
|
|
113
113
|
if table.rails_managed?
|
|
114
|
-
"INSERT INTO
|
|
114
|
+
"INSERT INTO `#{table_name}` VALUES\n#{values};"
|
|
115
115
|
else
|
|
116
|
-
column_names = table.columns.map
|
|
117
|
-
"INSERT INTO
|
|
116
|
+
column_names = table.columns.map { |c| "`#{c.name}`" }.join(', ')
|
|
117
|
+
"INSERT INTO `#{table_name}` (#{column_names}) VALUES\n#{values};"
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
120
|
|
|
@@ -249,7 +249,8 @@ module Exwiw
|
|
|
249
249
|
when nil
|
|
250
250
|
"NULL"
|
|
251
251
|
when String
|
|
252
|
-
qv =
|
|
252
|
+
qv = value.gsub('\\') { '\\\\' }
|
|
253
|
+
qv = escape_single_quote(qv)
|
|
253
254
|
"'#{qv}'"
|
|
254
255
|
else
|
|
255
256
|
value
|
data/lib/exwiw/version.rb
CHANGED