Lite.Migrator
SQLite Lite Migration Tool for .NET MAUI, Avalonia, Uno, and cross-platform apps. Created by Suess Labs and Xeno Innovations.
Install / Use
/learn @SuessLabs/Lite.MigratorREADME
Lite Migrator for SQLite
<!-- <img align="right" width="90" height="90" src="https://raw.githubusercontent.com/SuessLabs/Lite.Migrator/master/docs/logo.png" /> -->Lite.Migrator is a tiny cross-platform SQLite migration framework for .NET applications. This library was built for speed and flexibility so you can quickly stand-up and reliably deliver scalable database solutions.
Use it with your container app or mobile development (.NET MAUI 🐒, Avalonia, Uno, etc.) projects.
Lite.Migrator takes a "migrate-up" approach. In most app deployments, we usually move forward and rarely downgrade (consider app stores). This helps keep the library small and nimble. Previously known as, SQLite.Migrator.
Brought to you with nerd-love by Suess Labs, sponsored by Xeno Innovations.
Supported Platforms
Check out the sample project's source code Lite.Migrator.Sample
| Platform | Status | |----------|--------| | Windows | Yes | Linux | Yes | Android | Yes | iOS | Yes
Contribute today and get your platform supported 👍
How to use it
Get Lite.Migrator on NuGet today!
Getting Started
Detailed instructions can be found on the Using Lite.Migrator wiki page.
- Add Lite.Migrator project to your solution
- Create a folder in your solution to hold the scripts
- Add SQL files as Embedded Resources
- You must use the naming convention, "YYYYMMDDhhmm-FileName.sql"
- Wire-up the controller
Use Case - .NET MAUI Basic Example
// 1. Add a few `.sql` files as Embedded Resources to project
// in the namespace `MyProject.Namespace.Scripts`
// 2. Execute the migrates as follows
// This will create the DB in your MAUI app's AppData directory.
var dbPath = Path.Combine(FileSystem.AppDataDirectory, "Lite.Migrator.db3");
var scriptNamespace = "MyProject.Namespace.Scripts";
using var migrator = new Migrator(dbPath, scriptNamespace);
// Install migration scripts
bool isSuccessful = await migrator.MigrateUpAsync();
Use Case - Migration Management
var dbPath = Path.Combine(FileSystem.AppDataDirectory, "Lite.Migrator.db3");
var scriptNamespace = "MyProject.Namespace.Scripts";
using var migrator = new Migrator(dbPath, scriptNamespace);
// List of all embedded script files
var embeddedMigrations = migrator.Migrations.GetSortedMigrations();
// List of scripts installed
var installed = await migrator.GetInstalledMigrationsAsync();
// List of scripts waiting to be installed
var notInstalled = await migrator.GetMissingMigrationsAsync();
// Install migration scripts
bool isSuccessful = await migrator.MigrateUpAsync();
Use Case 2 - Manually Destruct and Close Connection
public async Task InstallMigrationsAsync()
{
// Your EXE/DLL with the scripts
var dbPath = @"C:\TEMP\MyDatabase.db3";
var migsNamespace = "MyProjNamespace.Scripts";
var migrator = new Migrator(dbPath, migsNamespace);
bool = success = await migrator.MigrateUpAsync();
// Required after v0.6
migrator.Dispose();
}
How to Contribute
Give it a test drive and support making Lite.Migrator better :)
- Fork on GitHub
- Create a branch
- Code (and add tests)
- Create a Pull Request (PR) on GitHub
- Target the
developbranch and we'll get it merged up tomaster - Target the
masterbranch for hotfixes
- Target the
- Get the PR merged
- Welcome to our contributors' list!
This project could use your assistance to crush any limitations.
Please visit the Known Limitations wiki page
History
v0.9.0
- Tidy-up namespace formatting
- Update URLs
- MigrationFactory Stores the Supplied Assembly
- Rename main class to Migration
- Default Assembly in CTR to use Calling Assembly
- Updated readme and changelog with the latest notes
v0.6.x
- Update Parser to Search Specific Namespace
- Disposable
- Namespace changed from
Xeno.LiteMigratortoLiteMigrator
Related Skills
oracle
351.2kBest practices for using the oracle CLI (prompt + file bundling, engines, sessions, and file attachment patterns).
prose
351.2kOpenProse VM skill pack. Activate on any `prose` command, .prose files, or OpenProse mentions; orchestrates multi-agent workflows.
Command Development
110.6kThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
Plugin Structure
110.6kThis skill should be used when the user asks to "create a plugin", "scaffold a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "use ${CLAUDE_PLUGIN_ROOT}", "add commands/agents/skills/hooks", "configure auto-discovery", or needs guidance on plugin directory layout, manifest configuration, component organization, file naming conventions, or Claude Code plugin architecture best practices.

