Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hawxy/weasel.quartz
Runtime Postgres SQL initialization & migration for Quartz.NET
https://github.com/hawxy/weasel.quartz
Last synced: 2 days ago
JSON representation
Runtime Postgres SQL initialization & migration for Quartz.NET
- Host: GitHub
- URL: https://github.com/hawxy/weasel.quartz
- Owner: Hawxy
- Created: 2024-07-06T16:10:32.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-07T16:12:36.000Z (4 months ago)
- Last Synced: 2024-10-10T22:53:25.944Z (about 1 month ago)
- Language: C#
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Weasel.Quartz
[![Nuget](https://img.shields.io/nuget/v/Weasel.Quartz.Postgres?label=Weasel.Quartz.Postgres&style=flat-square)](https://www.nuget.org/packages/Weasel.Quartz.Postgres)
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.
## Running Standalone Migrations
Ideally this would be executed in a hosted service during startup.`QuartzSchema.Create(...)` should be called, passing in either a `NpgsqlDataSource` or connection string.
```csharp
// A custom Postgres schema can be optionally provided as a parameter.
var db = QuartzSchema.Create(dbSource);await db.ApplyAllConfiguredChangesToDatabaseAsync();
```## Marten
Quartz schema can be added to Marten's own schema management via its configuration:
```csharp
// A custom Postgres schema can be optionally provided as a parameter.
foreach (var table in QuartzSchema.AllTables())
{
options.Storage.ExtendedSchemaObjects.Add(table);
}
```## Future updates
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.