Matthew Groves

Camp Counselor

Using Fluent Migrations to Put Your Schema in Git

Event Logo

Tuesday, July 25, 2023 - 9:00 PM UTC, for 1 hour.

Regular, 60 minute presentation

Room: African 70

migrations
SQL
NoSQL
scripting

I just made a change to the database schema, but now the team needs it for my feature to work. How can I keep track of my database changes and communicate them to the rest of the team? Migrations give a structured way to structurally alter your database structure as your application evolves . . . structurally. They also provide a way for everyone on the team: developers, testers, CI admins, DBAs, etc, to apply the latest changes wherever they are needed - with uniformity and low friction. Fluent Migrations for .NET provide a discoverable, human readable API that supports dozens of different databases (including SQL Server, PostgreSQL, Oracle). Topics covered in this session: * Why you should use migrations * How to write fluent migrations * A look behind the scenes of how fluent migrations work * Drawbacks/downsides to using migrations * Other migration options for EF and NoSQL (Couchbase) Ad hoc SQL scripts make you want to flip a desk? Keep your team on the same page with fluent migrations. (This session will briefly mention EF Migrations, but is not primarily about EF).

Prerequisites

This session is heavily C#/.NET based, so you will benefit the most if you are familiar with those. Knowledge of databases, especially relational, will be helpful. This session will *not* be explaining or showing source control/Git, but it also does not depend on your knowledge of any particular source control tool ("Git" in the title is just shorthand for "source control"). This session is *not* using EF Migrations, but if you have some knowledge of them, it may be helpful for you to compare/contrast. "Migration" in the context of this session means "the migration of data structures as your program evolves". It does not mean "the movement of data from one database to another".

Take Aways

  • What database migrations are
  • Why database migrations are important
  • A discussion of database migrations and NoSQL
  • Pros/cons of using a migration approach
  • How to get started using Fluent Migrations
  • A brief summary of alternative tools for database migration
favorited by:
Dave Smith Timothy Tyson Nick Heidke Dan Willman Eric Olsson David Tran Jason Von Ruden Josh Gretz Drew Douglas Allen Zaudtke Adam Miller Jer Lance Kevin Kelchen Jordan Leven Brett Allenstein Kenzie Johnson Brian Robertson Steve Jones Matthew Ives Mario Aranda Alice Kim Ben Walters Steven Welter Robert Derman Dave Boulineau Josh Kinstler Matthew Groves Edmund Greaves James McCollum