Database adapters
MSR for Firebase Realtime Database
Run versioned migrations against Firebase Realtime Database with Firebase-aware history, backups, locking, and local Emulator testing.
Install the adapter
$ npm install @migration-script-runner/firebaseUse the adapter CLI in CI/CD, even when the application being deployed is not a Node.js application. For programmatic integration, use the Firebase runner API from Node.js.
What the adapter provides
Firebase-specific behavior is implemented by the adapter; exact support details are listed in the adapter matrix.
TypeScript and JavaScript migrations
Write versioned migration scripts in TypeScript or JavaScript. SQL migrations are not applicable to Firebase Realtime Database.
Migration history
Track applied migrations in a dedicated node in Firebase Realtime Database to avoid running completed changes again.
Distributed locking
Coordinate concurrent migration runs across processes and use CLI commands to inspect or release locks.
Backups and restore
Create Firebase data backups before a run and use saved backup data as part of a configured recovery strategy.
Realtime Database transactions
Transactions are supported on a single data node per migration. Firebase RTDB does not provide database-wide transactions.
Local Emulator testing
Run migrations against the Firebase Realtime Database Emulator to verify changes before deploying them.