LiteMigrator 0.8.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package LiteMigrator --version 0.8.0                
NuGet\Install-Package LiteMigrator -Version 0.8.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LiteMigrator" Version="0.8.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LiteMigrator --version 0.8.0                
#r "nuget: LiteMigrator, 0.8.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LiteMigrator as a Cake Addin
#addin nuget:?package=LiteMigrator&version=0.8.0

// Install LiteMigrator as a Cake Tool
#tool nuget:?package=LiteMigrator&version=0.8.0                

SQLite Lite Migrator for cross-platform .NET

alternate text is missing from this package README image

LiteMigrator is a tiny cross-platform SQLite migration framework for .NET cross-platform applications using (.NET Standard). This library was built for use with .NET MAUI 🐒, Avalonia, and Uno projects. So it needs to be quick, simple, and reliable when managing databases.

LiteMigrator 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.

alternate text is missing from this package README image LiteMigrator Docs

Breaking Change from 0.6.x to now:

Namespace changed from Xeno.LiteMigrator to LiteMigrator

Sponsored by Xeno Innovations and Suess Labs, this project was made with nerd-love.

Supported Platforms

Check out the sample project's source code LiteMigrator.Sample

Platform Status
Windows Yes
Linux Yes
Android Yes
iOS Yes

Contribute today and get your platform supported 👍

How to use it

Get LiteMigrator on NuGet today!

Getting Started

Detailed instructions can be found on the Using LiteMigrator wiki page.

  1. Add LiteMigrator project to your solution
  2. Create a folder in your solution to hold the scripts
  3. Add SQL files as Embedded Resources
    • You must use the naming convention, "YYYYMMDDhhmm-FileName.sql"
  4. Wire-up the controller

Use Case 1

  var scriptNamespace = "MyProject.Namespace.Scripts";

  using (var migrator = new LiteMigration(
    "c:\\path\\to\\sqlite.db3"
    Assembly.GetExecutingAssembly(),
    scriptNamespace))
  {
    bool isSuccessful = await migrator.MigrateUpAsync();
  }

Use Case 2 - Class Constructor

public async Task InstallMigrationsAsync()
{
  // Your EXE/DLL with the scripts
  var resourceAssm = Assembly.GetExecutingAssembly();
  var dbPath = @"C:\TEMP\MyDatabase.db3";
  var migsNamespace = "MyProjNamespace.Scripts";

  var liteMig = new LiteMigration(dbPath, resourceAssm, migsNamespace);
  bool = success = await liteMig.MigrateUpAsync();

  // Required after v0.6
  liteMig.Dispose();
}

How to Contribute

Give it a test drive and support making LiteMigrator better 😃

  1. Fork on GitHub
  2. Create a branch
  3. Code (and add tests)
  4. Create a Pull Request (PR) on GitHub
    1. Target the develop branch and we'll get it merged up to master
    2. Target the master branch for hotfixes
  5. Get the PR merged
  6. Welcome to our contributors' list!

This project could use your assistance to crush any limitations.

Please visit the Known Limitations wiki page

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.9.0 39 1/2/2025
0.8.0 41 12/30/2024

Sqlite lite migration utility