Removes the table cmsMacroPropertyType, tests install upgrade and new installs.
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[TableName("cmsMacroPropertyType")]
|
||||
[PrimaryKey("id")]
|
||||
[ExplicitColumns]
|
||||
internal class MacroPropertyTypeDto
|
||||
{
|
||||
[Column("id")]
|
||||
[PrimaryKeyColumn(IdentitySeed = 26)]
|
||||
public short Id { get; set; }
|
||||
|
||||
[Column("macroPropertyTypeAlias")]
|
||||
[Length(50)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("macroPropertyTypeRenderAssembly")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string RenderAssembly { get; set; }
|
||||
|
||||
[Column("macroPropertyTypeRenderType")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string RenderType { get; set; }
|
||||
|
||||
[Column("macroPropertyTypeBaseType")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string BaseType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -50,11 +50,6 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
CreateUmbracoUser2AppData();
|
||||
}
|
||||
|
||||
if (tableName.Equals("cmsMacroPropertyType"))
|
||||
{
|
||||
CreateCmsMacroPropertyTypeData();
|
||||
}
|
||||
|
||||
if (tableName.Equals("cmsPropertyTypeGroup"))
|
||||
{
|
||||
CreateCmsPropertyTypeGroupData();
|
||||
@@ -163,27 +158,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
_database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Settings });
|
||||
_database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Users });
|
||||
}
|
||||
|
||||
private void CreateCmsMacroPropertyTypeData()
|
||||
{
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 3, Alias = "mediaCurrent", RenderAssembly = "umbraco.macroRenderings", RenderType = "media", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 4, Alias = "contentSubs", RenderAssembly = "umbraco.macroRenderings", RenderType = "content", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 5, Alias = "contentRandom", RenderAssembly = "umbraco.macroRenderings", RenderType = "content", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 6, Alias = "contentPicker", RenderAssembly = "umbraco.macroRenderings", RenderType = "content", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 13, Alias = "number", RenderAssembly = "umbraco.macroRenderings", RenderType = "numeric", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 14, Alias = "bool", RenderAssembly = "umbraco.macroRenderings", RenderType = "yesNo", BaseType = "Boolean" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 16, Alias = "text", RenderAssembly = "umbraco.macroRenderings", RenderType = "text", BaseType = "String" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 17, Alias = "contentTree", RenderAssembly = "umbraco.macroRenderings", RenderType = "content", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 18, Alias = "contentType", RenderAssembly = "umbraco.macroRenderings", RenderType = "contentTypeSingle", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 19, Alias = "contentTypeMultiple", RenderAssembly = "umbraco.macroRenderings", RenderType = "contentTypeMultiple", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 20, Alias = "contentAll", RenderAssembly = "umbraco.macroRenderings", RenderType = "content", BaseType = "Int32" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 21, Alias = "tabPicker", RenderAssembly = "umbraco.macroRenderings", RenderType = "tabPicker", BaseType = "String" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 22, Alias = "tabPickerMultiple", RenderAssembly = "umbraco.macroRenderings", RenderType = "tabPickerMultiple", BaseType = "String" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 23, Alias = "propertyTypePicker", RenderAssembly = "umbraco.macroRenderings", RenderType = "propertyTypePicker", BaseType = "String" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 24, Alias = "propertyTypePickerMultiple", RenderAssembly = "umbraco.macroRenderings", RenderType = "propertyTypePickerMultiple", BaseType = "String" });
|
||||
_database.Insert("cmsMacroPropertyType", "id", false, new MacroPropertyTypeDto { Id = 25, Alias = "textMultiLine", RenderAssembly = "umbraco.macroRenderings", RenderType = "textMultiple", BaseType = "String" });
|
||||
}
|
||||
|
||||
|
||||
private void CreateCmsPropertyTypeGroupData()
|
||||
{
|
||||
_database.Insert("cmsPropertyTypeGroup", "id", false, new PropertyTypeGroupDto { Id = 3, ContentTypeNodeId = 1032, Text = "Image", SortOrder = 1 });
|
||||
|
||||
@@ -33,33 +33,32 @@ namespace Umbraco.Core.Persistence.Migrations.Initial
|
||||
{12, typeof (DomainDto)},
|
||||
{13, typeof (LogDto)},
|
||||
{14, typeof (MacroDto)},
|
||||
{15, typeof (MacroPropertyTypeDto)},
|
||||
{16, typeof (MacroPropertyDto)},
|
||||
{17, typeof (MemberTypeDto)},
|
||||
{18, typeof (MemberDto)},
|
||||
{19, typeof (Member2MemberGroupDto)},
|
||||
{20, typeof (ContentXmlDto)},
|
||||
{21, typeof (PreviewXmlDto)},
|
||||
{22, typeof (PropertyTypeGroupDto)},
|
||||
{23, typeof (PropertyTypeDto)},
|
||||
{24, typeof (PropertyDataDto)},
|
||||
{25, typeof (RelationTypeDto)},
|
||||
{26, typeof (RelationDto)},
|
||||
{27, typeof (StylesheetDto)},
|
||||
{28, typeof (StylesheetPropertyDto)},
|
||||
{29, typeof (TagDto)},
|
||||
{30, typeof (TagRelationshipDto)},
|
||||
{31, typeof (UserLoginDto)},
|
||||
{32, typeof (UserTypeDto)},
|
||||
{33, typeof (UserDto)},
|
||||
{34, typeof (TaskTypeDto)},
|
||||
{35, typeof (TaskDto)},
|
||||
{36, typeof (ContentType2ContentTypeDto)},
|
||||
{37, typeof (ContentTypeAllowedContentTypeDto)},
|
||||
{38, typeof (User2AppDto)},
|
||||
{39, typeof (User2NodeNotifyDto)},
|
||||
{40, typeof (User2NodePermissionDto)},
|
||||
{41, typeof (ServerRegistrationDto)}
|
||||
{15, typeof (MacroPropertyDto)},
|
||||
{16, typeof (MemberTypeDto)},
|
||||
{17, typeof (MemberDto)},
|
||||
{18, typeof (Member2MemberGroupDto)},
|
||||
{19, typeof (ContentXmlDto)},
|
||||
{20, typeof (PreviewXmlDto)},
|
||||
{21, typeof (PropertyTypeGroupDto)},
|
||||
{22, typeof (PropertyTypeDto)},
|
||||
{23, typeof (PropertyDataDto)},
|
||||
{24, typeof (RelationTypeDto)},
|
||||
{25, typeof (RelationDto)},
|
||||
{26, typeof (StylesheetDto)},
|
||||
{27, typeof (StylesheetPropertyDto)},
|
||||
{28, typeof (TagDto)},
|
||||
{29, typeof (TagRelationshipDto)},
|
||||
{30, typeof (UserLoginDto)},
|
||||
{31, typeof (UserTypeDto)},
|
||||
{32, typeof (UserDto)},
|
||||
{33, typeof (TaskTypeDto)},
|
||||
{34, typeof (TaskDto)},
|
||||
{35, typeof (ContentType2ContentTypeDto)},
|
||||
{36, typeof (ContentTypeAllowedContentTypeDto)},
|
||||
{37, typeof (User2AppDto)},
|
||||
{38, typeof (User2NodeNotifyDto)},
|
||||
{39, typeof (User2NodePermissionDto)},
|
||||
{40, typeof (ServerRegistrationDto)}
|
||||
};
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -788,7 +788,6 @@
|
||||
<Compile Include="Models\Rdbms\LogDto.cs" />
|
||||
<Compile Include="Models\Rdbms\MacroDto.cs" />
|
||||
<Compile Include="Models\Rdbms\MacroPropertyDto.cs" />
|
||||
<Compile Include="Models\Rdbms\MacroPropertyTypeDto.cs" />
|
||||
<Compile Include="Models\Rdbms\Member2MemberGroupDto.cs" />
|
||||
<Compile Include="Models\Rdbms\MemberDto.cs" />
|
||||
<Compile Include="Models\Rdbms\MemberTypeDto.cs" />
|
||||
|
||||
@@ -304,33 +304,7 @@ namespace Umbraco.Tests.Persistence
|
||||
//transaction.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Create_cmsMacroPropertyType_Table()
|
||||
{
|
||||
|
||||
using (Transaction transaction = Database.GetTransaction())
|
||||
{
|
||||
Database.CreateTable<MacroPropertyTypeDto>();
|
||||
|
||||
//transaction.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Can_Create_cmsMacroProperty_Table()
|
||||
{
|
||||
|
||||
using (Transaction transaction = Database.GetTransaction())
|
||||
{
|
||||
Database.CreateTable<MacroDto>();
|
||||
Database.CreateTable<MacroPropertyTypeDto>();
|
||||
Database.CreateTable<MacroPropertyDto>();
|
||||
|
||||
//transaction.Complete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
public void Can_Create_cmsMember_Table()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user