Skip to content

LiteMigrator sample cross-platform project using Xamarin.Forms

License

Notifications You must be signed in to change notification settings

xenoinc/LiteMigrator.Sample

Repository files navigation

LiteMigrator Sample Project

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.

Use it in your project

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"
  1. 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();
}

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!

Known Limitations

Please visit the Known Limitations wiki page

About

LiteMigrator sample cross-platform project using Xamarin.Forms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published