Skip to content

Releases: nabroleonx/dbslice

v1.0.1

Choose a tag to compare

@github-actions github-actions released this 23 Jun 19:55

v1.0.1 (2026-06-23)

This release is published under the MIT License.

Bug Fixes

  • Streaming output not clobbered by post-extraction output handler (#9, e5f99d8)
  • 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

Choose a tag to compare

@github-actions github-actions released this 06 Apr 15:08

v1.0.0 (2026-04-06)

This release is published under the MIT License.

Bug Fixes

  • Improve extraction engine and validation mechanisms (#7, 18c1545)

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

Choose a tag to compare

@github-actions github-actions released this 06 Mar 21:37

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-check and verify-manifest commands

  • 160+ new tests


Detailed Changes: v0.4.0...v0.5.0

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 05 Mar 17:52

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-where option in CLI to enable subqueries in seed WHERE clauses.

  • Updated configuration to include allow_unsafe_where field 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

Choose a tag to compare

@github-actions github-actions released this 03 Mar 23:42

v0.3.0 (2026-03-03)

This release is published under the MIT License.

Features

  • Add env-driven config/CLI precedence and PK-less safety guards (#4, 895058c)
  • feat: add env-driven config/CLI precedence and PK-less safety guards
  • Support database.url placeholders ${VAR} and ${VAR_FILE} in YAML config - Fail fast for missing env vars and unreadable _FILE targets - Add extract env defaults: - DATABASE_URL - DBSLICE_DEPTH - DBSLICE_DIRECTION - DBSLICE_OUTPUT_FORMAT - DBSLICE_ANONYMIZE - DBSLICE_REDACT_FIELDS - Enforce precedence: CLI > Env > Config - Allow init and inspect to fallback to DATABASE_URL when 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

Choose a tag to compare

@github-actions github-actions released this 28 Feb 21:08

v0.2.0 (2026-02-28)

This release is published under the MIT License.

Features

  • Add schema selection support for PostgreSQL adapter (#2, 25b483c)

Detailed Changes: v0.1.3...v0.2.0

v0.1.3

Choose a tag to compare

@github-actions github-actions released this 15 Feb 13:33

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

Choose a tag to compare

@github-actions github-actions released this 15 Feb 05:28

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