grate.mariadb 1.7.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package grate.mariadb --version 1.7.1                
NuGet\Install-Package grate.mariadb -Version 1.7.1                
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="grate.mariadb" Version="1.7.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add grate.mariadb --version 1.7.1                
#r "nuget: grate.mariadb, 1.7.1"                
#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 grate.mariadb as a Cake Addin
#addin nuget:?package=grate.mariadb&version=1.7.1

// Install grate.mariadb as a Cake Tool
#tool nuget:?package=grate.mariadb&version=1.7.1                

grate

grate is a SQL scripts migration runner, using plain, old SQL for migrations. No meta-language, no code, no config, no EF migrations. It gives you full flexibility, and full control of your migrations, and lets you use all the fancy features of you particular database system. You are not constrained to any lowest common feature set of all supported databases.

grate.mariadb

This is the MariaDB/MySQL provider for grate. It is used to deploy SQL scripts programmatically to a MariaDB or MySQL database. For command line usage, please see the grate (dotnet tool) package.

Minimal code example

The only required argument to pass to grate is a connection string to tell it where to find your database. It will deploy to that database, looking for sql scripts in the current directory.

[Fact]
public async Task Run_migration_agains_target_db()
{
    var serviceCollection = new ServiceCollection();
    serviceCollection.AddLogging();
    serviceCollection.AddGrate(builder =>
    {
        builder
            .WithSqlFilesDirectory("/db")
            .WithConnectionString("mariadb/mysql connection string here")
    })
    .UseMariaDb(); // Important!, you need to specify the database type to use.
    var serviceProvider = serviceCollection.BuildServiceProvider();
    var grateMigrator = serviceProvider.GetRequiredService<IGrateMigrator>();
    await grateMigrator.Migrate();
}

for more configuration options, see the documentation.

grate supports the following DMBS's

Database NuGet package
Microsoft SQL server (sqlserver) NuGet
PostgreSQL (postgresql) NuGet
MariaDB/MySQL (mariadb) NuGet
Sqlite (sqlite) NuGet
Oracle (oracle) NuGet

grate.core

NuGet

This is the core package, which does nothing by itself. It is mostly useful for writing extensions to grate, or for writing your own database provider. Please feel free to create your own database provider, and submit it a pull request, if you need support for a database that is not supported yet.

Full documentation can be found at https://erikbra.github.io/grate/.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 is compatible.  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 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
1.8.0 133 7/25/2024
1.7.4 473 5/16/2024
1.7.3 95 5/11/2024
1.7.2 104 5/8/2024
1.7.1 121 5/7/2024
1.7.0 110 4/29/2024
1.6.3 98 5/11/2024
1.6.2 145 3/13/2024
1.6.1 127 2/16/2024
1.6.0 199 2/12/2024