Merge branch 'v8/prototype/doctype-tabs' of https://github.com/umbraco/Umbraco-CMS into v8/prototype/doctype-tabs
This commit is contained in:
@@ -55,7 +55,6 @@ namespace Umbraco.Core.Migrations.Install
|
||||
typeof (MemberPropertyTypeDto),
|
||||
typeof (MemberDto),
|
||||
typeof (Member2MemberGroupDto),
|
||||
typeof (PropertyTypeTabDto),
|
||||
typeof (PropertyTypeGroupDto),
|
||||
typeof (PropertyTypeDto),
|
||||
typeof (PropertyDataDto),
|
||||
|
||||
@@ -9,7 +9,7 @@ using Umbraco.Core.Migrations.Upgrade.V_8_1_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_6_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_9_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_10_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_13_0;
|
||||
using Umbraco.Core.Migrations.Upgrade.V_8_15_0;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade
|
||||
{
|
||||
@@ -199,12 +199,12 @@ namespace Umbraco.Core.Migrations.Upgrade
|
||||
|
||||
// to 8.9.0
|
||||
To<ExternalLoginTableUserData>("{B5838FF5-1D22-4F6C-BCEB-F83ACB14B575}");
|
||||
|
||||
|
||||
// to 8.10.0
|
||||
To<AddPropertyTypeLabelOnTopColumn>("{D6A8D863-38EC-44FB-91EC-ACD6A668BD18}");
|
||||
|
||||
// t0 8.13.0 - Guess whos back, back again... TABS is back... tell a friend
|
||||
To<AddPropertyTypeTabsTable>("{153865E9-7332-4C2A-9F9D-F20AEE078EC7}");
|
||||
// t0 8.15.0 - Guess whos back, back again... TABS is back... tell a friend
|
||||
To<AddPropertyTypeGroupParentIdColumn>("{153865E9-7332-4C2A-9F9D-F20AEE078EC7}");
|
||||
|
||||
//FINAL
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_13_0
|
||||
{
|
||||
public class AddPropertyTypeTabsTable : MigrationBase
|
||||
{
|
||||
public AddPropertyTypeTabsTable(IMigrationContext context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
var tables = SqlSyntax.GetTablesInSchema(Context.Database);
|
||||
if (tables.InvariantContains(Constants.DatabaseSchema.Tables.PropertyTypeTab)) return;
|
||||
|
||||
// A brand new table/DTO for storing Tabs
|
||||
// and references to Proprty Types/DocTypes/Content Types
|
||||
Create.Table<PropertyTypeTabDto>(true).Do();
|
||||
|
||||
// Add key reference into the PropertyType Table to our new table
|
||||
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList();
|
||||
AddColumnIfNotExists<PropertyTypeDto>(columns, "propertyTypeTabId");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_15_0
|
||||
{
|
||||
public class AddPropertyTypeGroupParentIdColumn : MigrationBase
|
||||
{
|
||||
public AddPropertyTypeGroupParentIdColumn(IMigrationContext context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList();
|
||||
|
||||
AddColumnIfNotExists<PropertyTypeGroupDto>(columns, "parentId");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,6 @@ namespace Umbraco.Core
|
||||
|
||||
public const string PropertyType = /*TableNamePrefix*/ "cms" + "PropertyType";
|
||||
public const string PropertyTypeGroup = /*TableNamePrefix*/ "cms" + "PropertyTypeGroup";
|
||||
public const string PropertyTypeTab = "cmsPropertyTypeTab";
|
||||
public const string PropertyData = TableNamePrefix + "PropertyData";
|
||||
|
||||
|
||||
|
||||
@@ -27,11 +27,6 @@ namespace Umbraco.Core.Persistence.Dtos
|
||||
[ForeignKey(typeof(PropertyTypeGroupDto))]
|
||||
public int? PropertyTypeGroupId { get; set; }
|
||||
|
||||
[Column("propertyTypeTabId")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[ForeignKey(typeof(PropertyTypeTabDto))]
|
||||
public int? PropertyTypeTabId { get; set; }
|
||||
|
||||
[Index(IndexTypes.NonClustered, Name = "IX_cmsPropertyTypeAlias")]
|
||||
[Column("Alias")]
|
||||
public string Alias { get; set; }
|
||||
|
||||
@@ -6,19 +6,29 @@ using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyTypeGroup)]
|
||||
[TableName(TableName)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeGroupDto
|
||||
{
|
||||
public const string TableName = Constants.DatabaseSchema.Tables.PropertyTypeGroup;
|
||||
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 12)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("parentId")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int? ParentId { get; set; }
|
||||
|
||||
[Column("contenttypeNodeId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
|
||||
public int ContentTypeNodeId { get; set; }
|
||||
|
||||
[Column("icon")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[Column("text")]
|
||||
public string Text { get; set; }
|
||||
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyTypeTab)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeTabDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 12)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("contenttypeNodeId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Column = "nodeId")]
|
||||
public int ContentTypeNodeId { get; set; }
|
||||
|
||||
[Column("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("sortorder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
[Reference(ReferenceType.Many, ReferenceMemberName = "propertyTypeTabId")]
|
||||
public List<PropertyTypeDto> PropertyTypeDtos { get; set; }
|
||||
|
||||
[Column("uniqueID")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Constraint(Default = SystemMethods.NewGuid)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsPropertyTypeTabUniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using NPoco;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.PropertyTypeTab)]
|
||||
[PrimaryKey("id", AutoIncrement = true)]
|
||||
[ExplicitColumns]
|
||||
internal class PropertyTypeTabReadOnlyDto
|
||||
{
|
||||
[Column("PropertyTypeTabId")]
|
||||
public int? Id { get; set; }
|
||||
|
||||
[Column("PropertyTabName")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("PropertyTabSortOrder")]
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
[Column("contenttypeNodeId")]
|
||||
public int ContentTypeNodeId { get; set; }
|
||||
|
||||
[Column("PropertyTabUniqueID")]
|
||||
public Guid UniqueId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,7 @@
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\PropertyDataDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\Models\PropertyTypeDto80.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_10_0\AddPropertyTypeLabelOnTopColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_13_0\AddPropertyTypeTabsTable.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_15_0\AddPropertyTypeGroupParentIdColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_9_0\ExternalLoginTableUserData.cs" />
|
||||
<Compile Include="Models\Blocks\BlockEditorDataConverter.cs" />
|
||||
<Compile Include="Models\Blocks\BlockEditorData.cs" />
|
||||
@@ -160,8 +160,6 @@
|
||||
<Compile Include="Models\MediaWithCrops.cs" />
|
||||
<Compile Include="Models\PublishedContent\PublishedContentTypeExtensions.cs" />
|
||||
<Compile Include="Models\RelationTypeExtensions.cs" />
|
||||
<Compile Include="Persistence\Dtos\PropertyTypeTabReadOnlyDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\PropertyTypeTabDto.cs" />
|
||||
<Compile Include="Persistence\Repositories\IInstallationRepository.cs" />
|
||||
<Compile Include="Persistence\Repositories\Implement\InstallationRepository.cs" />
|
||||
<Compile Include="PropertyEditors\EyeDropperColorPickerConfiguration.cs" />
|
||||
|
||||
Reference in New Issue
Block a user