![]() |
VOOZH | about |
dotnet add package Fluens.Migrations --version 0.7.4
NuGet\Install-Package Fluens.Migrations -Version 0.7.4
<PackageReference Include="Fluens.Migrations" Version="0.7.4" />
<PackageVersion Include="Fluens.Migrations" Version="0.7.4" />Directory.Packages.props
<PackageReference Include="Fluens.Migrations" />Project file
paket add Fluens.Migrations --version 0.7.4
#r "nuget: Fluens.Migrations, 0.7.4"
#:package Fluens.Migrations@0.7.4
#addin nuget:?package=Fluens.Migrations&version=0.7.4Install as a Cake Addin
#tool nuget:?package=Fluens.Migrations&version=0.7.4Install as a Cake Tool
FluentMigrator base classes and helpers for inbox/outbox tables, dead letters, HiLo sequences, and auditable/deletable columns. Zero Fluens dependencies.
dotnet add package Fluens.Migrations
public class CreateOrdersSchema : FluensMigration
{
public override void Up()
{
Create.Schema("orders");
Create.Table("orders").InSchema("orders")
.WithColumn("id").AsGuid().PrimaryKey()
.WithColumn("number").AsString(50).NotNullable()
.WithColumn("total").AsDecimal().NotNullable()
.WithAuditableAndDeletableColumns()
.WithVersionColumn();
CreateMessagingTables("orders"); // outbox + inbox + dead_letters
CreateHiLoSequence("orders_hilo", "orders");
}
public override void Down()
{
DeleteMessagingTables("orders");
DeleteHiLoSequence("orders_hilo", "orders");
Delete.Table("orders").InSchema("orders");
}
}
Helpers: WithAuditableColumns(), WithDeletableColumn(), WithAuditableAndDeletableColumns(), WithVersionColumn(),
CreateOutboxTable(), CreateOutboxDeliveryTable(), CreateInboxTable(), CreateIngressOutboxTable(), CreateDeadLettersTable(),
CreateMessagingTables(), CreateHiLoSequence(), DeleteOutboxTable(), DeleteOutboxDeliveryTable(), DeleteInboxTable(),
DeleteIngressOutboxTable(), DeleteDeadLettersTable(), DeleteMessagingTables(), DeleteHiLoSequence().
All four messaging tables carry the serialized envelope blob (non-nullable; ADR-0008 — replaces the
bare context column) plus the denormalized routing columns (partition_key, priority, and on outbox
also available_at) so the partial pending indexes can sort / filter on real columns. Each table has a
partial pending index emitted via .WithOptions().Filter(...) so the hot fetch scans only in-flight
rows:
outbox — the terminal marker is sent_at (renamed from the legacy published_at flag; ADR-0009).
Message-TTL columns expires_at (non-nullable, computed from (available_at ?? created_at) at write) and
expired_at (nullable, set in place on TTL expiry — the row is never deleted, only marked). Partial
ix_outbox_pending (WHERE sent_at IS NULL) over (sent_at, priority DESC, created_at).inbox — composite primary key (message_id, handler_type) (one row per subscribing handler). Adds
next_retry_at (stage-2 retry schedule). Partial ix_inbox_pending (WHERE processed_at IS NULL) over
(handler_type, partition_key, priority DESC, message_id).ingress_outbox — primary key message_id (boundary dedup). Partial ix_ingress_pending
(WHERE processed_at IS NULL) over received_at.dead_letters — adds the why-columns handler_type, partition_key, failure_code, exception_type,
attempt_history (jsonb), and the replay marker replayed_at.CreateOutboxDeliveryTable(schema) creates the per-destination delivery table (one row per
(outbox_id, destination_app) pair) with a unique ix_outbox_delivery_outbox_dest index on
(outbox_id, destination_app) for re-fan-out idempotency, an ix_outbox_delivery_destination_app index, and
the partial ix_delivery_pending (WHERE delivered_at IS NULL AND expired_at IS NULL) over
(expires_at, destination_app); CreateMessagingTables creates it alongside outbox/inbox in the module
schema. CreateIngressOutboxTable(schema = "shared") creates the single staging table into which a
peer-delivered batch is written atomically before acking.
Use Fluens.Migrations.PostgreSql for PostgreSQL-specific column types:
using Fluens.Migrations.PostgreSql;
Create.Table("customers").InSchema("orders")
.WithColumn("id").AsInt32().PrimaryKey().Identity()
.WithColumn("email").AsCitext().NotNullable() // case-insensitive text
.WithColumn("created_at").AsTimestampTz().NotNullable(); // timestamp with time zone
Helpers: AsCitext(), AsTimestampTz().
This project is licensed under the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.7.4 | 0 | 6/18/2026 |
| 0.7.2 | 0 | 6/18/2026 |
| 0.7.1 | 0 | 6/18/2026 |
| 0.6.6 | 259 | 3/11/2026 |
| 0.6.5 | 109 | 3/4/2026 |
| 0.6.4 | 103 | 3/4/2026 |
| 0.6.3 | 109 | 3/3/2026 |
| 0.6.2 | 110 | 3/2/2026 |
| 0.6.1 | 107 | 3/2/2026 |
| 0.6.0 | 106 | 3/1/2026 |
| 0.5.7 | 117 | 3/1/2026 |
| 0.5.6 | 105 | 3/1/2026 |
| 0.5.5 | 107 | 2/28/2026 |
| 0.5.4 | 110 | 2/28/2026 |
| 0.5.3 | 113 | 2/27/2026 |
| 0.5.2 | 109 | 2/27/2026 |
| 0.5.1 | 107 | 2/27/2026 |
| 0.5.0 | 116 | 2/26/2026 |
| 0.3.2 | 116 | 2/26/2026 |
| 0.3.1 | 109 | 2/26/2026 |