Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

What is a Migration?

It's a different kind of task or software project where it's necessary to change from:

  • One version to another (from Spring boot 2x to 3x)
  • From one technology to another (like from Python to Scala)
  • From one version of the database to another like (Postgres 16 to Postgres 17)
  • From one cloud provider to another (AWS to GCP)
  • From one framework to another (like from Angular to React)

Migrations are necessary for a variety of reasons, like:

  • Security: To handle security issues and vulnerabilities
  • Performance: To improve performance and scalability
  • Cost: To reduce costs
  • Design and maintainability: To improve design and maintainability
  • New features: To take advantage of new features and capabilities

Challenges in Migrations

Migrations are difficult for a variety of reasons:

  • Complexity: Migrations can be complex, especially for large applications with many dependencies. Might require a specific order of operations.
  • Downtime: Migrations can require downtime, which can be disruptive to users. Not all migrations require downtime, but it's easier with downtime.
  • Data Loss: There is a risk of data loss during migrations, especially if not done carefully (in case of database or encryption migrations).
  • Time Pressure: Teams are usually focused on features and migrations take this time away from them.
  • Testing: Migrations require extensive testing to ensure that everything works correctly after the migration. Usually testing is not perfect, which forces migrations to discover problems that were buried in the old system.

Difficult Reality at Scale

Migrations don't happen as often as they should.

A lot of technical debt.

The thing is that the more often you do migrations, the easier it gets, but only if you have good overall architecture and operating principles; otherwise, it's a war that never ends.

Migrations are easily one of the biggest pains at scale. Not because migrations are impossible, but because people tend to not take them seriously enough and a snowball effect happens. Once the snowball starts rolling, it gets harder and harder to do migrations.

Why use AI for Migrations?

Migrations are hard. Companies do not do as many migrations as they should. However, with AI some of the friction and heavy lifting can be reduced.