Skip to content

Fix: index alignment - #82

Merged
appany-it merged 3 commits into
appany:mainfrom
MJECloud:fix/76-index-alignment
Oct 2, 2026
Merged

appany-it merged 3 commits into
appany:mainfrom
MJECloud:fix/76-index-alignment

Conversation

@MJECloud

@MJECloud MJECloud commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Fixes #76
This pull request updates the Entity Framework Core model mappings for all supported database providers to align with the Quartz.NET 4.0.1 schema, specifically modernizing and standardizing index definitions and adding comprehensive tests to verify column and index mappings. The changes ensure that the generated tables and indexes match the official Quartz.NET scripts, improving compatibility and maintainability.

The most important changes are:

Index Standardization and Alignment with Quartz.NET 4.0.1:

  • Updated all index definitions in the entity type configurations for QuartzTrigger, QuartzJobDetail, and QuartzFiredTrigger to match the Quartz.NET 4.0.1 schema for MySQL, PostgreSQL, SQLite, and SQL Server providers. This includes renaming, removing legacy indexes, and reshaping composite indexes, such as the new structure for IDX_QRTZ_T_NFT_ST, and ensuring correct column order and sort direction. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

Documentation Updates:

  • Updated the README.md to document the index changes, including migration guidance and provider-specific notes, such as the importance of maintenance windows and index usage in MySQL.

Testing Enhancements:

  • Added and expanded tests in QuartzTriggerModelMappingTests for MySQL and PostgreSQL to verify that all columns (including new ones like ExecutionGroup, PreferredNode, etc.) and indexes are mapped as expected, directly comparing the model to the Quartz.NET schema. [1] [2]

These updates ensure the EF Core migrations are fully compatible with Quartz.NET 4.0.1 and that future changes will be caught by the improved test coverage.

…or database context initialization and add tests for ExecutionGroup and PreferredNode properties across MySQL, PostgreSQL, SQLite, and SQL Server.
…ny#76)

All four providers shipped the legacy PostgreSQL index set (pre Quartz 3.20). Replace it with the 4.0.1 set, which is identical across providers: J_G_N, T_J, T_G_N, T_C, T_NFT_ST (SCHED_NAME, TRIGGER_STATE, NEXT_FIRE_TIME, PRIORITY DESC, MISFIRE_INSTR), FT_INST_JOB_REQ_RCVRY, FT_J_G, FT_T_G.

Upgrading from 0.6.1 drops 10 indexes, renames 2 (incl. the EF foreign key index to T_J) and creates 6. Verified against SQL Server, PostgreSQL, MySQL (Pomelo and Oracle provider) and SQLite.

Fixes appany#76
@sergeyshaykhullin

Copy link
Copy Markdown
Member

Hey @MJECloud! Could you please take a look at the merge conflicts?

@MJECloud

MJECloud commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

Hi @sergeyshaykhullin conflicts are resolved. Thanks for looking so fast into this!

@appany-it
appany-it merged commit 09e1b2d into appany:main Oct 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Index definitions have drifted from the current Quartz.NET table scripts

3 participants