exwiw 0.1.3 → 0.1.4
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 +8 -0
- data/lib/exwiw/query_ast.rb +3 -1
- data/lib/exwiw/query_ast_builder.rb +5 -0
- data/lib/exwiw/version.rb +1 -1
- data/lib/tasks/exwiw.rake +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b5120d6bb2e0b1e32096c8461b5feba65248b3c48e491e94fda0b439a73cfe05
|
|
4
|
+
data.tar.gz: 11ebd135b111b71666c505dd6fb964007cc6fd88143c96d0fb0a5d3df2c7f99e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 10a26785c8ee4d505494fc8576dc9267b4fb20f79a944962dbd6f2d659286b0fe90f06523e18ea597561f6ee18d74255acc765665b992504544b62a05983f4c5
|
|
7
|
+
data.tar.gz: 4bf778905971b929da83c0af4e82245a33efc2a5a303ab4a403cb32e68ab3c07c1811cd69562ef70789f515986d92309c3f6b17011245fdbebf498ce311901d0
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.1.4] - 2026-04-04
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Skip models whose table does not exist in `exwiw:schema:generate` task.
|
|
10
|
+
- Add trailing newline to generated schema files.
|
|
11
|
+
- Fixed foreign key constraint errors when exporting child tables with filters on intermediate tables. Filters from intermediate tables are now correctly included in JOIN clauses. ([#3](https://github.com/riseshia/exwiw/pull/3))
|
|
12
|
+
|
|
5
13
|
## [0.1.3] - 2025-04-02
|
|
6
14
|
|
|
7
15
|
### Fixed
|
data/lib/exwiw/query_ast.rb
CHANGED
|
@@ -20,7 +20,9 @@ module Exwiw
|
|
|
20
20
|
join_table_name: join_table_name,
|
|
21
21
|
primary_key: primary_key,
|
|
22
22
|
}
|
|
23
|
-
|
|
23
|
+
if where_clauses.size.positive?
|
|
24
|
+
hash[:where_clauses] = where_clauses.map { |wc| wc.is_a?(String) ? wc : wc.to_h }
|
|
25
|
+
end
|
|
24
26
|
hash
|
|
25
27
|
end
|
|
26
28
|
end
|
data/lib/exwiw/version.rb
CHANGED
data/lib/tasks/exwiw.rake
CHANGED
|
@@ -14,6 +14,7 @@ namespace :exwiw do
|
|
|
14
14
|
|
|
15
15
|
ActiveRecord::Base.descendants.each do |model|
|
|
16
16
|
next if model.abstract_class?
|
|
17
|
+
next unless model.table_exists?
|
|
17
18
|
next if table_by_name[model.table_name]
|
|
18
19
|
|
|
19
20
|
belongs_tos = model.reflect_on_all_associations(:belongs_to).map do |assoc|
|
|
@@ -51,9 +52,9 @@ namespace :exwiw do
|
|
|
51
52
|
if File.exist?(path)
|
|
52
53
|
current_config = Exwiw::TableConfig.from(JSON.parse(File.read(path)))
|
|
53
54
|
merged_config = current_config.merge(table)
|
|
54
|
-
File.write(path, JSON.pretty_generate(merged_config.to_hash))
|
|
55
|
+
File.write(path, JSON.pretty_generate(merged_config.to_hash) + "\n")
|
|
55
56
|
else
|
|
56
|
-
File.write(path, JSON.pretty_generate(table.to_hash))
|
|
57
|
+
File.write(path, JSON.pretty_generate(table.to_hash) + "\n")
|
|
57
58
|
end
|
|
58
59
|
end
|
|
59
60
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: exwiw
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shia
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: serdes
|
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
73
73
|
- !ruby/object:Gem::Version
|
|
74
74
|
version: '0'
|
|
75
75
|
requirements: []
|
|
76
|
-
rubygems_version:
|
|
76
|
+
rubygems_version: 4.0.3
|
|
77
77
|
specification_version: 4
|
|
78
78
|
summary: Ruby gem that allows you to export records from a database to a dump file.
|
|
79
79
|
test_files: []
|