Skip to content

Commit d003d27

Browse files
committed
chore: Bump version to 0.4.0
1 parent 7b77240 commit d003d27

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## 0.4.0 - 2025-12-28
9+
10+
### Added
11+
12+
- SQLx framework support - Full support for all 4 SQLx migration formats
13+
- Framework configuration - New required `framework` field in `diesel-guard.toml`
14+
- Valid values: `"diesel"` or `"sqlx"`
15+
- Explicit framework selection for clear configuration
16+
- MigrationFile builder pattern - Cleaner API with `new()`, `with_direction()`, `with_no_transaction()`
17+
18+
### Changed
19+
20+
- Shared adapter utilities - `should_check_migration()` and `collect_and_sort_entries()` moved to shared module
21+
- Improved CONCURRENTLY detection - Uses regex pattern matching instead of simple string contains
22+
823
## 0.3.0 - 2025-12-13
924

1025
### Added

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
name = "diesel-guard"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
edition = "2021"
55
authors = ["Alex Yarotsky <https://github.com/ayarotsky>"]
6-
description = "Catch unsafe PostgreSQL migrations in Diesel before they take down production"
6+
description = "Catch unsafe PostgreSQL migrations in Diesel and SQLx before they take down production"
77
license = "MIT"
88
repository = "https://github.com/ayarotsky/diesel-guard"
99
homepage = "https://github.com/ayarotsky/diesel-guard"

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -819,14 +819,14 @@ jobs:
819819
- uses: actions/checkout@v4
820820

821821
# Pin to specific version (recommended for stability)
822-
- uses: ayarotsky/diesel-guard@v0.2.0
822+
- uses: ayarotsky/diesel-guard@v0.4.0
823823
with:
824824
path: migrations/
825825
```
826826
827827
**Versioning:**
828828
- The action automatically installs the diesel-guard CLI version matching the tag
829-
- `@v0.2.0` installs diesel-guard v0.2.0
829+
- `@v0.4.0` installs diesel-guard v0.4.0
830830
- `@main` installs the latest version
831831

832832
**Alternatives:**
@@ -1093,32 +1093,35 @@ large_table_rows = 100000
10931093
large_table_size_mb = 1024
10941094
```
10951095

1096-
### Phase 3: Diesel Integration - All-in-One Migration Suite
1096+
### Phase 3: Framework Integration - All-in-One Migration Suite
10971097

1098-
**Goal:** Integration with `diesel_migrations` to become the single tool for both safety checking and migration execution.
1098+
**Goal:** Integration with Diesel and SQLx migration ecosystems to become the single tool for both safety checking and migration execution.
10991099

11001100
#### Core Integration Features
11011101

1102-
1. **Native Diesel CLI replacement**
1102+
1. **Native migration CLI replacement**
11031103
```bash
11041104
# Instead of:
11051105
diesel migration run
11061106
diesel migration revert
11071107
11081108
# Users can:
1109-
diesel-guard migrate run # Checks safety, then runs
1110-
diesel-guard migrate revert # Checks down.sql safety, then reverts
1111-
diesel-guard migrate status # Show migration status + safety summary
1109+
diesel-guard migrate run # Checks safety, runs with sqlx migrate run
1110+
diesel-guard migrate revert # Checks safety, reverts migrations
11121111
```
11131112

11141113
2. **Automatic safety checking before execution**
11151114
- Run all safety checks before applying any migration
11161115

11171116
3. **Migration generation with safe templates**
11181117
```bash
1118+
# Works for both Diesel and SQLx based on diesel-guard.toml config
11191119
diesel-guard migration generate add_user_email
11201120
1121-
# Generates migration with safety comments and safe patterns:
1121+
# Generates migration with safety comments and safe patterns
1122+
# (format depends on configured framework)
1123+
#
1124+
# Example for Diesel:
11221125
# up.sql:
11231126
# -- Migration: Add email column to users
11241127
# -- Safe pattern: Add without default, backfill separately

0 commit comments

Comments
 (0)