Merge remote-tracking branch 'origin/v9/9.0' into v9/9.0

This commit is contained in:
Bjarke Berg
2021-10-06 10:07:26 +02:00
2 changed files with 8 additions and 16 deletions

View File

@@ -7,6 +7,7 @@ namespace Umbraco.Cms.Core.Configuration.Models
{
internal const bool StaticUseInMemoryCache = false;
internal const string StaticCacheBuster = "Version";
internal const string StaticVersion = null;
/// <summary>
/// Use in memory cache
@@ -19,5 +20,11 @@ namespace Umbraco.Cms.Core.Configuration.Models
/// </summary>
[DefaultValue(StaticCacheBuster)]
public RuntimeMinificationCacheBuster CacheBuster { get; set; } = Enum<RuntimeMinificationCacheBuster>.Parse(StaticCacheBuster);
/// <summary>
/// The unique version string used if CacheBuster is 'Version'.
/// </summary>
[DefaultValue(StaticVersion)]
public string Version { get; set; } = StaticVersion;
}
}

View File

@@ -1,7 +1,5 @@
using System;
using System.Reflection;
using NPoco;
using Umbraco.Cms.Infrastructure.Persistence.Dtos;
namespace Umbraco.Cms.Infrastructure.Persistence
{
@@ -18,6 +16,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence
/// <para>So far, this is very manual. We don't try to be clever and figure out whether the
/// columns exist already. We just ignore it.</para>
/// <para>Beware, the application MUST restart when this class behavior changes.</para>
/// <para>You can override the GetColmunnInfo method to control which columns this includes</para>
/// </remarks>
internal class UmbracoPocoDataBuilder : PocoDataBuilder
{
@@ -28,19 +27,5 @@ namespace Umbraco.Cms.Infrastructure.Persistence
{
_upgrading = upgrading;
}
protected override ColumnInfo GetColumnInfo(MemberInfo mi, Type type)
{
var columnInfo = base.GetColumnInfo(mi, type);
// TODO: Is this upgrade flag still relevant? It's a lot of hacking to just set this value
// including the interface method ConfigureForUpgrade for this one circumstance.
if (_upgrading)
{
if (type == typeof(UserDto) && mi.Name == "TourData") columnInfo.IgnoreColumn = true;
}
return columnInfo;
}
}
}