SqliteInit 0.9.0

dotnet add package SqliteInit --version 0.9.0
NuGet\Install-Package SqliteInit -Version 0.9.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="SqliteInit" Version="0.9.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SqliteInit --version 0.9.0
#r "nuget: SqliteInit, 0.9.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 SqliteInit as a Cake Addin
#addin nuget:?package=SqliteInit&version=0.9.0

// Install SqliteInit as a Cake Tool
#tool nuget:?package=SqliteInit&version=0.9.0

SqliteInit

Manage Sqlite schema migrations with a simple folder structure. One dependency on Microsoft.Data.Sqlite.

Folders that start with numbers are schema versions.

Files within that folder that start with numbers will be executed as SQL sequentially (sorted by number ascending). File extension is not considered.

Folders/Files that do not start with numbers will be skipped. In other words, we only include it if it starts with ^\d+

In your app startup code, call SqliteInit.Init(), passing in the connection string and path to your migrations code. After applying migrations, it will automatically update PRAGMA user_version to match the number of the folder. Future migrations check the version number against the migrations folder numbers and upgade if required.

Example:

-- 📂 Migrations
  -- 📂 001 Initial Tables
    -- 📄 001 Create Tables.sql
    -- 📄 002 Create Indexes.sql
    -- 📄 003 Insert Test Data.sql
  -- 📂 002 Alter Schema
    -- 📄 README.md # File ignored, does not start with digits
    -- 📄 001 Alter Schema.sql
  -- 📂 WIP Version 3 # Folder ignored, does not start with digits
    -- 📄 001 draft.sql # Ignored 
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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 122 12/27/2023