Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default schema name for Sql Server doesn't match Quartz.NET #66

Open
merlinschumacher opened this issue May 17, 2024 · 2 comments
Open

Comments

@merlinschumacher
Copy link

When using this library to create the tables for Quartz.NET the library uses the schema "quartz" by default. But Quartz.NET itself uses "dbo". The migrations only work when setting the schema manually, because Quartz.NET doesn't find the tables and . See https://github.com/quartznet/quartznet/blob/main/database/tables/tables_sqlServer.sql

The following error occurs:

2024-05-17 17:29:22.9494|ERROR|Microsoft.Extensions.Hosting.Internal.Host|Hosting failed to start|Quartz.SchedulerException: Database schema validation failed. Make sure you have created the database tables that Quartz requires using the database schema scripts. You can disable this check by setting quartz.jobStore.performSchemaValidation to false
 ---> Quartz.JobPersistenceException: Unable to query against table QRTZ_JOB_DETAILS: Invalid object name 'QRTZ_JOB_DETAILS'.
@sergeyshaykhullin
Copy link
Member

@merlinschumacher Could you please provide a PR for this fix?

@fbjerggaard
Copy link

This is also an issue for PostgreSQL. It can be solved with the following configuration:

          q.UsePersistentStore(c =>
                {
                    c.UsePostgres(po =>
                    {
                        po.UseDriverDelegate<PostgreSQLDelegate>();
                        po.ConnectionStringName = "Database";
                        po.TablePrefix = "quartz.qrtz_";
                    });
                    c.UseNewtonsoftJsonSerializer();
                });

But that's not really pretty

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

No branches or pull requests

3 participants