-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow opt out of import embedded schema file (#11296)
* Introduce an opt-out options from the import of embedded schema files. * Moved the initialization of the static service provider into CoreRuntime as this runs before the IStartupFilters, and otherwise the static service provider is not available in hosted services. E.g. for migrations * fix build * Minor code tidy and naming alignment. * Update src/Umbraco.Web.UI/Umbraco.Web.UI.csproj * Removed default installation of starter kit. Co-authored-by: Andy Butland <[email protected]>
- Loading branch information
1 parent
83e79f9
commit 2a29cdc
Showing
14 changed files
with
148 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/Umbraco.Core/Configuration/Models/PackageMigrationSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) Umbraco. | ||
// See LICENSE for more details. | ||
|
||
using System.ComponentModel; | ||
|
||
namespace Umbraco.Cms.Core.Configuration.Models | ||
{ | ||
/// <summary> | ||
/// Typed configuration options for package migration settings. | ||
/// </summary> | ||
[UmbracoOptions(Constants.Configuration.ConfigPackageMigration)] | ||
public class PackageMigrationSettings | ||
{ | ||
private const bool StaticRunSchemaAndContentMigrations = true; | ||
private const bool StaticAllowComponentOverrideOfRunSchemaAndContentMigrations = true; | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether package migration steps that install schema and content should run. | ||
/// </summary> | ||
/// <remarks> | ||
/// By default this is true and schema and content defined in a package migration are installed. | ||
/// Using configuration, administrators can optionally switch this off in certain environments. | ||
/// Deployment tools such as Umbraco Deploy can also configure this option to run or not run these migration | ||
/// steps as is appropriate for normal use of the tool. | ||
/// </remarks> | ||
[DefaultValue(StaticRunSchemaAndContentMigrations)] | ||
public bool RunSchemaAndContentMigrations { get; set; } = StaticRunSchemaAndContentMigrations; | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether components can override the configured value for <see cref="RunSchemaAndContentMigrations"/>. | ||
/// </summary> | ||
/// <remarks> | ||
/// By default this is true and components can override the configured setting for <see cref="RunSchemaAndContentMigrations"/>. | ||
/// If an administrator wants explicit control over which environments migration steps installing schema and content can run, | ||
/// they can set this to false. Components should respect this and not override the configuration. | ||
/// </remarks> | ||
[DefaultValue(StaticAllowComponentOverrideOfRunSchemaAndContentMigrations)] | ||
public bool AllowComponentOverrideOfRunSchemaAndContentMigrations { get; set; } = StaticAllowComponentOverrideOfRunSchemaAndContentMigrations; | ||
} | ||
} |
10 changes: 6 additions & 4 deletions
10
src/Umbraco.Core/Configuration/Models/UnattendedSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.