GitHubSupport MSR

About MSR

Origin Story

How a small Firebase project in 2017 became a vision for the future of database migrations.

Table of contents


May 2017: The Problem That Started It All

It's hard to explain the constant low-level anxiety of working with production data before your product even launches.

I was leading a small team. We were building a mobile app with Firebase/Firestore. The app wasn't live yet, but we already had production data. Important data. Test data from our beta users, configuration that took hours to set up correctly, mock content we'd painstakingly crafted.

And we needed to migrate this data multiple times a week.

Every time we had to backup and restore, my heart rate would go up a little. One wrong command and we could lose everything. One accidental override of the good snapshot, one mistyped path, one forgotten step in the manual process.

There was no Firebase migration tooling. Nothing. Every operation was manual. Every migration was a script I wrote and then said a silent prayer before running.

The fear wasn't theoretical. We had production-grade data before we even had a product. We couldn't afford to corrupt it. But we also couldn't stop moving forward.

The First Solution

So I built something. Nothing fancy - just a JavaScript tool that would:

  • Automatically backup before every migration
  • Track what migrations had run in Firebase itself
  • Execute new migrations in order
  • Automatically rollback if anything failed

The real innovation was simpler than I expected: make safety automatic, not optional.

I also built an EntityService - a helper that made migrations readable. Instead of writing raw Firebase SDK calls everywhere, you could write:

await userService.updateAll(user => {
  if (!user.email) return null; // skip
  user.emailVerified = false;   // add field
  return user;
});

Clean. Declarative. You described what should change, not how to change it.

The anxiety went away. We ran migrations multiple times a week without fear. It just worked.

December 2017: The End... Sort Of

The project never launched. Our client couldn't secure investment. The MVP we built stayed an MVP, and the team moved on to other things.

But that little migration tool? It stayed in my memory.

2017-2023: The Learning Years

Over the next six years, I worked on many projects, used different databases, saw different migration tools. And I saw their limitations:

Flyway was great... if you only used SQL and never needed complex logic.

Database-specific tools worked fine... until you switched databases or needed to support multiple platforms.

And almost nobody had automatic backups. You were supposed to handle that yourself. Which meant it often didn't happen, especially under deadline pressure.

I watched teams at work struggle with the same problems I'd solved back in 2017. We'd run SQL migrations for schema changes, then trigger Java-based "data migrations" via UI buttons because the migration tools couldn't handle complex logic. Why couldn't one tool do both?

October 2023: "Why Should I Reinvent the Wheel?"

In late 2023, I started planning a new pet project. I don't even remember what it was anymore - it doesn't matter. What matters is that I needed database migrations again.

And then the thought hit me: "I already solved this problem in 2017. Why should I reinvent the wheel?"

I found the old code. It was messy, tightly coupled to Firebase, written in JavaScript without type safety. But the core concepts were solid.

October 31, 2023: I spent a few days extracting the core and reimagining it. What if the migration logic was completely separate from the database? What if you could use the same runner for Firebase, PostgreSQL, MongoDB, anything?

I rewrote everything in TypeScript with clean interfaces. Everything I'd learned about architecture in six years went into this redesign.

November 2, 2023: First commit to the Firebase adapter. I quickly validated it worked - the concepts transferred perfectly.

And then... I published it to npm and moved on to other projects. For two years, MSR sat there with virtually zero activity.

2025: The Renaissance

Two things changed everything:

First: AI-assisted development helped me return to MSR in 2025, while I remained responsible for product direction, architecture, and review.

Second: I needed PostgreSQL migrations for another project. And I realized MSR was the tool I'd always wanted. The tool that could handle SQL for schema changes and TypeScript for complex logic. The tool with automatic backups. The tool that didn't lock me into one database.

We started building. SQL migration support. Transaction management. Execution summaries for CI/CD. Custom validators. All the features I'd wished other tools had.

The Vision: More Than a Tool

As we worked, I realized something: MSR isn't just a migration tool. It's the foundation for something bigger.

As MSR grew, it became clear that the migration runner was only one part of the project. Today, MSR is an ecosystem built around a shared core, database adapters, and the tools and documentation that support them.

Not just a tool - an ecosystem.

Why This Story Matters

I didn't build MSR from theory. I built it from scar tissue.

From the fear of corrupting production data. From watching teams struggle with rigid tools that don't fit modern stacks. From the frustration of choosing between simple SQL migrations and powerful programmatic logic. From the realization that your tools should bend to your needs, not the other way around.

Every feature in MSR exists because someone (often me) hit a wall with existing tools and thought "there has to be a better way."

If you've ever thought "I wish my migration tool could do X" - there's a good chance MSR already does it. And if it doesn't, I'd love to hear about it.

Today: Just Getting Started

MSR is still young. The community is just beginning to form. But the foundation is solid, tested across multiple projects and database types.

I'm not a native English speaker - I make mistakes in my writing. I don't have a marketing team or a big company behind this. What I have is:

  • A real problem I solved in 2017
  • Six years of learning what works and what doesn't
  • A modern architecture that makes sense
  • A vision for what migration tooling could become

Whether you're proposing a new adapter for your database, writing validators for your team's rules, or just using MSR and sharing feedback - you're part of building something better.

Welcome to the journey.


Want to see how those ideas shaped the MSR ecosystem? Read Technical Evolution.