LiteMigrator Sample is an example project using, LiteMigrator, a tiny cross-platform SQLite migration framework for .NET projects. This framework was built for use with Xamarin 🐒 projects, so it needs to be quick, simple and reliable when managing databases
Sponsored by Xeno Innovations, this project was made with nerd-love.
Get LiteMigrator on NuGet today!
Detailed instructions can be found on the Using LiteMigrator wiki page.
- Add LiteMigrator 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
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();
}
Give it a test drive and support making LiteMigrator better :)
- Fork on GitHub
- Create a branch
- Code (_and add tests)
- Create a Pull Request (PR) on GitHub
- Target the
develop
branch and we'll get it merged up tomaster
- Target the
master
branch for hotfixes
- Target the
- Get the PR merged
- Welcome to our contributors' list!
Please visit the Known Limitations wiki page