Skip to content

Commit

Permalink
Added option to rename database tables
Browse files Browse the repository at this point in the history
  • Loading branch information
ShimmyMySherbet committed Dec 4, 2022
1 parent 755d0dd commit f4c1ddb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SherbetVaults/Database/DatabaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ public class DatabaseManager : DatabaseClient
public DatabaseManager(SherbetVaultsPlugin plugin) : base(connectionProvider: new TransientConnectionProvider(plugin.Config.DatabaseSettings), autoInit: false)
{
Queue = new DatabaseQueue<DatabaseManager>(this);
VaultItems = new VaultItemsTable(plugin, "SherbetVaults_Items");
Transactions = new VaultTransactionsTable("SherbetVaults_History");
VaultItems = new VaultItemsTable(plugin, $"{plugin.Config.DatabaseTablePrefix}_Items");
Transactions = new VaultTransactionsTable($"{plugin.Config.DatabaseTablePrefix}_History");

if (plugin.Config.VaultAliasesEnabled)
Aliases = new VaultAliasTable("SherbetVaults_Aliases");
Aliases = new VaultAliasTable($"{plugin.Config.DatabaseTablePrefix}_Aliases");

Init();
}
Expand Down
2 changes: 2 additions & 0 deletions SherbetVaults/Models/Config/SherbetVaultsConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class SherbetVaultsConfig : IRocketPluginConfiguration
public string DefaultVault = "default";
public bool VaultAliasesEnabled = false;

public string DatabaseTablePrefix = "SherbetVaults";

[XmlArrayItem(ElementName = "Vault")]
public List<VaultConfig> Vaults = new();

Expand Down

0 comments on commit f4c1ddb

Please sign in to comment.