Fix for Database prototype file is not log file error, as this code is for create database (#2144)

This commit is contained in:
Sai Avishkar Sreerama
2023-07-12 22:19:04 -05:00
committed by GitHub
parent ddea088a18
commit 1d05cdb131

View File

@@ -401,8 +401,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ObjectManagement
prototype.Name = database.Name;
// Update database file names now that we have a database name
// Modifying logical file name is not supported in SQL Database Managed Instance.
if (!prototype.HideFileSettings && dataContainer.Server.DatabaseEngineEdition != DatabaseEngineEdition.SqlManagedInstance)
if (viewParams.IsNewObject && !prototype.HideFileSettings)
{
var sanitizedName = DatabaseUtils.SanitizeDatabaseFileName(prototype.Name);