grate.core
1.6.2
See the version list below for details.
dotnet add package grate.core --version 1.6.2
NuGet\Install-Package grate.core -Version 1.6.2
<PackageReference Include="grate.core" Version="1.6.2" />
paket add grate.core --version 1.6.2
#r "nuget: grate.core, 1.6.2"
// Install grate.core as a Cake Addin #addin nuget:?package=grate.core&version=1.6.2 // Install grate.core as a Cake Tool #tool nuget:?package=grate.core&version=1.6.2
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.core
This is the core package, which does nothing by itself. You need to add a database specific package to use it. See below for the list of supported databases.
grate (dotnet tool)
grate is also available as a dotnet tool, which can be installed with the following command:
dotnet tool install -g grate
Minimal 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) | |
PostgreSQL (postgresql) | |
MariaDB/MySQL (mariadb) | |
Sqlite (sqlite) | |
Oracle (oracle) |
Full documentation can be found at https://erikbra.github.io/grate/.
Product | Versions 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. |
-
net6.0
- Dapper (>= 2.1.35)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
-
net7.0
- Dapper (>= 2.1.35)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
-
net8.0
- Dapper (>= 2.1.35)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.Hosting (>= 8.0.0)
- Microsoft.Extensions.Logging.Console (>= 8.0.0)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on grate.core:
Package | Downloads |
---|---|
grate.postgresql
grate - sql for the 20s grate is a no-code, low-fi database migration tool, inspired heavily by RoundhousE. It's written from the ground up using modern .NET 6/7/8. |
|
grate.sqlserver
grate - sql for the 20s grate is a no-code, low-fi database migration tool, inspired heavily by RoundhousE. It's written from the ground up using modern .NET 6/7/8. |
|
grate.mariadb
grate - sql for the 20s grate is a no-code, low-fi database migration tool, inspired heavily by RoundhousE. It's written from the ground up using modern .NET 6/7/8. |
|
grate.oracle
grate - sql for the 20s grate is a no-code, low-fi database migration tool, inspired heavily by RoundhousE. It's written from the ground up using modern .NET 6/7/8. |
|
grate.sqlite
grate - sql for the 20s grate is a no-code, low-fi database migration tool, inspired heavily by RoundhousE. It's written from the ground up using modern .NET 6/7/8. |
GitHub repositories
This package is not used by any popular GitHub repositories.