Map missing EXECUTION_GROUP, PREFERRED_NODE and PREFERRED_NODE_AUTO columns - #75
Open
bittercoder wants to merge 1 commit into
Open
Map missing EXECUTION_GROUP, PREFERRED_NODE and PREFERRED_NODE_AUTO columns#75bittercoder wants to merge 1 commit into
bittercoder wants to merge 1 commit into
Conversation
…AUTO columns Adds the remaining optional columns introduced across Quartz.NET 3.17-3.19 for all four providers (MySql, PostgreSQL, SQLite, SqlServer): - QRTZ_TRIGGERS.EXECUTION_GROUP - QRTZ_FIRED_TRIGGERS.EXECUTION_GROUP - QRTZ_TRIGGERS.PREFERRED_NODE - QRTZ_TRIGGERS.PREFERRED_NODE_AUTO Column names, nullability and the PREFERRED_NODE_AUTO default follow the official Quartz.NET table scripts. Store types follow each provider's existing convention in this repo. Fixes appany#73 Fixes appany#74 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the remaining optional Quartz.NET schema columns that this library does not yet map, for all four providers.
Fixes #73
Fixes #74
What's added
QRTZ_TRIGGERSEXECUTION_GROUPQRTZ_FIRED_TRIGGERSEXECUTION_GROUPQRTZ_TRIGGERSPREFERRED_NODEQRTZ_TRIGGERSPREFERRED_NODE_AUTOTwo new properties on
QuartzTrigger(ExecutionGroup,PreferredNode,PreferredNodeAuto) and one onQuartzFiredTrigger(ExecutionGroup), mapped in each provider'sQuartzTriggerEntityTypeConfiguration/QuartzFiredTriggerEntityTypeConfiguration.MISFIRE_ORIG_FIRE_TIMEwas already mapped in #70, so this closes out the three optional columns added across Quartz.NET 3.17–3.19.Column definitions
Names, nullability and the
PREFERRED_NODE_AUTOdefault are taken from the official Quartz.NET table scripts (database/tables/tables_*.sql) andschema_30_add_preferred_node.sql:EXECUTION_GROUP— nullable, 200 charsPREFERRED_NODE— nullable, 200 charsPREFERRED_NODE_AUTO—NOT NULL DEFAULT 0Store types follow each provider's existing convention in this repo rather than the raw Quartz DDL, matching how every other string column here is already mapped:
EXECUTION_GROUP/PREFERRED_NODEPREFERRED_NODE_AUTOHasMaxLength(200).IsUnicode()→nvarchar(200)bittextboolvarchar(200)tinyint(1)textboolFor PostgreSQL and SQLite that means
textinstead ofVARCHAR(200)— consistent withCALENDAR_NAME,TRIGGER_NAMEetc. in those configurations today, and functionally equivalent. Happy to switch to explicitvarchar(200)if you'd prefer literal parity with the Quartz scripts.Generated DDL (SQLite)
Tests
Extended
QuartzTriggerModelMappingTestsin all four test projects with three new facts each (12 total), asserting column name, store type / max length, nullability, and thePREFERRED_NODE_AUTOdefault value:ShouldMapExecutionGroupColumnOnTriggersShouldMapExecutionGroupColumnOnFiredTriggersShouldMapPreferredNodeColumnsOnTriggersThese are model-only and need no database. Verified locally on net8.0 and net10.0 (net6.0/net7.0 runtimes aren't installed on my machine — left to CI). The SQLite integration test, which builds the schema and starts a real scheduler with
PerformSchemaValidation = true, also passes.Notes
PREFERRED_NODE_AUTOis mapped as a non-nullableboolwith.HasDefaultValue(false)so the generated DDL carriesNOT NULL DEFAULT 0. Since this library only ever generates schema and never writes rows, EF's usual "sentinel value" caveat for defaults on non-nullable CLR types doesn't apply here.AddColumnmigrations; all three columns are optional from Quartz's perspective, so nothing breaks for users who don't regenerate.