Migralite is a lightweight, forward-only SQLite migration tool for Bun, currently at v1.2.0 with a stable release cadence. It simplifies database schema evolution by using simple .sql files as migration scripts, wrapping each migration in a transaction, and tracking applied versions to prevent duplicate runs. Unlike general-purpose migration tools like dbmate or Flyway, Migralite is specifically built for the Bun runtime, offers a CLI with sensible defaults, a migration generator, and can be used as a library for programmatic control. Key differentiators include its minimal design, Bun-native integration, and focus on forward-only migrations for simplicity.
npm install migraliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates applying SQLite migrations using Migralite, including database initialization and error handling.
Use the --generate command to create correctly formatted filenames, or manually name files following the strict pattern.
Test migrations carefully before applying to production. Consider using a staging environment.
Ensure your project uses Bun and uses ESM import syntax.
Install TypeScript: bun add -d typescript
Rename the migration file to match the pattern, e.g., 20240815123456__my-migration.sql, or use --generate to create correct filenames.
Use import { applyMigrations } from 'migralite' with ESM syntax in a Bun environment.Install migralite using 'bun add -d migralite' and ensure the import path is correct (e.g., 'migralite').