Renames ContentAndMediaTypeBaseController, adds migration to add new db column for list view config
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Models.Rdbms;
|
||||
using Umbraco.Core.Persistence.DatabaseModelDefinitions;
|
||||
using Umbraco.Core.Persistence.SqlSyntax;
|
||||
|
||||
namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
|
||||
{
|
||||
[Migration("7.2.0", 1, GlobalSettings.UmbracoMigrationName)]
|
||||
public class AlterContentTypeTable : MigrationBase
|
||||
{
|
||||
public override void Up()
|
||||
{
|
||||
if (Context == null || Context.Database == null) return;
|
||||
|
||||
Upgrade();
|
||||
|
||||
}
|
||||
|
||||
private void Initial()
|
||||
{
|
||||
//new container config col
|
||||
Alter.Table("cmsContentType").AddColumn("containerConfig").AsString().Nullable();
|
||||
}
|
||||
|
||||
public override void Down()
|
||||
{
|
||||
Delete.Column("containerConfig").FromTable("cmsContentType");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A custom class to map to so that we can linq to it easily without dynamics
|
||||
/// </summary>
|
||||
private class PropertyTypeReferenceDto
|
||||
{
|
||||
public int NodeId { get; set; }
|
||||
public int PropertyTypeId { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -390,6 +390,7 @@
|
||||
<Compile Include="Persistence\Mappers\TemplateMapper.cs" />
|
||||
<Compile Include="Persistence\Migrations\DataLossException.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenOneZero\AssignMissingPrimaryForMySqlKeys.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSevenTwoZero\AlterTagRelationsTable.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSixTwoZero\AssignMissingPrimaryForMySqlKeys.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSixTwoZero\AssignMissingPrimaryForMySqlKeys2.cs" />
|
||||
<Compile Include="Persistence\Migrations\Upgrades\TargetVersionSixTwoZero\ChangePasswordColumn.cs" />
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace Umbraco.Web.Editors
|
||||
/// An API controller used for dealing with content types
|
||||
/// </summary>
|
||||
[PluginController("UmbracoApi")]
|
||||
public class ContentTypeController : ContentAndMediaTypeBaseController
|
||||
public class ContentTypeController : ContentTypeControllerBase
|
||||
{
|
||||
private ICultureDictionary _cultureDictionary;
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@ namespace Umbraco.Web.Editors
|
||||
/// Am abstract API controller providing functionality used for dealing with content and media types
|
||||
/// </summary>
|
||||
[PluginController("UmbracoApi")]
|
||||
public abstract class ContentAndMediaTypeBaseController : UmbracoAuthorizedJsonController
|
||||
public abstract class ContentTypeControllerBase : UmbracoAuthorizedJsonController
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public ContentAndMediaTypeBaseController()
|
||||
public ContentTypeControllerBase()
|
||||
: this(UmbracoContext.Current)
|
||||
{
|
||||
}
|
||||
@@ -29,7 +29,7 @@ namespace Umbraco.Web.Editors
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="umbracoContext"></param>
|
||||
public ContentAndMediaTypeBaseController(UmbracoContext umbracoContext)
|
||||
public ContentTypeControllerBase(UmbracoContext umbracoContext)
|
||||
: base(umbracoContext)
|
||||
{
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace Umbraco.Web.Editors
|
||||
/// An API controller used for dealing with media types
|
||||
/// </summary>
|
||||
[PluginController("UmbracoApi")]
|
||||
public class MediaTypeController : ContentAndMediaTypeBaseController
|
||||
public class MediaTypeController : ContentTypeControllerBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
|
||||
Reference in New Issue
Block a user