Releases: nabroleonx/dbslice
Release list
v1.0.1
v1.0.1 (2026-06-23)
This release is published under the MIT License.
Bug Fixes
- fix: streaming output not clobbered by post-extraction output handler
In streaming mode, _do_streaming_extract writes data directly to the output file and returns an ExtractionResult with an intentionally empty tables dict (data lives in the file, not in memory). The CLI then called _generate_and_output_sql unconditionally, which regenerated SQL from the empty tables and wrote the resulting BEGIN; ... COMMIT; shell back to the same path — clobbering the streamed content.
The bug is silent: dbslice logs Wrote <N> rows to <path> and exits 0, but the file is left as a ~400-byte empty shell.
Fix: add was_streamed: bool to ExtractionResult, set it to True in _do_streaming_extract, and short-circuit the SQL/JSON/CSV output handlers when the flag is set. The streamed file is preserved as-is.
Closes #8.
- fix: address review — reject non-SQL streaming up front, single output guard
Streaming writes SQL directly to disk; it has no JSON/CSV path. Instead of defensively short-circuiting every output handler (which would silently preserve SQL content under a .json/.csv name), reject the unsupported combo:
- _should_use_streaming() returns False for any non-SQL output_format, so the auto-threshold path never streams SQL into a JSON/CSV file. (This was a latent bug: the gate keyed only on row count + output_file, not format.) - CLI rejects an explicit --stream for non-SQL output before extraction. - Consolidate the three per-handler streamed-result skips into one guard in _handle_output_format(); only SQL reaches it now. - Set was_streamed=True at the source of truth (StreamingExtractionEngine .stream_to_file) so direct callers and the CLI see consistent metadata; drop the redundant wrapper assignment. - Regression test now drives the real streaming engine through _handle_output_format and asserts the streamed file is byte-for-byte unchanged; add _should_use_streaming format-gate test; fix devnull leak.
Detailed Changes: v1.0.0...v1.0.1
v1.0.0
v1.0.0 (2026-04-06)
This release is published under the MIT License.
Bug Fixes
Consolidate duplicate WHERE clause validation, fix NULL filtering inconsistency in FK traversal, add seed cardinality limits, fix Decimal precision loss in JSON output, type ExtractionResult fields, and refactor streaming deferred updates to use chunked fetching.
Additionally, it addresses five previously unimplemented review findings:
- Use \N sentinel for NULL in CSV output to distinguish from empty string - Raise error when passthrough table has no primary key (was silently skipped) - Add --statement-timeout CLI flag for PostgreSQL query timeout - Validate anonymizer provider names at configure time (catch typos) - Add post-extraction compliance manifest validation
BREAKING CHANGE: - JSON output now serializes Decimal values as strings (e.g., "99.99") instead of floats to preserve exact precision. - CSV output now uses \N for NULL values instead of an empty string. - Passthrough tables without a primary key now raise an error instead of being silently skipped.
Breaking Changes
-
- JSON output now serializes Decimal values as strings (e.g., "99.99") instead of floats to preserve exact precision.
Detailed Changes: v0.5.0...v1.0.0
v0.5.0
v0.5.0 (2026-03-06)
This release is published under the MIT License.
Features
-
Add compliance profiles, PII scanning, and column mapping UI (#6,
243efba) -
GDPR, HIPAA Safe Harbor, and PCI-DSS profiles that auto-configure masking
-
Two-phase PII value scanning (pre-mask coverage + post-mask residual)
-
Custom transformers for Safe Harbor (year_only, zip3, age_bucket)
-
Free-text redaction, binary column handling, k-anonymity checks
-
Non-deterministic anonymization mode
-
Audit manifests with file hashes and optional HMAC signing
-
Policy gates, source guardrails, breakglass workflow
-
Local browser UI for column mapping and config export (dbslice map)
-
inspect
--compliance-checkand verify-manifest commands -
160+ new tests
Detailed Changes: v0.4.0...v0.5.0
v0.4.0
v0.4.0 (2026-03-05)
This release is published under the MIT License.
Features
-
Add support for unsafe WHERE subqueries in seed specifications (#5,
d246247) -
Introduced
--allow-unsafe-whereoption in CLI to enable subqueries in seed WHERE clauses. -
Updated configuration to include
allow_unsafe_wherefield for extraction settings. -
Enhanced PostgreSQL adapter to handle unsafe WHERE clauses based on configuration.
-
Modified validation logic to allow subqueries when explicitly opted in.
-
Added tests for implicit foreign key detection and cycle fallback behavior.
-
Updated existing tests to cover new functionality and ensure security measures are in place.
Detailed Changes: v0.3.0...v0.4.0
v0.3.0
v0.3.0 (2026-03-03)
This release is published under the MIT License.
Features
- feat: add env-driven config/CLI precedence and PK-less safety guards
- Support
database.urlplaceholders${VAR}and${VAR_FILE}in YAML config - Fail fast for missing env vars and unreadable_FILEtargets - Add extract env defaults: -DATABASE_URL-DBSLICE_DEPTH-DBSLICE_DIRECTION-DBSLICE_OUTPUT_FORMAT-DBSLICE_ANONYMIZE-DBSLICE_REDACT_FIELDS- Enforce precedence:CLI > Env > Config- Allowinitandinspectto fallback toDATABASE_URLwhen URL arg is omitted - Harden PK-less behavior: - error on PK-less seed tables - skip non-seed PK-less PK/FK fetch paths safely with warnings - Update docs for placeholder semantics, env formats, and precedence - Add unit/integration coverage for env resolution/fallback and PK-less safety
- test: clarify assertion for PK-less parent table in extraction test
Detailed Changes: v0.2.0...v0.3.0
v0.2.0
v0.2.0 (2026-02-28)
This release is published under the MIT License.
Features
Detailed Changes: v0.1.3...v0.2.0
v0.1.3
v0.1.3 (2026-02-15)
This release is published under the MIT License.
Bug Fixes
- Remove depth limit on up traversal to ensure referential integrity (
36035ab)
Detailed Changes: v0.1.2...v0.1.3
v0.1.2
v0.1.2 (2026-02-15)
This release is published under the MIT License.
Bug Fixes
- Clean up redundant test runs in release (
86e320b)
Detailed Changes: v0.1.1...v0.1.2