This package provides runtime Postgres SQL initialization & migration for Quartz.NET.
Schema updates can be executed standalone or as part of Marten's migration execution.
Ideally this would be executed in a hosted service during startup.
QuartzSchema.Create(...)
should be called, passing in either a NpgsqlDataSource
or connection string.
// A custom Postgres schema can be optionally provided as a parameter.
var db = QuartzSchema.Create(dbSource);
await db.ApplyAllConfiguredChangesToDatabaseAsync();
Quartz schema can be added to Marten's own schema management via its configuration:
// A custom Postgres schema can be optionally provided as a parameter.
foreach (var table in QuartzSchema.AllTables())
{
options.Storage.ExtendedSchemaObjects.Add(table);
}
The version of this package will stay in line with Quartz major versions (ie v3 == 3.x.x).
If a new schema version is released, simply updating this package and running the application will bring your DB up to date.