Removes the xml cache tables - we don't use them apart from in unit tests
This commit is contained in:
@@ -50,8 +50,6 @@ namespace Umbraco.Core.Migrations.Install
|
||||
typeof (MemberTypeDto),
|
||||
typeof (MemberDto),
|
||||
typeof (Member2MemberGroupDto),
|
||||
typeof (ContentXmlDto),
|
||||
typeof (PreviewXmlDto),
|
||||
typeof (PropertyTypeGroupDto),
|
||||
typeof (PropertyTypeDto),
|
||||
typeof (PropertyDataDto),
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
|
||||
{
|
||||
|
||||
public class DropTaskTables : MigrationBase
|
||||
{
|
||||
public DropTaskTables(IMigrationContext context)
|
||||
|
||||
17
src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs
Normal file
17
src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0
|
||||
{
|
||||
public class DropXmlTables : MigrationBase
|
||||
{
|
||||
public DropXmlTables(IMigrationContext context)
|
||||
: base(context)
|
||||
{ }
|
||||
|
||||
public override void Migrate()
|
||||
{
|
||||
if (TableExists("cmsContentXml"))
|
||||
Delete.Table("cmsContentXml").Do();
|
||||
if (TableExists("cmsPreviewXml"))
|
||||
Delete.Table("cmsPreviewXml").Do();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,17 +5,16 @@ namespace Umbraco.Core
|
||||
{
|
||||
public static class DatabaseSchema
|
||||
{
|
||||
//TODO: Why aren't all table names with the same prefix?
|
||||
public const string TableNamePrefix = "umbraco";
|
||||
|
||||
public static class Tables
|
||||
{
|
||||
public const string Lock = /*TableNamePrefix*/ "umbraco" + "Lock";
|
||||
public const string Log = /*TableNamePrefix*/ "umbraco" + "Log";
|
||||
public const string Lock = TableNamePrefix + "Lock";
|
||||
public const string Log = TableNamePrefix + "Log";
|
||||
|
||||
public const string Node = /*TableNamePrefix*/ "umbraco" + "Node";
|
||||
public const string Node = TableNamePrefix + "Node";
|
||||
public const string NodeData = /*TableNamePrefix*/ "cms" + "ContentNu";
|
||||
public const string NodeXml = /*TableNamePrefix*/ "cms" + "ContentXml"; // TODO: get rid of these with the xml cache
|
||||
public const string NodePreviewXml = /*TableNamePrefix*/ "cms" + "PreviewXml"; // TODO: get rid of these with the xml cache
|
||||
|
||||
public const string ContentType = /*TableNamePrefix*/ "cms" + "ContentType";
|
||||
public const string ContentChildType = /*TableNamePrefix*/ "cms" + "ContentTypeAllowedContentType";
|
||||
@@ -37,22 +36,22 @@ namespace Umbraco.Core
|
||||
public const string PropertyTypeGroup = /*TableNamePrefix*/ "cms" + "PropertyTypeGroup";
|
||||
public const string PropertyData = TableNamePrefix + "PropertyData";
|
||||
|
||||
public const string RelationType = /*TableNamePrefix*/ "umbraco" + "RelationType";
|
||||
public const string Relation = /*TableNamePrefix*/ "umbraco" + "Relation";
|
||||
public const string RelationType = TableNamePrefix + "RelationType";
|
||||
public const string Relation = TableNamePrefix + "Relation";
|
||||
|
||||
public const string Domain = /*TableNamePrefix*/ "umbraco" + "Domain";
|
||||
public const string Language = /*TableNamePrefix*/ "umbraco" + "Language";
|
||||
public const string Domain = TableNamePrefix + "Domain";
|
||||
public const string Language = TableNamePrefix + "Language";
|
||||
public const string DictionaryEntry = /*TableNamePrefix*/ "cms" + "Dictionary";
|
||||
public const string DictionaryValue = /*TableNamePrefix*/ "cms" + "LanguageText";
|
||||
|
||||
public const string User = /*TableNamePrefix*/ "umbraco" + "User";
|
||||
public const string UserGroup = /*TableNamePrefix*/ "umbraco" + "UserGroup";
|
||||
public const string UserStartNode = /*TableNamePrefix*/ "umbraco" + "UserStartNode";
|
||||
public const string User2UserGroup = /*TableNamePrefix*/ "umbraco" + "User2UserGroup";
|
||||
public const string User2NodeNotify = /*TableNamePrefix*/ "umbraco" + "User2NodeNotify";
|
||||
public const string UserGroup2App = /*TableNamePrefix*/ "umbraco" + "UserGroup2App";
|
||||
public const string UserGroup2NodePermission = /*TableNamePrefix*/ "umbraco" + "UserGroup2NodePermission";
|
||||
public const string ExternalLogin = /*TableNamePrefix*/ "umbraco" + "ExternalLogin";
|
||||
public const string User = TableNamePrefix + "User";
|
||||
public const string UserGroup = TableNamePrefix + "UserGroup";
|
||||
public const string UserStartNode = TableNamePrefix + "UserStartNode";
|
||||
public const string User2UserGroup = TableNamePrefix + "User2UserGroup";
|
||||
public const string User2NodeNotify = TableNamePrefix + "User2NodeNotify";
|
||||
public const string UserGroup2App = TableNamePrefix + "UserGroup2App";
|
||||
public const string UserGroup2NodePermission = TableNamePrefix + "UserGroup2NodePermission";
|
||||
public const string ExternalLogin = TableNamePrefix + "ExternalLogin";
|
||||
|
||||
public const string Macro = /*TableNamePrefix*/ "cms" + "Macro";
|
||||
public const string MacroProperty = /*TableNamePrefix*/ "cms" + "MacroProperty";
|
||||
@@ -61,21 +60,21 @@ namespace Umbraco.Core
|
||||
public const string MemberType = /*TableNamePrefix*/ "cms" + "MemberType";
|
||||
public const string Member2MemberGroup = /*TableNamePrefix*/ "cms" + "Member2MemberGroup";
|
||||
|
||||
public const string Access = /*TableNamePrefix*/ "umbraco" + "Access";
|
||||
public const string AccessRule = /*TableNamePrefix*/ "umbraco" + "AccessRule";
|
||||
public const string RedirectUrl = /*TableNamePrefix*/ "umbraco" + "RedirectUrl";
|
||||
public const string Access = TableNamePrefix + "Access";
|
||||
public const string AccessRule = TableNamePrefix + "AccessRule";
|
||||
public const string RedirectUrl = TableNamePrefix + "RedirectUrl";
|
||||
|
||||
public const string CacheInstruction = /*TableNamePrefix*/ "umbraco" + "CacheInstruction";
|
||||
public const string Server = /*TableNamePrefix*/ "umbraco" + "Server";
|
||||
public const string CacheInstruction = TableNamePrefix + "CacheInstruction";
|
||||
public const string Server = TableNamePrefix + "Server";
|
||||
|
||||
public const string Tag = /*TableNamePrefix*/ "cms" + "Tags";
|
||||
public const string TagRelationship = /*TableNamePrefix*/ "cms" + "TagRelationship";
|
||||
|
||||
public const string KeyValue = TableNamePrefix + "KeyValue";
|
||||
|
||||
public const string AuditEntry = /*TableNamePrefix*/ "umbraco" + "Audit";
|
||||
public const string Consent = /*TableNamePrefix*/ "umbraco" + "Consent";
|
||||
public const string UserLogin = /*TableNamePrefix*/ "umbraco" + "UserLogin";
|
||||
public const string AuditEntry = TableNamePrefix + "Audit";
|
||||
public const string Consent = TableNamePrefix + "Consent";
|
||||
public const string UserLogin = TableNamePrefix + "UserLogin";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,10 +202,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.DocumentCultureVariation + " WHERE nodeId = @id",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.DocumentVersion + " WHERE id IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.PropertyData + " WHERE versionId IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)",
|
||||
"DELETE FROM cmsPreviewXml WHERE nodeId = @id",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.ContentVersionCultureVariation + " WHERE versionId IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id",
|
||||
"DELETE FROM cmsContentXml WHERE nodeId = @id",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.Content + " WHERE nodeId = @id",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.Access + " WHERE nodeId = @id",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.Node + " WHERE id = @id"
|
||||
|
||||
@@ -188,7 +188,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
|
||||
"DELETE FROM cmsMember2MemberGroup WHERE Member = @id",
|
||||
"DELETE FROM cmsMember WHERE nodeId = @id",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id",
|
||||
"DELETE FROM cmsContentXml WHERE nodeId = @id",
|
||||
"DELETE FROM " + Constants.DatabaseSchema.Tables.Content + " WHERE nodeId = @id",
|
||||
"DELETE FROM umbracoNode WHERE id = @id"
|
||||
};
|
||||
|
||||
@@ -379,6 +379,7 @@
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\DropPreValueTable.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\DropTaskTables.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\DropTemplateDesignColumn.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\DropXmlTables.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\FixLockTablePrimaryKey.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\LanguageColumns.cs" />
|
||||
<Compile Include="Migrations\Upgrade\V_8_0_0\MakeRedirectUrlVariant.cs" />
|
||||
@@ -826,7 +827,6 @@
|
||||
<Compile Include="Persistence\Dtos\ContentTypeDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\ContentTypeTemplateDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\ContentVersionDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\ContentXmlDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\DataTypeDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\DictionaryDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\DocumentDto.cs" />
|
||||
@@ -846,7 +846,6 @@
|
||||
<Compile Include="Persistence\Dtos\MemberTypeDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\MemberTypeReadOnlyDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\NodeDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\PreviewXmlDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\PropertyDataDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\PropertyTypeDto.cs" />
|
||||
<Compile Include="Persistence\Dtos\PropertyTypeGroupDto.cs" />
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
namespace Umbraco.Tests.LegacyXmlPublishedCache
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.NodeXml)]
|
||||
[TableName("cmsContentXml")]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class ContentXmlDto
|
||||
@@ -20,4 +21,4 @@ namespace Umbraco.Core.Persistence.Dtos
|
||||
[Column("rv")]
|
||||
public long Rv { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
using NPoco;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Dtos
|
||||
namespace Umbraco.Tests.LegacyXmlPublishedCache
|
||||
{
|
||||
[TableName(Constants.DatabaseSchema.Tables.NodePreviewXml)]
|
||||
[TableName("cmsPreviewXml")]
|
||||
[PrimaryKey("nodeId", AutoIncrement = false)]
|
||||
[ExplicitColumns]
|
||||
internal class PreviewXmlDto
|
||||
@@ -20,4 +21,4 @@ namespace Umbraco.Core.Persistence.Dtos
|
||||
[Column("rv")]
|
||||
public long Rv { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.Persistence.Repositories.Implement;
|
||||
using Umbraco.Core.Scoping;
|
||||
|
||||
@@ -5,6 +5,7 @@ using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Migrations.Install;
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Tests.Testing;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
using Umbraco.Core.Scoping;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Tests.Testing;
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Tests.Testing;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
|
||||
namespace Umbraco.Tests.Services
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
using Umbraco.Tests.TestHelpers.Entities;
|
||||
using Umbraco.Tests.Testing;
|
||||
using Umbraco.Tests.Scoping;
|
||||
|
||||
@@ -14,6 +14,7 @@ using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.Repositories;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Tests.TestHelpers.Entities;
|
||||
using Umbraco.Tests.Testing;
|
||||
|
||||
@@ -17,6 +17,7 @@ using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Persistence.Querying;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
using Umbraco.Tests.TestHelpers.Entities;
|
||||
using Umbraco.Tests.Testing;
|
||||
using Umbraco.Web.Security.Providers;
|
||||
|
||||
@@ -5,6 +5,7 @@ using NUnit.Framework;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Models;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
using Umbraco.Tests.TestHelpers.Entities;
|
||||
using Umbraco.Tests.Testing;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.Dtos;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Core.Services.Implement;
|
||||
using Umbraco.Tests.LegacyXmlPublishedCache;
|
||||
using Umbraco.Tests.TestHelpers;
|
||||
using Umbraco.Tests.TestHelpers.Entities;
|
||||
using Umbraco.Tests.TestHelpers.Stubs;
|
||||
|
||||
@@ -307,6 +307,13 @@ namespace Umbraco.Tests.TestHelpers
|
||||
var schemaHelper = new DatabaseSchemaCreator(scope.Database, Logger);
|
||||
//Create the umbraco database and its base data
|
||||
schemaHelper.InitializeDatabaseSchema();
|
||||
|
||||
//Special case, we need to create the xml cache tables manually since they are not part of the default
|
||||
//setup.
|
||||
//TODO: Remove this when we update all tests to use nucache
|
||||
schemaHelper.CreateTable<ContentXmlDto>();
|
||||
schemaHelper.CreateTable<PreviewXmlDto>();
|
||||
|
||||
scope.Complete();
|
||||
}
|
||||
|
||||
|
||||
@@ -126,6 +126,8 @@
|
||||
<Compile Include="CoreThings\GuidUtilsTests.cs" />
|
||||
<Compile Include="CoreThings\HexEncoderTests.cs" />
|
||||
<Compile Include="CoreXml\RenamedRootNavigatorTests.cs" />
|
||||
<Compile Include="LegacyXmlPublishedCache\ContentXmlDto.cs" />
|
||||
<Compile Include="LegacyXmlPublishedCache\PreviewXmlDto.cs" />
|
||||
<Compile Include="Logging\LogviewerTests.cs" />
|
||||
<Compile Include="Manifest\ManifestContentAppTests.cs" />
|
||||
<Compile Include="Migrations\MigrationPlanTests.cs" />
|
||||
|
||||
Reference in New Issue
Block a user