HangfireIO / HangfireIO/Hangfire

DB check on startup fails if the tables are there, but empty

Open
#436 20 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
10.1k
Forks
1.8k
Avg merge
1h 19m
Merged PRs (30d)
1

Description

Hello,
We were migrating a database containing the Hangfire schema.
The migration script failed, so the hangfire schema was there, but without the seed data.
As a result, when the app pool was starting up Hangfire tried to create the tables again even though they were there already, so the script was failing and the pool startup would crash out. We fixed it by copying the seed data into the tables.

Cheers,
Steven

Contributor guide

Open the contributing guide

Research direction

The issue does not name specific files or tests. Start by reproducing Hangfire startup with the schema tables present but without seed data, then trace the schema-initialization path; done means startup no longer attempts a failing recreation when the tables already exist.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.