Removing attributes for migrations as a library that does this already exists.
Updating a few DTOs for programmatic creation.
This commit is contained in:
@@ -14,20 +14,16 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
public string AppAlias { get; set; }
|
||||
|
||||
[Column("appIcon")]
|
||||
[DatabaseType(DatabaseTypes.Nvarchar, Length = 255)]
|
||||
public string AppIcon { get; set; }
|
||||
|
||||
[Column("appName")]
|
||||
[DatabaseType(DatabaseTypes.Nvarchar, Length = 255)]
|
||||
public string AppName { get; set; }
|
||||
|
||||
[Column("appInitWithTreeAlias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[DatabaseType(DatabaseTypes.Nvarchar, Length = 255)]
|
||||
public string AppInitWithTreeAlias { get; set; }
|
||||
|
||||
[Column("sortOrder")]
|
||||
[DatabaseType(DatabaseTypes.TinyInteger)]
|
||||
[Constraint(Name = "DF_app_sortOrder", Default = "0")]
|
||||
public byte SortOrder { get; set; }
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
@@ -8,15 +9,18 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
internal class AppTreeDto
|
||||
{
|
||||
[Column("treeSilent")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool Silent { get; set; }
|
||||
|
||||
[Column("treeInitialize")]
|
||||
[Constraint(Default = "1")]
|
||||
public bool Initialize { get; set; }
|
||||
|
||||
[Column("treeSortOrder")]
|
||||
public byte SortOrder { get; set; }
|
||||
|
||||
[Column("appAlias")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Clustered = true, Name = "PK_umbracoAppTree", OnColumns = "[appAlias], [treeAlias]")]
|
||||
public string AppAlias { get; set; }
|
||||
|
||||
[Column("treeAlias")]
|
||||
@@ -38,6 +42,7 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
public string HandlerType { get; set; }
|
||||
|
||||
[Column("action")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Action { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -10,19 +10,16 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
[DatabaseType(DatabaseTypes.Integer)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[DatabaseType(DatabaseTypes.Integer)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[Index(IndexTypes.UniqueNonclustered, Name = "IX_cmsContent")]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsContent")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("contentType")]
|
||||
[DatabaseType(DatabaseTypes.Integer)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public int ContentType { get; set; }
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
@@ -7,6 +8,7 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
internal class ContentType2ContentTypeDto
|
||||
{
|
||||
[Column("parentContentTypeId")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Clustered = true, Name = "PK_cmsContentType2ContentType", OnColumns = "[parentContentTypeId], [childContentTypeId]")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
[Column("childContentTypeId")]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
@@ -8,12 +9,16 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
internal class ContentTypeAllowedContentTypeDto
|
||||
{
|
||||
[Column("Id")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Name = "FK_cmsContentTypeAllowedContentType_cmsContentType")]
|
||||
[PrimaryKeyColumn(AutoIncrement = false, Clustered = true, Name = "PK_cmsContentTypeAllowedContentType", OnColumns = "[Id], [AllowedId]")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("AllowedId")]
|
||||
[ForeignKey(typeof(ContentTypeDto), Name = "FK_cmsContentTypeAllowedContentType_cmsContentType1")]
|
||||
public int AllowedId { get; set; }
|
||||
|
||||
[Column("SortOrder")]
|
||||
[Constraint(Name = "df_cmsContentTypeAllowedContentType_sortOrder", Default = "0")]
|
||||
public int SortOrder { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Umbraco.Core.Persistence;
|
||||
using Umbraco.Core.Persistence.DatabaseAnnotations;
|
||||
|
||||
namespace Umbraco.Core.Models.Rdbms
|
||||
{
|
||||
@@ -8,27 +9,38 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
internal class ContentTypeDto
|
||||
{
|
||||
[Column("pk")]
|
||||
[PrimaryKeyColumn]
|
||||
public int PrimaryKey { get; set; }
|
||||
|
||||
[Column("nodeId")]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[Index(IndexTypes.UniqueNonClustered, Name = "IX_cmsContentType")]
|
||||
public int NodeId { get; set; }
|
||||
|
||||
[Column("alias")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Alias { get; set; }
|
||||
|
||||
[Column("icon")]
|
||||
[Index(IndexTypes.NonClustered)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[Column("thumbnail")]
|
||||
[Constraint(Default = "'folder.png'")]
|
||||
public string Thumbnail { get; set; }
|
||||
|
||||
[Column("description")]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[DatabaseType(DatabaseTypes.Nvarchar, Length = 1500)]
|
||||
public string Description { get; set; }
|
||||
|
||||
[Column("isContainer")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool IsContainer { get; set; }
|
||||
|
||||
[Column("allowAtRoot")]
|
||||
[Constraint(Default = "0")]
|
||||
public bool AllowAtRoot { get; set; }
|
||||
|
||||
[ResultColumn]
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
[Column("parentID")]
|
||||
[DatabaseType(DatabaseTypes.Integer)]
|
||||
[ForeignKey(typeof(NodeDto))]
|
||||
[IndexAttribute(IndexTypes.Nonclustered, Name = "IX_umbracoNodeParentId")]
|
||||
[IndexAttribute(IndexTypes.NonClustered, Name = "IX_umbracoNodeParentId")]
|
||||
public int ParentId { get; set; }
|
||||
|
||||
[Column("nodeUser")]
|
||||
@@ -55,7 +55,7 @@ namespace Umbraco.Core.Models.Rdbms
|
||||
[Column("nodeObjectType")]
|
||||
[DatabaseType(DatabaseTypes.UniqueIdentifier)]
|
||||
[NullSetting(NullSetting = NullSettings.Null)]
|
||||
[IndexAttribute(IndexTypes.Nonclustered, Name = "IX_umbracoNodeObjectType")]
|
||||
[IndexAttribute(IndexTypes.NonClustered, Name = "IX_umbracoNodeObjectType")]
|
||||
public Guid? NodeObjectType { get; set; }
|
||||
|
||||
[Column("createDate")]
|
||||
|
||||
Reference in New Issue
Block a user