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

remove InstallDatabase method as it is no longer required now that all database providers are installed automatically #3506

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions Oqtane.Server/Infrastructure/DatabaseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ public Installation Install(InstallConfig install)
IsNewTenant = false
};

// on upgrade install the associated Nuget package
if (!string.IsNullOrEmpty(install.ConnectionString))
{
InstallDatabase(install);
}

var installation = IsInstalled();
if (!installation.Success)
{
Expand Down Expand Up @@ -209,32 +203,6 @@ public Installation Install(InstallConfig install)
return result;
}

private Installation InstallDatabase(InstallConfig install)
{
var result = new Installation {Success = false, Message = string.Empty};

try
{
// load the installation database type (if necessary)
//if (Type.GetType(install.DatabaseType) == null)
//{
// var assemblyPath = Path.GetDirectoryName(Assembly.GetEntryAssembly()?.Location);
// var assembliesFolder = new DirectoryInfo(assemblyPath);
// var assemblyFile = new FileInfo($"{assembliesFolder}/{Utilities.GetAssemblyName(install.DatabaseType)}.dll");
// AssemblyLoadContext.Default.LoadOqtaneAssembly(assemblyFile);
//}

result.Success = true;
}
catch (Exception ex)
{
result.Message = ex.ToString();
_filelogger.LogError(Utilities.LogMessage(this, result.Message));
}

return result;
}

private Installation CreateDatabase(InstallConfig install)
{
var result = new Installation { Success = false, Message = string.Empty };
Expand All @@ -243,8 +211,6 @@ private Installation CreateDatabase(InstallConfig install)
{
try
{
InstallDatabase(install);

var databaseType = install.DatabaseType;

// get database type
Expand Down