You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 31, 2026. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,11 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
8
-
## [6.2.0] - 2026-07-28
8
+
## [6.2.0] - unreleased
9
9
10
10
### Added
11
11
-**Cascading Soft Deletes (Phase 6):** Added `cascade_soft_delete` option to `has_many` and `has_one` relations. When a parent model is soft-deleted, all dependent children are now automatically soft-deleted in a recursive, transactional manner, ensuring referential logic integrity without breaking changes.
12
-
-**Declarative Struct-Based Migrations (MVP):** Introduced the foundational AST-parsing engine (`schema_diff.rs`) to power the new `artisan make:migration:auto` command. This engine leverages `syn` to read local `.rs` files and dynamically compare Rust structs against the live database, scaffolding missing tables and columns automatically. As an MVP, this engine prioritizes data safety by solely generating additive SQL (CREATE TABLE / ADD COLUMN) and intentionally bypassing destructive operations.
12
+
-**Declarative Struct-Based Migrations (Safe Additive):** Introduced the foundational AST-parsing engine (`schema_diff.rs`) to power the new `artisan make:migration:auto` command. This engine leverages `syn` to read local `.rs` files and dynamically compare Rust structs against the live database, scaffolding missing tables and columns automatically. Currently, this engine prioritizes data safety by solely generating additive SQL (CREATE TABLE / ADD COLUMN) and intentionally bypassing destructive operations. (Note: Full destructive capabilities will be implemented in future versions protected by 'Safe by Default' mechanisms like `--allow-destructive` flags).
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,8 @@ In traditional Rust database handling, you have to write raw SQL queries, manage
57
57
-**Data Governance & Privacy**: Compile-time GDPR/LGPD compliance with at-rest encryption and log masking.
58
58
-**Scout Search**: Seamlessly sync models to full-text search engines.
59
59
-**Database-First Introspection**: The official framework CLI (`cargo rullst generate:models`) connects to legacy databases and generates your `#[derive(Orm)]` Rust structs automatically.
60
+
-**Declarative Struct-Based Migrations**: Safely auto-generate additive SQL migrations (`make:migration:auto`) directly from your Rust struct definitions.
61
+
-**Cascading Soft Deletes**: Configure relationships to automatically soft-delete dependent children records in a single transaction.
60
62
-**Type-Safe Partial Updates**: Virtual dirty checking with `.update_partial()` to intelligently modify only changed columns.
61
63
-**Model Policies (Authorization)**: Laravel-style fine-grained access control securely tied to your structs via `#[orm(policy = "MyPolicy")]`.
62
64
-**Strict Lazy Loading Prevention**: Enable a global toggle to instantly panic on N+1 queries during development.
Copy file name to clipboardExpand all lines: ROADMAP.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,8 @@ We introduced the `strict-postgres`, `strict-mysql`, and `strict-sqlite` feature
77
77
Our goal is to provide tools that normally cost thousands of dollars, completely free and open-source, ensuring `rullst-orm` stands unrivaled in the Rust ecosystem.
78
78
79
79
-[x]**Native Core Multi-tenancy (Global Scopes)**: Automatic Global Scopes isolate tenant data in SaaS. With `#[orm(global_scope = "tenant")]`, the ORM injects `WHERE tenant_id = X` and prevents leaks; requiring global access demands explicit and noisy calls like `.unscoped()`.
80
-
-[ ]**Declarative Struct-Based Migrations (AST-Driven)**: Automatic bidirectional synchronization reading Rust structs to generate corresponding SQL migrations, supporting codemods to apply perfectly formatted `ALTER TABLE` via the `cargo rullst upgrade` command.
80
+
-[x]**Declarative Struct-Based Migrations (Safe Additive)**: Automatic synchronization reading Rust structs to generate corresponding SQL migrations (tables and columns) via the `make:migration:auto` command, guaranteeing data safety.
81
+
-[ ]**Declarative Migrations (Destructive Operations)**: Implement full resource synchronization (dropping columns and tables) protected by "Safe by Default" patterns (e.g., `--allow-destructive` flag or commented-out SQL generation) to prevent accidental data loss.
81
82
-[x]**Strict Lazy Loading Prevention**: A Laravel-inspired feature (`Orm::prevent_lazy_loading(true)`) that throws a loud runtime error during development/testing if a relationship is accessed without being eager-loaded, completely preventing N+1 issues without polluting the codebase with strict typestates.
82
83
-[x]**Type-Safe Partial Updates (Virtual Dirty Checking)**: A macro-driven mechanism that tracks changed properties in memory, generating an `UPDATE` only for modified columns without overhead, using typing to honor database constraints (e.g., not null).
83
84
-[x]**Automated Compliance & Data Governance (GDPR/LGPD)**: `#[derive(PersonalData)]` macro for out-of-the-box privacy reports, and `SecretString` for transparent AES-256-GCM encryption at rest, preventing accidental data leakage.
@@ -88,7 +89,7 @@ Our goal is to provide tools that normally cost thousands of dollars, completely
88
89
-[x]**Rullst ORM Admin Panel**: A drop-in function that generates a beautiful web dashboard to manage your data without writing frontend code.
89
90
-[x]**API Resources & Transformers**: A declarative way to transform Rullst Models and eager-loaded relationships into clean JSON API responses, handling hidden fields, date formatting, and nested relations effortlessly.
90
91
-[x]**Schema Visualizer (Mermaid ER Diagrams)**: A CLI command (`cargo rullst generate:diagram`) that reads models and outputs a Mermaid markdown file showing database architecture and relationships.
91
-
-[]**Cascading Soft Deletes**: Automatic recursive soft deletion. If a parent is soft-deleted, automatically apply soft deletes to dependent children (`ON DELETE CASCADE` equivalent for logical deletes).
92
+
-[x]**Cascading Soft Deletes**: Automatic recursive soft deletion. If a parent is soft-deleted, automatically apply soft deletes to dependent children (`ON DELETE CASCADE` equivalent for logical deletes).
92
93
-[x]**Native Enum Mapping**: Clean, type-safe mapping of Rust `enum` to database `ENUM` types (PostgreSQL/MySQL) or secure string constraints (SQLite).
93
94
94
95
## 🧠 Phase 7: The Future (AI, Quantum & Infrastructure)
Copy file name to clipboardExpand all lines: website/docs/2-relationships.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,21 @@ pub struct Post {
56
56
}
57
57
```
58
58
59
+
### Cascading Soft Deletes
60
+
61
+
When using Soft Deletes (`deleted_at`), you can configure relationships to automatically soft-delete dependent children when the parent is soft-deleted.
62
+
63
+
```rust
64
+
#[derive(Debug, Clone, FromRow, Orm)]
65
+
pubstructUser {
66
+
pubid:i32,
67
+
68
+
// If the User is soft-deleted, all their posts will be soft-deleted automatically!
Copy file name to clipboardExpand all lines: website/docs/4-migrations-schema.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -88,3 +88,9 @@ Reverts the last batch of executed migrations by triggering their `down()` or `d
88
88
cargo run -- make:audit
89
89
```
90
90
Automatically seeds the `rullst_audits` tracking table into your schema to support the `#[orm(auditable)]` feature.
91
+
92
+
#### 5. Declarative Migrations (Auto MVP)
93
+
```bash
94
+
cargo run -- make:migration:auto
95
+
```
96
+
An experimental MVP feature that compares your Rust structs (`#[derive(Orm)]`) directly against the live database and automatically generates additive SQL (creating missing tables and columns) without manual intervention. It prioritizes data safety by ignoring destructive operations (like drops).
0 commit comments