HangfireIO / HangfireIO/Hangfire

Implement option to configure custom table names for Hangfire SQL structures

Open
#1,097 7 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

## Idea
I'd like to propose implementing way for configuring custom table names that Hangfire uses in underlying SQL Server storage.

## How do I see it

`SqlServerStorageOptions` should make possible to define key-value map of initial Hangfire structure names to custom structure name, for ex:
```
private IDictionary _customTableNames = new Dictionary
{
{ "Job", "hangfire-job" },
{ "Hash", "hangfire-hash" },
{ "Set", "hangfire-set" }
//And rest of the tables defined here
}
```

And expose them somehow with fallback provided, ie:
```
public string GetTableNameFor(string hangfireTable)
{
if (_customTableNames.Contains(hangfireTable)
{
return _customTableNames(hangfireTable);
}
return hangfireTable;
}
```

This will make possible for enterprise environments to use Hangfire seamlessly with their table-naming conventions included.

I would gladly code this in my spare time, as I cannot do this during my office hours.

Any further thoughts?

Contributor guide

Open the contributing guide

Research direction

Start by locating SqlServerStorageOptions and the code that defines or references Hangfire's SQL structures. Confirm the complete table-name set and how names are currently resolved, then define the fallback behavior and tests needed to show that custom names are applied consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.