| Authoring style |
Classic provider API + Fluent migration builder |
Handwritten C# Fluent DSL |
C# generated from model changes; editable |
SQL scripts; C# scripts also supported |
Versioned SQL files |
C# Up/Down; typed schema APIs and declarative model attributes |
SQL scripts in ordered folders |
| ORM-independent workflow |
Yes |
Yes |
Uses EF model and DbContext |
Yes |
Yes |
Uses OrmLite models and connections; no EF dependency |
Yes |
|
Generate migrations from model differences
|
No built-in generator |
Hand-authored |
Yes — model snapshots |
Hand-authored |
Hand-authored |
✓ Live database/model diff; generates reviewable C# migrations |
✗ Hand-authored scripts |
| Raw SQL |
✓ ExecuteNonQuery / fluent Execute.Sql / scripts |
✓ Execute.Sql / scripts |
✓ migrationBuilder.Sql |
✓ Primary workflow |
✓ Primary workflow |
✓ Db.ExecuteSql / custom SQL hooks |
✓ Primary workflow |
| Downgrade an applied version |
Authored Down() or supported automatic reversal
|
Down(); auto-reverse for supported expressions
|
Down(); target an earlier migration |
Forward fixes; custom undo workflow |
Forward fixes; no Down command |
Authored Down(); runner revert commands |
Forward fixes; no automatic Down migrations |
| History / module separation |
Scope-filtered discovery + history
|
Custom version tables + migration filtering |
Separate contexts / migrations + custom history tables
|
Separate journals + script filtering |
Metadata table/schema + script locations |
Named connections; migration history in the primary database |
Configurable tracking schema and script folders; repository/version labels |
| Transactions |
Per migration by default; none or whole session (SQLite, PostgreSQL, SQL Server) |
Per migration by default; configurable |
Most migrations wrapped automatically |
Opt-in per script or whole run; none by default |
Per migration by default; whole-run option |
Per migration; database DDL limits apply |
Opt-in migration transaction; SQL Server/PostgreSQL support; other reviewed providers disable it |
| Execution / deployment |
Library + CLI |
In-process runner + CLI |
CLI, SQL scripts, bundles, runtime API |
Library; host in a console app or application |
.NET library, .NET tool, CLI |
Library + AppTasks / application host |
CLI, .NET tool, self-contained executable and Docker |
| Database abstraction |
Provider dialects for schema operations |
Provider-specific SQL generators |
Relational providers; migrations may differ by provider
|
Database integrations; you write dialect-specific SQL |
Database integrations; you write dialect-specific SQL |
Typed model/schema/query APIs with provider dialects |
Database integrations; you write dialect-specific SQL |
| Repeatable / recurring work |
Ordered maintenance + named profiles; no checksum repeatables |
Maintenance migrations / profiles |
Seeding APIs (EF 9+); custom code |
RunAlways scripts |
Repeatable SQL reruns on checksum change |
Explicit migration reruns/reverts; custom recurring work |
Anytime scripts on hash changes; Everytime scripts each run |
| Automatic SQLite reconstruction |
✓ Live-schema rebuilds; no ORM model |
✗ Manual for general column and foreign-key alterations |
✓ Rebuilds for model-represented artifacts |
✗ Author scripts |
✗ Author scripts |
✓ Model-based schema-diff rebuilds; RebuildTable API |
✗ Author scripts |
| Planning and SQL preview |
Read-only version plan; connected/offline SQL subset |
Preview/output |
Generated SQL scripts |
Authored SQL / pending scripts |
Authored SQL |
Schema diff with SQL and C# migration output; model-based |
Authored SQL + --dryrun / up-to-date check |
| Deployment coordination |
Opt-in native locks: SQL Server, PostgreSQL, MySQL/MariaDB |
Application-lock pattern / deployment orchestration |
Migration locking; execution-path dependent |
Host/provider concern |
Cluster setting; provider-dependent |
In-progress history/timeout check; serialize deployments externally |
External deployment coordination |
| Schema, triggers and data operations |
| Create / drop tablesStructured table definitions and lifecycle operations. | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ |
| Rename tablesNative DDL or provider emulation; OrmLite exposes column rename but no dedicated table-rename API. | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ |
| Rename columnsNative DDL or provider emulation; engine restrictions apply to every framework. | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ |
| Change column type, default or nullabilityConversion and preservation rules depend on the provider. | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ |
| Primary / foreign keysDedicated key definitions on applicable providers. | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ |
| Composite primary keysMulti-column primary keys; OrmLite models require a single primary key. | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ |
| Composite foreign keysMulti-column references; OrmLite's reviewed foreign-key API maps one field at a time. | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ |
| Composite unique constraints / indexesEnforce uniqueness across a group of columns. | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ |
| Filtered indexes / conditional uniquenessProvider-specific filters and index options are not universal engine capabilities. | ✓ | ✓ | ✓ | ✗ | ✗ | ✓ | ✗ |
| Conditional guard triggersA reusable definition rejects writes when its predicate matches. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Related-row EXISTS guard rulesCorrelate affected rows with related tables without writing a trigger body. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Null-safe OLD / NEW change predicatesCompose change rules, including null transitions and negation. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Atomic multirow guard enforcementReject the whole statement if any affected row violates the guard. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Transactional JSON audit triggersRecord keys, operation, UTC time and previous values through a dedicated API. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Conditional auditing / selected JSON fieldsFilter audit events and declare the fields in each snapshot. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| General declarative trigger actionsArbitrary actions such as dependent-row updates require SQL or custom code; dedicated guard and audit APIs are compared above. | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Structured stored-procedure / function definitionsA dedicated definition API, rather than executing a hand-written SQL body. | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Filtered view query + lifecycle APIStructured view creation, replacement and removal. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| View queries with joins / correlated predicatesInner/left joins, aliases, grouped predicates and correlated EXISTS. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Portable binary byte-length CHECK rulesA typed expression translates byte-length semantics for the selected provider. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Portable JSON validity / shape CHECK rulesTyped JSON validation and array/object checks on applicable providers. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
| Projected INSERT … SELECTExplicit target mapping and server-side data movement through a query API. | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ |
| CASE / COALESCE in data projectionsCompose defaults and conditional projected values without a SQL string. | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ |
| Partitioned ROW_NUMBER projectionsWindow numbering inside the migration query API; deterministic ordering is required. | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ |
| Ordered / limited / anti-join data selectionBuild ordered seeds and NOT EXISTS selection on the server. | ✓ | ✗ | ✗ | ✗ | ✗ | ✓ | ✗ |
| SQLite rebuild preservation of views / triggersLive-schema preservation, dependency validation and savepoint rollback, including external and TEMP objects. | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |