Merge pull request #1656 from umbraco/temp-u4-9240
U4-9240 - kill umbracoDeployChecksum
This commit is contained in:
@@ -12,4 +12,4 @@ using System.Resources;
|
||||
[assembly: AssemblyVersion("1.0.*")]
|
||||
|
||||
[assembly: AssemblyFileVersion("7.6.0")]
|
||||
[assembly: AssemblyInformationalVersion("7.6.0-alpha032")]
|
||||
[assembly: AssemblyInformationalVersion("7.6.0-alpha033")]
|
||||
@@ -24,7 +24,7 @@ namespace Umbraco.Core.Configuration
|
||||
/// Gets the version comment (like beta or RC).
|
||||
/// </summary>
|
||||
/// <value>The version comment.</value>
|
||||
public static string CurrentComment { get { return "alpha032"; } }
|
||||
public static string CurrentComment { get { return "alpha033"; } }
|
||||
|
||||
// Get the version of the umbraco.dll by looking at a class in that dll
|
||||
// Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName("umbracoDeployChecksum")]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class UmbracoDeployChecksumDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(Name = "PK_umbracoDeployChecksum")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("entityType")]
|
||||
[Length(32)]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_umbracoDeployChecksum", ForColumns = "entityType,entityGuid,entityPath")]
|
||||
public string EntityType { get; set; }
|
||||
|
||||
[Column("entityGuid")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public Guid EntityGuid { get; set; }
|
||||
|
||||
[Column("entityPath")]
|
||||
[Length(256)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string EntityPath { get; set; }
|
||||
|
||||
[Column("localChecksum")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
[Length(32)]
|
||||
public string LocalChecksum { get; set; }
|
||||
|
||||
[Column("compositeChecksum")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Length(32)]
|
||||
public string CompositeChecksum { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName("umbracoDeployDependency")]
|
||||
[ExplicitColumns]
|
||||
internal class UmbracoDeployDependencyDto
|
||||
{
|
||||
[Column("sourceId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Clustered = true, Name = "PK_umbracoDeployDependency", OnColumns = "sourceId, targetId")]
|
||||
[ForeignKey(typeof(UmbracoDeployChecksumDto), Name = "FK_umbracoDeployDependency_umbracoDeployChecksum_id1")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
public int SourceId { get; set; }
|
||||
|
||||
[Column("targetId")]
|
||||
[ForeignKey(typeof(UmbracoDeployChecksumDto), Name = "FK_umbracoDeployDependency_umbracoDeployChecksum_id2")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
public int TargetId { get; set; }
|
||||
|
||||
[Column("mode")]
|
||||
[NullSetting(NullSetting = NullSettings.NotNull)]
|
||||
public int Mode { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -82,8 +82,8 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
{43, typeof (CacheInstructionDto)},
|
||||
{44, typeof (ExternalLoginDto)},
|
||||
{45, typeof (MigrationDto)},
|
||||
{46, typeof (UmbracoDeployChecksumDto)},
|
||||
{47, typeof (UmbracoDeployDependencyDto)},
|
||||
//46, removed: UmbracoDeployChecksumDto
|
||||
//47, removed: UmbracoDeployDependencyDto
|
||||
{48, typeof (RedirectUrlDto) },
|
||||
{49, typeof (LockDto) }
|
||||
};
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSevenSixZero
|
||||
{
|
||||
[Migration("7.6.0", 0, GlobalSettings.UmbracoMigrationName)]
|
||||
public class RemoveUmbracoDeployTables : MigrationBase
|
||||
{
|
||||
public RemoveUmbracoDeployTables(ISqlSyntaxProvider sqlSyntax, ILogger logger)
|
||||
: base(sqlSyntax, logger)
|
||||
{ }
|
||||
|
||||
public override void Up()
|
||||
{
|
||||
var tables = SqlSyntax.GetTablesInSchema(Context.Database).ToArray();
|
||||
|
||||
// there are two versions of umbracoDeployDependency,
|
||||
// 1. one created by 7.4 and never used, we need to remove it (has a sourceId column)
|
||||
// 2. one created by Deploy itself, we need to keep it (has a sourceUdi column)
|
||||
if (tables.InvariantContains("umbracoDeployDependency"))
|
||||
{
|
||||
var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray();
|
||||
if (columns.Any(x => x.TableName.InvariantEquals("umbracoDeployDependency") && x.ColumnName.InvariantEquals("sourceId")))
|
||||
Delete.Table("umbracoDeployDependency");
|
||||
}
|
||||
|
||||
// always remove umbracoDeployChecksum
|
||||
if (tables.InvariantContains("umbracoDeployChecksum"))
|
||||
Delete.Table("umbracoDeployChecksum");
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -419,8 +419,6 @@
|
||||
<Compile Include="Models\Rdbms\DocumentPublishedReadOnlyDto.cs" />
|
||||
<Compile Include="Models\Rdbms\ExternalLoginDto.cs" />
|
||||
<Compile Include="Models\Rdbms\MigrationDto.cs" />
|
||||
<Compile Include="Models\Rdbms\UmbracoDeployChecksumDto.cs" />
|
||||
<Compile Include="Models\Rdbms\UmbracoDeployDependencyDto.cs" />
|
||||
<Compile Include="Models\XsltFile.cs" />
|
||||
<Compile Include="Models\TemplateOnDisk.cs" />
|
||||
<Compile Include="Models\UmbracoDomain.cs" />
|
||||
@@ -456,6 +454,7 @@
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenFourZero\RemoveParentIdPropertyTypeGroupColumn.cs" />
|
||||
<Compile Include="Persistence\Mappers\TaskTypeMapper.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenSixZero\RemovePropertyDataIdIndex.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenSixZero\RemoveUmbracoDeployTables.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeTwo\EnsureMigrationsTableIdentityIsCorrect.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenFourZero\EnsureContentTypeUniqueIdsAreConsistent.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenThreeZero\AddExternalLoginsTable.cs" />
|
||||
|
||||
@@ -580,31 +580,6 @@ namespace Umbraco.Tests.Persistence
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Create_umbracoDeployDependency_Table()
|
||||
{
|
||||
|
||||
using (Transaction transaction = Database.GetTransaction())
|
||||
{
|
||||
DatabaseSchemaHelper.CreateTable<UmbracoDeployChecksumDto>();
|
||||
DatabaseSchemaHelper.CreateTable<UmbracoDeployDependencyDto>();
|
||||
|
||||
//transaction.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Create_umbracoDeployChecksum_Table()
|
||||
{
|
||||
|
||||
using (Transaction transaction = Database.GetTransaction())
|
||||
{
|
||||
DatabaseSchemaHelper.CreateTable<UmbracoDeployChecksumDto>();
|
||||
|
||||
//transaction.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Create_umbracoUser_Table()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user