Skip to content

Insight.Database.Schema v EF Code Migrations

Jon Wagner edited this page Aug 27, 2012 · 2 revisions

Insight.Database.Schema vs. EF Code Migrations

So what's the difference between Insight.Database.Schema and EF Code Migrations (EFCM)?

Longevity

Insight: managing upgrades since 2003.

EFCM: new.

Coding

Insight: manage your SQL as SQL. (Even let your DBA look at it.)

EFCM: C# tables, plus some model building syntax that autogenerates SQL.

Managing Migrations

Insight: just modify your SQL and run the installer.

EFCM: modify your objects, then run some scripts that generates migration code, then track the proper order.

Reversability

Insight: undo your change and run the installer.

ECFM: you can the migrator to run back to old versions.

Diffs

Insight: use the ScriptChanges method.

ECFM: you can run the migrator with source and target versions and output a script.

Coupling

Insight: use the installer on its own, or combine it with [Insight.Database], or use another ORM.

ECFM: tied to using EF for your ORM (unless you jump through some hoops).

Complex SQL Things

Insight: works well with SQL things like service broker, partitions, security, etc.

ECFM: not so much. Unless there are some hidden C# attributes I haven't seen yet.