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

Introduction

SQL Migration Tool logo

The SQL Migration Tool is a cross-platform desktop application that helps developers and teams manage database schema changes in a controlled, auditable, and repeatable manner.

Features

  • Pure SQL migrations - Migrations are represented as .sql files, allowing pure SQL scripts for both applying and rolling back changes. These can be executed by this tool or by your database management software of choice.
  • Easy integration - Easily add to any project. Whether you’re running legacy code or have an existing database migration system, this tool can be integrated into your project to manage database changes without any issues.
  • Multiple environments - Use one project to deploy to multiple environments such as staging and production.
  • Dynamic replacements - Perform string replacements in SQL files based on the selected environment, allowing you to target different tables or columns, or insert different data depending on the environment.
  • Flexible credential sources - Avoid storing credentials in code. Retrieve credentials from .env files or AWS Secrets Manager.
  • Scripts support - Run various SQL scripts as .sql files with dynamic replacements applied.
  • CI/CD ready - Deploy changes in any Node.js-supporting CI/CD pipeline using the 2am-smt CLI tool.
  • Multi-project support - Multiple SQL migration projects can track their migrations on a single database, each separated by its own unique identifier.

Supported Databases

  • MySQL / MariaDB
  • PostgreSQL
  • MS SQL Server