Merge branch 'temp8' into temp-editing-all-variants

This commit is contained in:
Shannon
2018-08-01 12:36:45 +10:00
10 changed files with 25 additions and 18 deletions
@@ -15,8 +15,10 @@ namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
var exists = Context.Database.FirstOrDefault<RelationTypeDto>("WHERE alias=@alias", new { alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias });
if (exists == null)
{
Insert.IntoTable(Constants.DatabaseSchema.Tables.RelationType).Row(new
var uniqueId = (Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias + "____" + Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName).ToGuid();
Insert.IntoTable("umbracoRelationType").Row(new
{
typeUniqueId = uniqueId,
alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias,
name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName,
childObjectType = Constants.ObjectTypes.MediaType,
@@ -1,4 +1,7 @@
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
using System.Linq;
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
namespace Umbraco.Core.Migrations.Upgrade.V_7_12_0
{
public class IncreaseLanguageIsoCodeColumnLength : MigrationBase
{
@@ -8,7 +11,20 @@
public override void Migrate()
{
Delete.Index("IX_umbracoLanguage_languageISOCode").OnTable("umbracoLanguage").Do();
var dbIndexes = SqlSyntax.GetDefinedIndexes(Context.Database)
.Select(x => new DbIndexDefinition
{
TableName = x.Item1,
IndexName = x.Item2,
ColumnName = x.Item3,
IsUnique = x.Item4
}).ToArray();
//Ensure the index exists before dropping it
if (dbIndexes.Any(x => x.IndexName.InvariantEquals("IX_umbracoLanguage_languageISOCode")))
{
Delete.Index("IX_umbracoLanguage_languageISOCode").OnTable("umbracoLanguage").Do();
}
Alter.Table("umbracoLanguage")
.AlterColumn("languageISOCode")
@@ -417,7 +417,6 @@ namespace Umbraco.Tests.CoreXml
{
var source = new TestSource5();
var nav = new NavigableNavigator(source);
TestContent content;
Assert.AreEqual(NavigableNavigator.StatePosition.Root, nav.InternalState.Position);
Assert.IsTrue(nav.MoveToFirstChild());
@@ -12,7 +12,6 @@ namespace Umbraco.Tests.Models.Collections
public abstract class Item : IEntity, ICanBeDirty
{
private bool _hasIdentity;
private int? _hash;
private int _id;
private Guid _key;
@@ -184,12 +183,6 @@ namespace Umbraco.Tests.Models.Collections
public static bool operator ==(Item left, Item right)
{
/*if (ReferenceEquals(null, left))
return false;
if(ReferenceEquals(null, right))
return false;*/
return ReferenceEquals(left, right);
}
@@ -945,8 +945,6 @@ namespace Umbraco.Tests.Scheduling
throw new NotImplementedException();
}
private int i;
public async Task RunAsync(CancellationToken token)
{
Console.WriteLine("boom");
@@ -82,7 +82,7 @@ angular.module("umbraco.directives")
generateAliasTimeout = $timeout(function () {
updateAlias = true;
entityResource.getSafeAlias(value, true).then(function (safeAlias) {
entityResource.getSafeAlias(encodeURIComponent(value), true).then(function (safeAlias) {
if (updateAlias) {
scope.alias = safeAlias.alias;
}
@@ -293,7 +293,7 @@ function contentTypeResource($q, $http, umbRequestHelper, umbDataFormatter, loca
createContainer: function (parentId, name) {
return umbRequestHelper.resourcePromise(
$http.post(umbRequestHelper.getApiUrl("contentTypeApiBaseUrl", "PostCreateContainer", { parentId: parentId, name: name })),
$http.post(umbRequestHelper.getApiUrl("contentTypeApiBaseUrl", "PostCreateContainer", { parentId: parentId, name: encodeURIComponent(name) })),
'Failed to create a folder under parent id ' + parentId);
},
@@ -355,7 +355,7 @@ function dataTypeResource($q, $http, umbDataFormatter, umbRequestHelper) {
umbRequestHelper.getApiUrl(
"dataTypeApiBaseUrl",
"PostCreateContainer",
{ parentId: parentId, name: name })),
{ parentId: parentId, name: encodeURIComponent(name) })),
'Failed to create a folder under parent id ' + parentId);
},
@@ -244,7 +244,7 @@ function mediaTypeResource($q, $http, umbRequestHelper, umbDataFormatter) {
umbRequestHelper.getApiUrl(
"mediaTypeApiBaseUrl",
"PostCreateContainer",
{ parentId: parentId, name: name })),
{ parentId: parentId, name: encodeURIComponent(name) })),
'Failed to create a folder under parent id ' + parentId);
},
@@ -32,7 +32,6 @@
// return root;
// }
// protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
// {
// var nodes = new TreeNodeCollection();