fix to not execute uninstall script when creating a module from template
This commit is contained in:
parent
1ed8f4554a
commit
c25615546a
|
@ -244,9 +244,9 @@ namespace Oqtane.Controllers
|
||||||
text = text.Replace("[File]", Path.GetFileName(filePath));
|
text = text.Replace("[File]", Path.GetFileName(filePath));
|
||||||
System.IO.File.WriteAllText(filePath, text);
|
System.IO.File.WriteAllText(filePath, text);
|
||||||
|
|
||||||
if (Path.GetExtension(filePath) == ".sql")
|
if (Path.GetExtension(filePath).ToLower() == ".sql" && !filePath.ToLower().Contains("uninstall"))
|
||||||
{
|
{
|
||||||
// execute script in curent tenant
|
// execute installation script in curent tenant
|
||||||
_sql.ExecuteScript(_resolver.GetTenant(), text);
|
_sql.ExecuteScript(_resolver.GetTenant(), text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user