From 3f0a48d4c5de0a10002546e3f5d5a815c109bbbd Mon Sep 17 00:00:00 2001 From: Mark Appleton Date: Mon, 16 Sep 2024 11:31:11 +0100 Subject: [PATCH] #487 migrations added --- .../ViewModels/ContentSettingsViewModel.cs | 2 - .../Models/PageEntity.cs | 5 + ...howHideEditingDetails-20240916.Designer.cs | 968 ++++++++++++++ ...6092008_ShowHideEditingDetails-20240916.cs | 62 + .../SimpleContentDbContextModelSnapshot.cs | 532 ++++---- .../SimpleContentDbContext.cs | 4 + ...howHideEditingDetails-20240916.Designer.cs | 920 +++++++++++++ ...6101637_ShowHideEditingDetails-20240916.cs | 62 + .../SimpleContentDbContextModelSnapshot.cs | 544 ++++---- .../SimpleContentDbContext.cs | 4 + ...howHideEditingDetails-20240916.Designer.cs | 1159 +++++++++++++++++ ...6102400_ShowHideEditingDetails-20240916.cs | 62 + .../SimpleContentDbContextModelSnapshot.cs | 18 +- .../SimpleContentDbContext.cs | 4 + ...howHideEditingDetails-20240916.Designer.cs | 918 +++++++++++++ ...6103032_ShowHideEditingDetails-20240916.cs | 62 + .../SimpleContentDbContextModelSnapshot.cs | 483 +++---- .../SimpleContentDbContext.cs | 4 + .../17595de8-d27a-4304-bded-76b61a16ad19.json | 2 +- 19 files changed, 5093 insertions(+), 722 deletions(-) create mode 100644 src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20240916092008_ShowHideEditingDetails-20240916.Designer.cs create mode 100644 src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20240916092008_ShowHideEditingDetails-20240916.cs create mode 100644 src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/20240916101637_ShowHideEditingDetails-20240916.Designer.cs create mode 100644 src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/20240916101637_ShowHideEditingDetails-20240916.cs create mode 100644 src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/20240916102400_ShowHideEditingDetails-20240916.Designer.cs create mode 100644 src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/20240916102400_ShowHideEditingDetails-20240916.cs create mode 100644 src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/20240916103032_ShowHideEditingDetails-20240916.Designer.cs create mode 100644 src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/20240916103032_ShowHideEditingDetails-20240916.cs diff --git a/src/cloudscribe.Core.SimpleContent/ViewModels/ContentSettingsViewModel.cs b/src/cloudscribe.Core.SimpleContent/ViewModels/ContentSettingsViewModel.cs index e7564cf7b..3948e6dc7 100644 --- a/src/cloudscribe.Core.SimpleContent/ViewModels/ContentSettingsViewModel.cs +++ b/src/cloudscribe.Core.SimpleContent/ViewModels/ContentSettingsViewModel.cs @@ -56,8 +56,6 @@ public ContentSettingsViewModel() public string AboutContent { get; set; } - - // if true automatically add the blog index public bool AddBlogToPagesTree { get; set; } = true; public bool BlogMenuLinksToNewestPost { get; set; } = false; diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageEntity.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageEntity.cs index ac0af722f..6ce8ccf2d 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageEntity.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.Common/Models/PageEntity.cs @@ -229,5 +229,10 @@ public static PageEntity FromIPage(IPage page) return p; } + + public bool ShowCreatedBy { get; set; } = false; + public bool ShowCreatedDate { get; set; } = false; + public bool ShowLastModifiedBy { get; set; } = false; + public bool ShowLastModifiedDate { get; set; } = false; } } diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20240916092008_ShowHideEditingDetails-20240916.Designer.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20240916092008_ShowHideEditingDetails-20240916.Designer.cs new file mode 100644 index 000000000..99410cc58 --- /dev/null +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20240916092008_ShowHideEditingDetails-20240916.Designer.cs @@ -0,0 +1,968 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using cloudscribe.SimpleContent.Storage.EFCore.MSSQL; + +#nullable disable + +namespace cloudscribe.SimpleContent.Storage.EFCore.MSSQL.Migrations +{ + [DbContext(typeof(SimpleContentDbContext))] + [Migration("20240916092008_ShowHideEditingDetails-20240916")] + partial class ShowHideEditingDetails20240916 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); + + b.Property("ArchivedBy") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ArchivedUtc") + .HasColumnType("datetime2"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("CategoriesCsv") + .HasColumnType("nvarchar(max)"); + + b.Property("Content") + .HasColumnType("nvarchar(max)"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ContentSource") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreatedUtc") + .HasColumnType("datetime2"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("DraftContent") + .HasColumnType("nvarchar(max)"); + + b.Property("DraftPubDate") + .HasColumnType("datetime2"); + + b.Property("DraftSerializedModel") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDraftHx") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModified") + .HasColumnType("datetime2"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MetaDescription") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaHtml") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PageOrder") + .HasColumnType("int"); + + b.Property("ParentId") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ParentSlug") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PubDate") + .HasColumnType("datetime2"); + + b.Property("SerializedModel") + .HasColumnType("nvarchar(max)"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Slug") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("TeaserOverride") + .HasColumnType("nvarchar(max)"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ViewRoles") + .HasColumnType("nvarchar(max)"); + + b.Property("WasDeleted") + .HasColumnType("bit"); + + b.HasKey("Id"); + + b.HasIndex("ContentId"); + + b.HasIndex("ContentSource"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("CreatedByUser"); + + b.HasIndex("LastModifiedByUser"); + + b.HasIndex("Title"); + + b.ToTable("cs_ContentHistory", null, t => + { + t.HasTrigger("cs_ContentHistory_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Models.ProjectSettings", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("AboutContent") + .HasColumnType("nvarchar(max)"); + + b.Property("AboutHeading") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("AddBlogToPagesTree") + .HasColumnType("bit"); + + b.Property("BlogMenuLinksToNewestPost") + .HasColumnType("bit"); + + b.Property("BlogPageNavComponentVisibility") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("BlogPagePosition") + .HasColumnType("int"); + + b.Property("BlogPageText") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("CdnUrl") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ChannelCategoriesCsv") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ChannelRating") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ChannelTimeToLive") + .HasColumnType("int"); + + b.Property("CommentNotificationEmail") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CopyrightNotice") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("DaysToComment") + .HasColumnType("int"); + + b.Property("DefaultContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasDefaultValue("html"); + + b.Property("DefaultFeedItems") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(20); + + b.Property("DefaultPageSlug") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Description") + .HasColumnType("nvarchar(max)"); + + b.Property("DisqusShortName") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FacebookAppId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Image") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IncludePubDateInPostUrls") + .HasColumnType("bit"); + + b.Property("LanguageCode") + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("LocalMediaVirtualPath") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ManagingEditorEmail") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MaxFeedItems") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1000); + + b.Property("ModerateComments") + .HasColumnType("bit"); + + b.Property("PostsPerPage") + .HasColumnType("int"); + + b.Property("PubDateFormat") + .HasMaxLength(75) + .HasColumnType("nvarchar(75)"); + + b.Property("Publisher") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("PublisherEntityType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PublisherLogoHeight") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("PublisherLogoUrl") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("PublisherLogoWidth") + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("RecaptchaPrivateKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("RecaptchaPublicKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("RemoteFeedProcessorUseAgentFragment") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("RemoteFeedUrl") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ShowAboutBox") + .HasColumnType("bit"); + + b.Property("ShowFeaturedPostsOnDefaultPage") + .HasColumnType("bit"); + + b.Property("ShowRecentPostsOnDefaultPage") + .HasColumnType("bit"); + + b.Property("ShowRelatedPosts") + .HasColumnType("bit"); + + b.Property("ShowTitle") + .HasColumnType("bit"); + + b.Property("SiteName") + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("TeaserMode") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)0); + + b.Property("TeaserTruncationLength") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(20); + + b.Property("TeaserTruncationMode") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint") + .HasDefaultValue((byte)0); + + b.Property("TimeZoneId") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Title") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("TwitterCreator") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("TwitterPublisher") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("UseDefaultPageAsRootNode") + .HasColumnType("bit"); + + b.Property("WebmasterEmail") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("cs_ContentProject", null, t => + { + t.HasTrigger("cs_ContentProject_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageCategory", b => + { + b.Property("Value") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Value", "PageEntityId"); + + b.HasIndex("PageEntityId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("Value"); + + b.ToTable("cs_PageCategory", null, t => + { + t.HasTrigger("cs_PageCategory_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Content") + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Ip") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsAdmin") + .HasColumnType("bit"); + + b.Property("IsApproved") + .HasColumnType("bit"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PubDate") + .HasColumnType("datetime2"); + + b.Property("UserAgent") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Website") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("PageEntityId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_PageComment", null, t => + { + t.HasTrigger("cs_PageComment_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("CategoriesCsv") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Content") + .HasColumnType("nvarchar(max)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreatedUtc") + .HasColumnType("datetime2"); + + b.Property("DisableEditor") + .HasColumnType("bit"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("DraftContent") + .HasColumnType("nvarchar(max)"); + + b.Property("DraftPubDate") + .HasColumnType("datetime2"); + + b.Property("DraftSerializedModel") + .HasColumnType("nvarchar(max)"); + + b.Property("ExternalUrl") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModified") + .HasColumnType("datetime2"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MenuFilters") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("MenuOnly") + .HasColumnType("bit"); + + b.Property("MetaDescription") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("MetaHtml") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PageOrder") + .HasColumnType("int"); + + b.Property("ParentId") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ParentSlug") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PubDate") + .HasColumnType("datetime2"); + + b.Property("SerializedModel") + .HasColumnType("nvarchar(max)"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShowCategories") + .HasColumnType("bit"); + + b.Property("ShowComments") + .HasColumnType("bit"); + + b.Property("ShowCreatedBy") + .HasColumnType("boolean"); + + b.Property("ShowCreatedDate") + .HasColumnType("boolean"); + + b.Property("ShowHeading") + .HasColumnType("bit"); + + b.Property("ShowLastModified") + .HasColumnType("bit"); + + b.Property("ShowLastModifiedBy") + .HasColumnType("boolean"); + + b.Property("ShowLastModifiedDate") + .HasColumnType("boolean"); + + b.Property("ShowMenu") + .HasColumnType("bit"); + + b.Property("ShowPubDate") + .HasColumnType("bit"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ViewRoles") + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("ParentId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_Page", null, t => + { + t.HasTrigger("cs_Page_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Environment") + .IsRequired() + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("PageEntityId"); + + b.ToTable("cs_PageResource", null, t => + { + t.HasTrigger("cs_PageResource_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostCategory", b => + { + b.Property("Value") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PostEntityId") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.HasKey("Value", "PostEntityId"); + + b.HasIndex("PostEntityId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("Value"); + + b.ToTable("cs_PostCategory", null, t => + { + t.HasTrigger("cs_PostCategory_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Content") + .HasColumnType("nvarchar(max)"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Ip") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("IsAdmin") + .HasColumnType("bit"); + + b.Property("IsApproved") + .HasColumnType("bit"); + + b.Property("PostEntityId") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PubDate") + .HasColumnType("datetime2"); + + b.Property("UserAgent") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("Website") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("PostEntityId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_PostComment", null, t => + { + t.HasTrigger("cs_PostComment_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("AutoTeaser") + .HasColumnType("nvarchar(max)"); + + b.Property("BlogId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CategoriesCsv") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Content") + .HasColumnType("nvarchar(max)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CreatedUtc") + .HasColumnType("datetime2"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("DraftContent") + .HasColumnType("nvarchar(max)"); + + b.Property("DraftPubDate") + .HasColumnType("datetime2"); + + b.Property("DraftSerializedModel") + .HasColumnType("nvarchar(max)"); + + b.Property("ImageUrl") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("IsFeatured") + .HasColumnType("bit"); + + b.Property("IsPublished") + .HasColumnType("bit"); + + b.Property("LastModified") + .HasColumnType("datetime2"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("MetaDescription") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("MetaHtml") + .HasColumnType("nvarchar(max)"); + + b.Property("MetaJson") + .HasColumnType("nvarchar(max)"); + + b.Property("PubDate") + .HasColumnType("datetime2"); + + b.Property("SerializedModel") + .HasColumnType("nvarchar(max)"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ShowComments") + .HasColumnType("bit"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("SuppressTeaser") + .HasColumnType("bit"); + + b.Property("TeaserOverride") + .HasColumnType("nvarchar(max)"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.Property("ThumbnailUrl") + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("BlogId"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("Slug"); + + b.ToTable("cs_Post", null, t => + { + t.HasTrigger("cs_Post_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null) + .WithMany("PageComments") + .HasForeignKey("PageEntityId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null) + .WithMany("PageResources") + .HasForeignKey("PageEntityId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", null) + .WithMany("PostComments") + .HasForeignKey("PostEntityId"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Navigation("PageComments"); + + b.Navigation("PageResources"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Navigation("PostComments"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20240916092008_ShowHideEditingDetails-20240916.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20240916092008_ShowHideEditingDetails-20240916.cs new file mode 100644 index 000000000..dbf7ac857 --- /dev/null +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/20240916092008_ShowHideEditingDetails-20240916.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace cloudscribe.SimpleContent.Storage.EFCore.MSSQL.Migrations +{ + /// + public partial class ShowHideEditingDetails20240916 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ShowCreatedBy", + table: "cs_Page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowCreatedDate", + table: "cs_Page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowLastModifiedBy", + table: "cs_Page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowLastModifiedDate", + table: "cs_Page", + type: "boolean", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ShowCreatedBy", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowCreatedDate", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowLastModifiedBy", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowLastModifiedDate", + table: "cs_Page"); + } + } +} diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/SimpleContentDbContextModelSnapshot.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/SimpleContentDbContextModelSnapshot.cs index 39dbfba31..077ea17e5 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/SimpleContentDbContextModelSnapshot.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/Migrations/SimpleContentDbContextModelSnapshot.cs @@ -6,6 +6,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using cloudscribe.SimpleContent.Storage.EFCore.MSSQL; +#nullable disable + namespace cloudscribe.SimpleContent.Storage.EFCore.MSSQL.Migrations { [DbContext(typeof(SimpleContentDbContext))] @@ -15,27 +17,28 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0") - .HasAnnotation("Relational:MaxIdentifierLength", 128) - .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("uniqueidentifier"); b.Property("ArchivedBy") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ArchivedUtc") .HasColumnType("datetime2"); b.Property("Author") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("CategoriesCsv") .HasColumnType("nvarchar(max)"); @@ -45,34 +48,34 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ContentId") .IsRequired() - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("ContentSource") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("nvarchar(50)") .HasMaxLength(50) + .HasColumnType("nvarchar(50)") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("CreatedByUser") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("CreatedUtc") .HasColumnType("datetime2"); b.Property("DraftAuthor") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("DraftContent") .HasColumnType("nvarchar(max)"); @@ -93,8 +96,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime2"); b.Property("LastModifiedByUser") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("MetaDescription") .HasColumnType("nvarchar(max)"); @@ -109,16 +112,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("ParentId") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ParentSlug") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ProjectId") - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("PubDate") .HasColumnType("datetime2"); @@ -127,24 +130,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("Serializer") - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("Slug") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("TeaserOverride") .HasColumnType("nvarchar(max)"); b.Property("TemplateKey") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("Title") .IsRequired() - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ViewRoles") .HasColumnType("nvarchar(max)"); @@ -166,21 +169,26 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Title"); - b.ToTable("cs_ContentHistory"); + b.ToTable("cs_ContentHistory", null, t => + { + t.HasTrigger("cs_ContentHistory_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Models.ProjectSettings", b => { b.Property("Id") - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("AboutContent") .HasColumnType("nvarchar(max)"); b.Property("AboutHeading") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("AddBlogToPagesTree") .HasColumnType("bit"); @@ -189,46 +197,46 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("bit"); b.Property("BlogPageNavComponentVisibility") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("BlogPagePosition") .HasColumnType("int"); b.Property("BlogPageText") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("CdnUrl") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ChannelCategoriesCsv") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ChannelRating") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("ChannelTimeToLive") .HasColumnType("int"); b.Property("CommentNotificationEmail") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("CopyrightNotice") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("DaysToComment") .HasColumnType("int"); b.Property("DefaultContentType") .ValueGeneratedOnAdd() - .HasColumnType("nvarchar(50)") .HasMaxLength(50) + .HasColumnType("nvarchar(50)") .HasDefaultValue("html"); b.Property("DefaultFeedItems") @@ -237,38 +245,38 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasDefaultValue(20); b.Property("DefaultPageSlug") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("Description") .HasColumnType("nvarchar(max)"); b.Property("DisqusShortName") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("FacebookAppId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("Image") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("IncludePubDateInPostUrls") .HasColumnType("bit"); b.Property("LanguageCode") - .HasColumnType("nvarchar(10)") - .HasMaxLength(10); + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); b.Property("LocalMediaVirtualPath") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ManagingEditorEmail") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("MaxFeedItems") .ValueGeneratedOnAdd() @@ -282,44 +290,44 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("PubDateFormat") - .HasColumnType("nvarchar(75)") - .HasMaxLength(75); + .HasMaxLength(75) + .HasColumnType("nvarchar(75)"); b.Property("Publisher") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("PublisherEntityType") - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("PublisherLogoHeight") - .HasColumnType("nvarchar(20)") - .HasMaxLength(20); + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); b.Property("PublisherLogoUrl") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("PublisherLogoWidth") - .HasColumnType("nvarchar(20)") - .HasMaxLength(20); + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); b.Property("RecaptchaPrivateKey") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("RecaptchaPublicKey") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("RemoteFeedProcessorUseAgentFragment") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("RemoteFeedUrl") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ShowAboutBox") .HasColumnType("bit"); @@ -337,8 +345,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("bit"); b.Property("SiteName") - .HasColumnType("nvarchar(200)") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); b.Property("TeaserMode") .ValueGeneratedOnAdd() @@ -356,47 +364,52 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasDefaultValue((byte)0); b.Property("TimeZoneId") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("Title") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("TwitterCreator") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("TwitterPublisher") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("UseDefaultPageAsRootNode") .HasColumnType("bit"); b.Property("WebmasterEmail") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.HasKey("Id"); - b.ToTable("cs_ContentProject"); + b.ToTable("cs_ContentProject", null, t => + { + t.HasTrigger("cs_ContentProject_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageCategory", b => { b.Property("Value") - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("PageEntityId") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Value", "PageEntityId"); @@ -406,29 +419,34 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Value"); - b.ToTable("cs_PageCategory"); + b.ToTable("cs_PageCategory", null, t => + { + t.HasTrigger("cs_PageCategory_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => { b.Property("Id") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("Author") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("Content") .HasColumnType("nvarchar(max)"); b.Property("Email") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("Ip") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("IsAdmin") .HasColumnType("bit"); @@ -437,24 +455,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("bit"); b.Property("PageEntityId") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("PubDate") .HasColumnType("datetime2"); b.Property("UserAgent") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("Website") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.HasKey("Id"); @@ -462,39 +480,44 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_PageComment"); + b.ToTable("cs_PageComment", null, t => + { + t.HasTrigger("cs_PageComment_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => { b.Property("Id") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("Author") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("CategoriesCsv") - .HasColumnType("nvarchar(500)") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); b.Property("Content") .HasColumnType("nvarchar(max)"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("nvarchar(50)") .HasMaxLength(50) + .HasColumnType("nvarchar(50)") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("CreatedByUser") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("CreatedUtc") .HasColumnType("datetime2"); @@ -503,8 +526,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("bit"); b.Property("DraftAuthor") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("DraftContent") .HasColumnType("nvarchar(max)"); @@ -516,8 +539,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("ExternalUrl") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("IsPublished") .HasColumnType("bit"); @@ -526,19 +549,19 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime2"); b.Property("LastModifiedByUser") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("MenuFilters") - .HasColumnType("nvarchar(500)") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); b.Property("MenuOnly") .HasColumnType("bit"); b.Property("MetaDescription") - .HasColumnType("nvarchar(500)") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); b.Property("MetaHtml") .HasColumnType("nvarchar(max)"); @@ -550,17 +573,17 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("ParentId") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("ParentSlug") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("PubDate") .HasColumnType("datetime2"); @@ -569,8 +592,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("Serializer") - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("ShowCategories") .HasColumnType("bit"); @@ -578,12 +601,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ShowComments") .HasColumnType("bit"); + b.Property("ShowCreatedBy") + .HasColumnType("boolean"); + + b.Property("ShowCreatedDate") + .HasColumnType("boolean"); + b.Property("ShowHeading") .HasColumnType("bit"); b.Property("ShowLastModified") .HasColumnType("bit"); + b.Property("ShowLastModifiedBy") + .HasColumnType("boolean"); + + b.Property("ShowLastModifiedDate") + .HasColumnType("boolean"); + b.Property("ShowMenu") .HasColumnType("bit"); @@ -592,17 +627,17 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Slug") .IsRequired() - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("TemplateKey") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("Title") .IsRequired() - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ViewRoles") .HasColumnType("nvarchar(max)"); @@ -615,58 +650,68 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_Page"); + b.ToTable("cs_Page", null, t => + { + t.HasTrigger("cs_Page_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => { b.Property("Id") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("Environment") .IsRequired() - .HasColumnType("nvarchar(15)") - .HasMaxLength(15); + .HasMaxLength(15) + .HasColumnType("nvarchar(15)"); b.Property("PageEntityId") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("Sort") .HasColumnType("int"); b.Property("Type") .IsRequired() - .HasColumnType("nvarchar(10)") - .HasMaxLength(10); + .HasMaxLength(10) + .HasColumnType("nvarchar(10)"); b.Property("Url") .IsRequired() - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.HasKey("Id"); b.HasIndex("PageEntityId"); - b.ToTable("cs_PageResource"); + b.ToTable("cs_PageResource", null, t => + { + t.HasTrigger("cs_PageResource_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostCategory", b => { b.Property("Value") - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("PostEntityId") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.HasKey("Value", "PostEntityId"); @@ -676,29 +721,34 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Value"); - b.ToTable("cs_PostCategory"); + b.ToTable("cs_PostCategory", null, t => + { + t.HasTrigger("cs_PostCategory_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => { b.Property("Id") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("Author") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("Content") .HasColumnType("nvarchar(max)"); b.Property("Email") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("Ip") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("IsAdmin") .HasColumnType("bit"); @@ -707,24 +757,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("bit"); b.Property("PostEntityId") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("PubDate") .HasColumnType("datetime2"); b.Property("UserAgent") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("Website") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.HasKey("Id"); @@ -732,54 +782,59 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_PostComment"); + b.ToTable("cs_PostComment", null, t => + { + t.HasTrigger("cs_PostComment_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => { b.Property("Id") - .HasColumnType("nvarchar(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("nvarchar(36)"); b.Property("Author") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("AutoTeaser") .HasColumnType("nvarchar(max)"); b.Property("BlogId") .IsRequired() - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("CategoriesCsv") - .HasColumnType("nvarchar(500)") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); b.Property("Content") .HasColumnType("nvarchar(max)"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("nvarchar(50)") .HasMaxLength(50) + .HasColumnType("nvarchar(50)") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("CreatedByUser") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("CreatedUtc") .HasColumnType("datetime2"); b.Property("DraftAuthor") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("DraftContent") .HasColumnType("nvarchar(max)"); @@ -791,8 +846,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("ImageUrl") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("IsFeatured") .HasColumnType("bit"); @@ -804,12 +859,12 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime2"); b.Property("LastModifiedByUser") - .HasColumnType("nvarchar(100)") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); b.Property("MetaDescription") - .HasColumnType("nvarchar(500)") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); b.Property("MetaHtml") .HasColumnType("nvarchar(max)"); @@ -824,16 +879,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("Serializer") - .HasColumnType("nvarchar(50)") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); b.Property("ShowComments") .HasColumnType("bit"); b.Property("Slug") .IsRequired() - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("SuppressTeaser") .HasColumnType("bit"); @@ -842,17 +897,17 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("nvarchar(max)"); b.Property("TemplateKey") - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.Property("ThumbnailUrl") - .HasColumnType("nvarchar(250)") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("nvarchar(250)"); b.Property("Title") .IsRequired() - .HasColumnType("nvarchar(255)") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("nvarchar(255)"); b.HasKey("Id"); @@ -862,7 +917,12 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Slug"); - b.ToTable("cs_Post"); + b.ToTable("cs_Post", null, t => + { + t.HasTrigger("cs_Post_Trigger"); + }); + + b.HasAnnotation("SqlServer:UseSqlOutputClause", false); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => @@ -887,6 +947,18 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany("PostComments") .HasForeignKey("PostEntityId"); }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Navigation("PageComments"); + + b.Navigation("PageResources"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Navigation("PostComments"); + }); #pragma warning restore 612, 618 } } diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/SimpleContentDbContext.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/SimpleContentDbContext.cs index 04eae70dc..ab220433c 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/SimpleContentDbContext.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MSSQL/SimpleContentDbContext.cs @@ -439,6 +439,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(p => p.DraftAuthor) .HasMaxLength(255); + entity.Property(p => p.ShowCreatedBy).HasColumnType("boolean"); + entity.Property(p => p.ShowCreatedDate).HasColumnType("boolean"); + entity.Property(p => p.ShowLastModifiedBy).HasColumnType("boolean"); + entity.Property(p => p.ShowLastModifiedDate).HasColumnType("boolean"); }); modelBuilder.Entity(entity => diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/20240916101637_ShowHideEditingDetails-20240916.Designer.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/20240916101637_ShowHideEditingDetails-20240916.Designer.cs new file mode 100644 index 000000000..2899eaeff --- /dev/null +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/20240916101637_ShowHideEditingDetails-20240916.Designer.cs @@ -0,0 +1,920 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using cloudscribe.SimpleContent.Storage.EFCore.MySQL; + +#nullable disable + +namespace cloudscribe.SimpleContent.Storage.EFCore.MySQL.Migrations +{ + [DbContext(typeof(SimpleContentDbContext))] + [Migration("20240916101637_ShowHideEditingDetails-20240916")] + partial class ShowHideEditingDetails20240916 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(36) + .HasColumnType("char(36)"); + + b.Property("ArchivedBy") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ArchivedUtc") + .HasColumnType("datetime(6)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("CategoriesCsv") + .HasColumnType("longtext"); + + b.Property("Content") + .HasColumnType("longtext"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("ContentSource") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedUtc") + .HasColumnType("datetime(6)"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DraftContent") + .HasColumnType("longtext"); + + b.Property("DraftPubDate") + .HasColumnType("datetime(6)"); + + b.Property("DraftSerializedModel") + .HasColumnType("longtext"); + + b.Property("IsDraftHx") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + b.Property("LastModified") + .HasColumnType("datetime(6)"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("MetaDescription") + .HasColumnType("longtext"); + + b.Property("MetaHtml") + .HasColumnType("longtext"); + + b.Property("MetaJson") + .HasColumnType("longtext"); + + b.Property("PageOrder") + .HasColumnType("int"); + + b.Property("ParentId") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ParentSlug") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PubDate") + .HasColumnType("datetime(6)"); + + b.Property("SerializedModel") + .HasColumnType("longtext"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("Slug") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("TeaserOverride") + .HasColumnType("longtext"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ViewRoles") + .HasColumnType("longtext"); + + b.Property("WasDeleted") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.HasIndex("ContentId"); + + b.HasIndex("ContentSource"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("CreatedByUser"); + + b.HasIndex("LastModifiedByUser"); + + b.HasIndex("Title"); + + b.ToTable("cs_ContentHistory", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Models.ProjectSettings", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("AboutContent") + .HasColumnType("longtext"); + + b.Property("AboutHeading") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("AddBlogToPagesTree") + .HasColumnType("tinyint(1)"); + + b.Property("BlogMenuLinksToNewestPost") + .HasColumnType("tinyint(1)"); + + b.Property("BlogPageNavComponentVisibility") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("BlogPagePosition") + .HasColumnType("int"); + + b.Property("BlogPageText") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("CdnUrl") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ChannelCategoriesCsv") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ChannelRating") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("ChannelTimeToLive") + .HasColumnType("int"); + + b.Property("CommentNotificationEmail") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CopyrightNotice") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DaysToComment") + .HasColumnType("int"); + + b.Property("DefaultContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasDefaultValue("html"); + + b.Property("DefaultFeedItems") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(20); + + b.Property("DefaultPageSlug") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Description") + .HasColumnType("longtext"); + + b.Property("DisqusShortName") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("FacebookAppId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Image") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IncludePubDateInPostUrls") + .HasColumnType("tinyint(1)"); + + b.Property("LanguageCode") + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.Property("LocalMediaVirtualPath") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ManagingEditorEmail") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("MaxFeedItems") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(1000); + + b.Property("ModerateComments") + .HasColumnType("tinyint(1)"); + + b.Property("PostsPerPage") + .HasColumnType("int"); + + b.Property("PubDateFormat") + .HasMaxLength(75) + .HasColumnType("varchar(75)"); + + b.Property("Publisher") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("PublisherEntityType") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PublisherLogoHeight") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("PublisherLogoUrl") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("PublisherLogoWidth") + .HasMaxLength(20) + .HasColumnType("varchar(20)"); + + b.Property("RecaptchaPrivateKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("RecaptchaPublicKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("RemoteFeedProcessorUseAgentFragment") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("RemoteFeedUrl") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ShowAboutBox") + .HasColumnType("tinyint(1)"); + + b.Property("ShowFeaturedPostsOnDefaultPage") + .HasColumnType("tinyint(1)"); + + b.Property("ShowRecentPostsOnDefaultPage") + .HasColumnType("tinyint(1)"); + + b.Property("ShowRelatedPosts") + .HasColumnType("tinyint(1)"); + + b.Property("ShowTitle") + .HasColumnType("tinyint(1)"); + + b.Property("SiteName") + .HasMaxLength(200) + .HasColumnType("varchar(200)"); + + b.Property("TeaserMode") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint unsigned") + .HasDefaultValue((byte)0); + + b.Property("TeaserTruncationLength") + .ValueGeneratedOnAdd() + .HasColumnType("int") + .HasDefaultValue(20); + + b.Property("TeaserTruncationMode") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint unsigned") + .HasDefaultValue((byte)0); + + b.Property("TimeZoneId") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Title") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("TwitterCreator") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("TwitterPublisher") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("UseDefaultPageAsRootNode") + .HasColumnType("tinyint(1)"); + + b.Property("WebmasterEmail") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.HasKey("Id"); + + b.ToTable("cs_ContentProject", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageCategory", b => + { + b.Property("Value") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Value", "PageEntityId"); + + b.HasIndex("PageEntityId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("Value"); + + b.ToTable("cs_PageCategory", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Content") + .HasColumnType("longtext"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Ip") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("IsApproved") + .HasColumnType("tinyint(1)"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PubDate") + .HasColumnType("datetime(6)"); + + b.Property("UserAgent") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Website") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("PageEntityId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_PageComment", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("CategoriesCsv") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Content") + .HasColumnType("longtext"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedUtc") + .HasColumnType("datetime(6)"); + + b.Property("DisableEditor") + .HasColumnType("tinyint(1)"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DraftContent") + .HasColumnType("longtext"); + + b.Property("DraftPubDate") + .HasColumnType("datetime(6)"); + + b.Property("DraftSerializedModel") + .HasColumnType("longtext"); + + b.Property("ExternalUrl") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + b.Property("LastModified") + .HasColumnType("datetime(6)"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("MenuFilters") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("MenuOnly") + .HasColumnType("tinyint(1)"); + + b.Property("MetaDescription") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("MetaHtml") + .HasColumnType("longtext"); + + b.Property("MetaJson") + .HasColumnType("longtext"); + + b.Property("PageOrder") + .HasColumnType("int"); + + b.Property("ParentId") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("ParentSlug") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PubDate") + .HasColumnType("datetime(6)"); + + b.Property("SerializedModel") + .HasColumnType("longtext"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ShowCategories") + .HasColumnType("tinyint(1)"); + + b.Property("ShowComments") + .HasColumnType("tinyint(1)"); + + b.Property("ShowCreatedBy") + .HasColumnType("boolean"); + + b.Property("ShowCreatedDate") + .HasColumnType("boolean"); + + b.Property("ShowHeading") + .HasColumnType("tinyint(1)"); + + b.Property("ShowLastModified") + .HasColumnType("tinyint(1)"); + + b.Property("ShowLastModifiedBy") + .HasColumnType("boolean"); + + b.Property("ShowLastModifiedDate") + .HasColumnType("boolean"); + + b.Property("ShowMenu") + .HasColumnType("tinyint(1)"); + + b.Property("ShowPubDate") + .HasColumnType("tinyint(1)"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ViewRoles") + .HasColumnType("longtext"); + + b.HasKey("Id"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("ParentId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_Page", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("Environment") + .IsRequired() + .HasMaxLength(15) + .HasColumnType("varchar(15)"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("Sort") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("varchar(10)"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("PageEntityId"); + + b.ToTable("cs_PageResource", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostCategory", b => + { + b.Property("Value") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PostEntityId") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.HasKey("Value", "PostEntityId"); + + b.HasIndex("PostEntityId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("Value"); + + b.ToTable("cs_PostCategory", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Content") + .HasColumnType("longtext"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("Ip") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("IsAdmin") + .HasColumnType("tinyint(1)"); + + b.Property("IsApproved") + .HasColumnType("tinyint(1)"); + + b.Property("PostEntityId") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("PubDate") + .HasColumnType("datetime(6)"); + + b.Property("UserAgent") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("Website") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("PostEntityId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_PostComment", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("varchar(36)"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("AutoTeaser") + .HasColumnType("longtext"); + + b.Property("BlogId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("CategoriesCsv") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("Content") + .HasColumnType("longtext"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("varchar(50)") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("CreatedUtc") + .HasColumnType("datetime(6)"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("DraftContent") + .HasColumnType("longtext"); + + b.Property("DraftPubDate") + .HasColumnType("datetime(6)"); + + b.Property("DraftSerializedModel") + .HasColumnType("longtext"); + + b.Property("ImageUrl") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("IsFeatured") + .HasColumnType("tinyint(1)"); + + b.Property("IsPublished") + .HasColumnType("tinyint(1)"); + + b.Property("LastModified") + .HasColumnType("datetime(6)"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("varchar(100)"); + + b.Property("MetaDescription") + .HasMaxLength(500) + .HasColumnType("varchar(500)"); + + b.Property("MetaHtml") + .HasColumnType("longtext"); + + b.Property("MetaJson") + .HasColumnType("longtext"); + + b.Property("PubDate") + .HasColumnType("datetime(6)"); + + b.Property("SerializedModel") + .HasColumnType("longtext"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("varchar(50)"); + + b.Property("ShowComments") + .HasColumnType("bit"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("SuppressTeaser") + .HasColumnType("tinyint(1)"); + + b.Property("TeaserOverride") + .HasColumnType("longtext"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.Property("ThumbnailUrl") + .HasMaxLength(250) + .HasColumnType("varchar(250)"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("varchar(255)"); + + b.HasKey("Id"); + + b.HasIndex("BlogId"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("Slug"); + + b.ToTable("cs_Post", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null) + .WithMany("PageComments") + .HasForeignKey("PageEntityId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null) + .WithMany("PageResources") + .HasForeignKey("PageEntityId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", null) + .WithMany("PostComments") + .HasForeignKey("PostEntityId"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Navigation("PageComments"); + + b.Navigation("PageResources"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Navigation("PostComments"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/20240916101637_ShowHideEditingDetails-20240916.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/20240916101637_ShowHideEditingDetails-20240916.cs new file mode 100644 index 000000000..df0fd8569 --- /dev/null +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/20240916101637_ShowHideEditingDetails-20240916.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace cloudscribe.SimpleContent.Storage.EFCore.MySQL.Migrations +{ + /// + public partial class ShowHideEditingDetails20240916 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ShowCreatedBy", + table: "cs_Page", + type: "boolean(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowCreatedDate", + table: "cs_Page", + type: "boolean(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowLastModifiedBy", + table: "cs_Page", + type: "boolean(1)", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowLastModifiedDate", + table: "cs_Page", + type: "boolean(1)", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ShowCreatedBy", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowCreatedDate", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowLastModifiedBy", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowLastModifiedDate", + table: "cs_Page"); + } + } +} diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/SimpleContentDbContextModelSnapshot.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/SimpleContentDbContextModelSnapshot.cs index 2f0ffd4a5..addfaaf6c 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/SimpleContentDbContextModelSnapshot.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/Migrations/SimpleContentDbContextModelSnapshot.cs @@ -5,6 +5,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using cloudscribe.SimpleContent.Storage.EFCore.MySQL; +#nullable disable + namespace cloudscribe.SimpleContent.Storage.EFCore.MySQL.Migrations { [DbContext(typeof(SimpleContentDbContext))] @@ -14,72 +16,72 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "3.0.0") + .HasAnnotation("ProductVersion", "8.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("char(36)") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("char(36)"); b.Property("ArchivedBy") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ArchivedUtc") .HasColumnType("datetime(6)"); b.Property("Author") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("CategoriesCsv") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Content") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ContentId") .IsRequired() - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("ContentSource") .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") .HasMaxLength(50) + .HasColumnType("varchar(50)") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("CreatedByUser") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("CreatedUtc") .HasColumnType("datetime(6)"); b.Property("DraftAuthor") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("DraftContent") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DraftPubDate") .HasColumnType("datetime(6)"); b.Property("DraftSerializedModel") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("IsDraftHx") .HasColumnType("tinyint(1)"); @@ -91,61 +93,61 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime(6)"); b.Property("LastModifiedByUser") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("MetaDescription") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("MetaHtml") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("MetaJson") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("PageOrder") .HasColumnType("int"); b.Property("ParentId") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ParentSlug") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ProjectId") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("PubDate") .HasColumnType("datetime(6)"); b.Property("SerializedModel") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Serializer") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("Slug") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("TeaserOverride") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("TemplateKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("Title") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ViewRoles") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("WasDeleted") .HasColumnType("tinyint(1)"); @@ -164,21 +166,21 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Title"); - b.ToTable("cs_ContentHistory"); + b.ToTable("cs_ContentHistory", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Models.ProjectSettings", b => { b.Property("Id") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("AboutContent") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("AboutHeading") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("AddBlogToPagesTree") .HasColumnType("tinyint(1)"); @@ -187,46 +189,46 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("tinyint(1)"); b.Property("BlogPageNavComponentVisibility") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("BlogPagePosition") .HasColumnType("int"); b.Property("BlogPageText") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("CdnUrl") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ChannelCategoriesCsv") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ChannelRating") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("ChannelTimeToLive") .HasColumnType("int"); b.Property("CommentNotificationEmail") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("CopyrightNotice") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("DaysToComment") .HasColumnType("int"); b.Property("DefaultContentType") .ValueGeneratedOnAdd() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") .HasMaxLength(50) + .HasColumnType("varchar(50)") .HasDefaultValue("html"); b.Property("DefaultFeedItems") @@ -235,38 +237,38 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasDefaultValue(20); b.Property("DefaultPageSlug") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("Description") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DisqusShortName") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("FacebookAppId") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("Image") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("IncludePubDateInPostUrls") .HasColumnType("tinyint(1)"); b.Property("LanguageCode") - .HasColumnType("varchar(10) CHARACTER SET utf8mb4") - .HasMaxLength(10); + .HasMaxLength(10) + .HasColumnType("varchar(10)"); b.Property("LocalMediaVirtualPath") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ManagingEditorEmail") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("MaxFeedItems") .ValueGeneratedOnAdd() @@ -280,44 +282,44 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("int"); b.Property("PubDateFormat") - .HasColumnType("varchar(75) CHARACTER SET utf8mb4") - .HasMaxLength(75); + .HasMaxLength(75) + .HasColumnType("varchar(75)"); b.Property("Publisher") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("PublisherEntityType") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("PublisherLogoHeight") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); + .HasMaxLength(20) + .HasColumnType("varchar(20)"); b.Property("PublisherLogoUrl") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("PublisherLogoWidth") - .HasColumnType("varchar(20) CHARACTER SET utf8mb4") - .HasMaxLength(20); + .HasMaxLength(20) + .HasColumnType("varchar(20)"); b.Property("RecaptchaPrivateKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("RecaptchaPublicKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("RemoteFeedProcessorUseAgentFragment") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("RemoteFeedUrl") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ShowAboutBox") .HasColumnType("tinyint(1)"); @@ -335,8 +337,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("tinyint(1)"); b.Property("SiteName") - .HasColumnType("varchar(200) CHARACTER SET utf8mb4") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("varchar(200)"); b.Property("TeaserMode") .ValueGeneratedOnAdd() @@ -354,47 +356,47 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasDefaultValue((byte)0); b.Property("TimeZoneId") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("Title") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("TwitterCreator") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("TwitterPublisher") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("UseDefaultPageAsRootNode") .HasColumnType("tinyint(1)"); b.Property("WebmasterEmail") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.HasKey("Id"); - b.ToTable("cs_ContentProject"); + b.ToTable("cs_ContentProject", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageCategory", b => { b.Property("Value") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("PageEntityId") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.HasKey("Value", "PageEntityId"); @@ -404,29 +406,29 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Value"); - b.ToTable("cs_PageCategory"); + b.ToTable("cs_PageCategory", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => { b.Property("Id") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("Author") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("Content") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Email") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("Ip") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("IsAdmin") .HasColumnType("tinyint(1)"); @@ -435,24 +437,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("tinyint(1)"); b.Property("PageEntityId") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("PubDate") .HasColumnType("datetime(6)"); b.Property("UserAgent") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("Website") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -460,39 +462,39 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_PageComment"); + b.ToTable("cs_PageComment", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => { b.Property("Id") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("Author") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("CategoriesCsv") - .HasColumnType("varchar(500) CHARACTER SET utf8mb4") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("varchar(500)"); b.Property("Content") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") .HasMaxLength(50) + .HasColumnType("varchar(50)") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("CreatedByUser") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("CreatedUtc") .HasColumnType("datetime(6)"); @@ -501,21 +503,21 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("tinyint(1)"); b.Property("DraftAuthor") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("DraftContent") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DraftPubDate") .HasColumnType("datetime(6)"); b.Property("DraftSerializedModel") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ExternalUrl") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("IsPublished") .HasColumnType("tinyint(1)"); @@ -524,51 +526,51 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime(6)"); b.Property("LastModifiedByUser") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("MenuFilters") - .HasColumnType("varchar(500) CHARACTER SET utf8mb4") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("varchar(500)"); b.Property("MenuOnly") .HasColumnType("tinyint(1)"); b.Property("MetaDescription") - .HasColumnType("varchar(500) CHARACTER SET utf8mb4") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("varchar(500)"); b.Property("MetaHtml") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("MetaJson") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("PageOrder") .HasColumnType("int"); b.Property("ParentId") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("ParentSlug") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("PubDate") .HasColumnType("datetime(6)"); b.Property("SerializedModel") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Serializer") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("ShowCategories") .HasColumnType("tinyint(1)"); @@ -576,12 +578,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ShowComments") .HasColumnType("tinyint(1)"); + b.Property("ShowCreatedBy") + .HasColumnType("boolean"); + + b.Property("ShowCreatedDate") + .HasColumnType("boolean"); + b.Property("ShowHeading") .HasColumnType("tinyint(1)"); b.Property("ShowLastModified") .HasColumnType("tinyint(1)"); + b.Property("ShowLastModifiedBy") + .HasColumnType("boolean"); + + b.Property("ShowLastModifiedDate") + .HasColumnType("boolean"); + b.Property("ShowMenu") .HasColumnType("tinyint(1)"); @@ -590,20 +604,20 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Slug") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("TemplateKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("Title") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ViewRoles") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.HasKey("Id"); @@ -613,58 +627,58 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_Page"); + b.ToTable("cs_Page", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => { b.Property("Id") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("Environment") .IsRequired() - .HasColumnType("varchar(15) CHARACTER SET utf8mb4") - .HasMaxLength(15); + .HasMaxLength(15) + .HasColumnType("varchar(15)"); b.Property("PageEntityId") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("Sort") .HasColumnType("int"); b.Property("Type") .IsRequired() - .HasColumnType("varchar(10) CHARACTER SET utf8mb4") - .HasMaxLength(10); + .HasMaxLength(10) + .HasColumnType("varchar(10)"); b.Property("Url") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.HasKey("Id"); b.HasIndex("PageEntityId"); - b.ToTable("cs_PageResource"); + b.ToTable("cs_PageResource", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostCategory", b => { b.Property("Value") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("PostEntityId") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.HasKey("Value", "PostEntityId"); @@ -674,29 +688,29 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Value"); - b.ToTable("cs_PostCategory"); + b.ToTable("cs_PostCategory", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => { b.Property("Id") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("Author") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("Content") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Email") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("Ip") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("IsAdmin") .HasColumnType("tinyint(1)"); @@ -705,24 +719,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("tinyint(1)"); b.Property("PostEntityId") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("ProjectId") .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("PubDate") .HasColumnType("datetime(6)"); b.Property("UserAgent") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("Website") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -730,67 +744,67 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_PostComment"); + b.ToTable("cs_PostComment", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => { b.Property("Id") - .HasColumnType("varchar(36) CHARACTER SET utf8mb4") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("varchar(36)"); b.Property("Author") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("AutoTeaser") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("BlogId") .IsRequired() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); b.Property("CategoriesCsv") - .HasColumnType("varchar(500) CHARACTER SET utf8mb4") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("varchar(500)"); b.Property("Content") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") .HasMaxLength(50) + .HasColumnType("varchar(50)") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("CreatedByUser") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("CreatedUtc") .HasColumnType("datetime(6)"); b.Property("DraftAuthor") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("DraftContent") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("DraftPubDate") .HasColumnType("datetime(6)"); b.Property("DraftSerializedModel") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("ImageUrl") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("varchar(250)"); b.Property("IsFeatured") .HasColumnType("tinyint(1)"); @@ -802,55 +816,55 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("datetime(6)"); b.Property("LastModifiedByUser") - .HasColumnType("varchar(100) CHARACTER SET utf8mb4") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("varchar(100)"); b.Property("MetaDescription") - .HasColumnType("varchar(500) CHARACTER SET utf8mb4") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("varchar(500)"); b.Property("MetaHtml") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("MetaJson") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("PubDate") .HasColumnType("datetime(6)"); b.Property("SerializedModel") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("Serializer") - .HasColumnType("varchar(50) CHARACTER SET utf8mb4") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("varchar(50)"); - b.Property("ShowComments") - .HasColumnType("tinyint(1)"); + b.Property("ShowComments") + .HasColumnType("bit"); b.Property("Slug") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("SuppressTeaser") .HasColumnType("tinyint(1)"); b.Property("TeaserOverride") - .HasColumnType("longtext CHARACTER SET utf8mb4"); + .HasColumnType("longtext"); b.Property("TemplateKey") - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.Property("ThumbnailUrl") - .HasColumnType("varchar(250) CHARACTER SET utf8mb4") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("varchar(250)"); b.Property("Title") .IsRequired() - .HasColumnType("varchar(255) CHARACTER SET utf8mb4") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("varchar(255)"); b.HasKey("Id"); @@ -860,7 +874,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Slug"); - b.ToTable("cs_Post"); + b.ToTable("cs_Post", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => @@ -885,6 +899,18 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany("PostComments") .HasForeignKey("PostEntityId"); }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Navigation("PageComments"); + + b.Navigation("PageResources"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Navigation("PostComments"); + }); #pragma warning restore 612, 618 } } diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/SimpleContentDbContext.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/SimpleContentDbContext.cs index ef211fde2..59b52ccbd 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/SimpleContentDbContext.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.MySQL/SimpleContentDbContext.cs @@ -535,6 +535,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(p => p.DraftAuthor) .HasMaxLength(255); + entity.Property(p => p.ShowCreatedBy).HasColumnType("boolean"); + entity.Property(p => p.ShowCreatedDate).HasColumnType("boolean"); + entity.Property(p => p.ShowLastModifiedBy).HasColumnType("boolean"); + entity.Property(p => p.ShowLastModifiedDate).HasColumnType("boolean"); }); modelBuilder.Entity(entity => diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/20240916102400_ShowHideEditingDetails-20240916.Designer.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/20240916102400_ShowHideEditingDetails-20240916.Designer.cs new file mode 100644 index 000000000..5e06ed9fc --- /dev/null +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/20240916102400_ShowHideEditingDetails-20240916.Designer.cs @@ -0,0 +1,1159 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; +using cloudscribe.SimpleContent.Storage.EFCore.PostgreSql; + +#nullable disable + +namespace cloudscribe.SimpleContent.Storage.EFCore.PostgreSql.Migrations +{ + [DbContext(typeof(SimpleContentDbContext))] + [Migration("20240916102400_ShowHideEditingDetails-20240916")] + partial class ShowHideEditingDetails20240916 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 63); + + NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); + + modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(36) + .HasColumnType("uuid") + .HasColumnName("id"); + + b.Property("ArchivedBy") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("archived_by"); + + b.Property("ArchivedUtc") + .HasColumnType("timestamp with time zone") + .HasColumnName("archived_utc"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("author"); + + b.Property("CategoriesCsv") + .HasColumnType("text") + .HasColumnName("categories_csv"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("content_id"); + + b.Property("ContentSource") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("content_source"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasDefaultValue("html") + .HasColumnName("content_type"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("correlation_key"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("created_by_user"); + + b.Property("CreatedUtc") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_utc"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("draft_author"); + + b.Property("DraftContent") + .HasColumnType("text") + .HasColumnName("draft_content"); + + b.Property("DraftPubDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("draft_pub_date"); + + b.Property("DraftSerializedModel") + .HasColumnType("text") + .HasColumnName("draft_serialized_model"); + + b.Property("IsDraftHx") + .HasColumnType("boolean") + .HasColumnName("is_draft_hx"); + + b.Property("IsPublished") + .HasColumnType("boolean") + .HasColumnName("is_published"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("last_modified_by_user"); + + b.Property("MetaDescription") + .HasColumnType("text") + .HasColumnName("meta_description"); + + b.Property("MetaHtml") + .HasColumnType("text") + .HasColumnName("meta_html"); + + b.Property("MetaJson") + .HasColumnType("text") + .HasColumnName("meta_json"); + + b.Property("PageOrder") + .HasColumnType("integer") + .HasColumnName("page_order"); + + b.Property("ParentId") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("parent_id"); + + b.Property("ParentSlug") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("parent_slug"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("project_id"); + + b.Property("PubDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("pub_date"); + + b.Property("SerializedModel") + .HasColumnType("text") + .HasColumnName("serialized_model"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("serializer"); + + b.Property("Slug") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("slug"); + + b.Property("TeaserOverride") + .HasColumnType("text") + .HasColumnName("teaser_override"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("template_key"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("title"); + + b.Property("ViewRoles") + .HasColumnType("text") + .HasColumnName("view_roles"); + + b.Property("WasDeleted") + .HasColumnType("boolean") + .HasColumnName("was_deleted"); + + b.HasKey("Id") + .HasName("pk_cs_content_history"); + + b.HasIndex("ContentId") + .HasDatabaseName("ix_cs_content_history_content_id"); + + b.HasIndex("ContentSource") + .HasDatabaseName("ix_cs_content_history_content_source"); + + b.HasIndex("CorrelationKey") + .HasDatabaseName("ix_cs_content_history_correlation_key"); + + b.HasIndex("CreatedByUser") + .HasDatabaseName("ix_cs_content_history_created_by_user"); + + b.HasIndex("LastModifiedByUser") + .HasDatabaseName("ix_cs_content_history_last_modified_by_user"); + + b.HasIndex("Title") + .HasDatabaseName("ix_cs_content_history_title"); + + b.ToTable("cs_content_history", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Models.ProjectSettings", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("id"); + + b.Property("AboutContent") + .HasColumnType("text") + .HasColumnName("about_content"); + + b.Property("AboutHeading") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("about_heading"); + + b.Property("AddBlogToPagesTree") + .HasColumnType("boolean") + .HasColumnName("add_blog_to_pages_tree"); + + b.Property("BlogMenuLinksToNewestPost") + .HasColumnType("boolean") + .HasColumnName("blog_menu_links_to_newest_post"); + + b.Property("BlogPageNavComponentVisibility") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("blog_page_nav_component_visibility"); + + b.Property("BlogPagePosition") + .HasColumnType("integer") + .HasColumnName("blog_page_position"); + + b.Property("BlogPageText") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("blog_page_text"); + + b.Property("CdnUrl") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("cdn_url"); + + b.Property("ChannelCategoriesCsv") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("channel_categories_csv"); + + b.Property("ChannelRating") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("channel_rating"); + + b.Property("ChannelTimeToLive") + .HasColumnType("integer") + .HasColumnName("channel_time_to_live"); + + b.Property("CommentNotificationEmail") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("comment_notification_email"); + + b.Property("CopyrightNotice") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("copyright_notice"); + + b.Property("DaysToComment") + .HasColumnType("integer") + .HasColumnName("days_to_comment"); + + b.Property("DefaultContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasDefaultValue("html") + .HasColumnName("default_content_type"); + + b.Property("DefaultFeedItems") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(20) + .HasColumnName("default_feed_items"); + + b.Property("DefaultPageSlug") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("default_page_slug"); + + b.Property("Description") + .HasColumnType("text") + .HasColumnName("description"); + + b.Property("DisqusShortName") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("disqus_short_name"); + + b.Property("FacebookAppId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("facebook_app_id"); + + b.Property("Image") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("image"); + + b.Property("IncludePubDateInPostUrls") + .HasColumnType("boolean") + .HasColumnName("include_pub_date_in_post_urls"); + + b.Property("LanguageCode") + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("language_code"); + + b.Property("LocalMediaVirtualPath") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("local_media_virtual_path"); + + b.Property("ManagingEditorEmail") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("managing_editor_email"); + + b.Property("MaxFeedItems") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(1000) + .HasColumnName("max_feed_items"); + + b.Property("ModerateComments") + .HasColumnType("boolean") + .HasColumnName("moderate_comments"); + + b.Property("PostsPerPage") + .HasColumnType("integer") + .HasColumnName("posts_per_page"); + + b.Property("PubDateFormat") + .HasMaxLength(75) + .HasColumnType("character varying(75)") + .HasColumnName("pub_date_format"); + + b.Property("Publisher") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("publisher"); + + b.Property("PublisherEntityType") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("publisher_entity_type"); + + b.Property("PublisherLogoHeight") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("publisher_logo_height"); + + b.Property("PublisherLogoUrl") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("publisher_logo_url"); + + b.Property("PublisherLogoWidth") + .HasMaxLength(20) + .HasColumnType("character varying(20)") + .HasColumnName("publisher_logo_width"); + + b.Property("RecaptchaPrivateKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("recaptcha_private_key"); + + b.Property("RecaptchaPublicKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("recaptcha_public_key"); + + b.Property("RemoteFeedProcessorUseAgentFragment") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("remote_feed_processor_use_agent_fragment"); + + b.Property("RemoteFeedUrl") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("remote_feed_url"); + + b.Property("ShowAboutBox") + .HasColumnType("boolean") + .HasColumnName("show_about_box"); + + b.Property("ShowFeaturedPostsOnDefaultPage") + .HasColumnType("boolean") + .HasColumnName("show_featured_posts_on_default_page"); + + b.Property("ShowRecentPostsOnDefaultPage") + .HasColumnType("boolean") + .HasColumnName("show_recent_posts_on_default_page"); + + b.Property("ShowRelatedPosts") + .HasColumnType("boolean") + .HasColumnName("show_related_posts"); + + b.Property("ShowTitle") + .HasColumnType("boolean") + .HasColumnName("show_title"); + + b.Property("SiteName") + .HasMaxLength(200) + .HasColumnType("character varying(200)") + .HasColumnName("site_name"); + + b.Property("TeaserMode") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)0) + .HasColumnName("teaser_mode"); + + b.Property("TeaserTruncationLength") + .ValueGeneratedOnAdd() + .HasColumnType("integer") + .HasDefaultValue(20) + .HasColumnName("teaser_truncation_length"); + + b.Property("TeaserTruncationMode") + .ValueGeneratedOnAdd() + .HasColumnType("smallint") + .HasDefaultValue((byte)0) + .HasColumnName("teaser_truncation_mode"); + + b.Property("TimeZoneId") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("time_zone_id"); + + b.Property("Title") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("title"); + + b.Property("TwitterCreator") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("twitter_creator"); + + b.Property("TwitterPublisher") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("twitter_publisher"); + + b.Property("UseDefaultPageAsRootNode") + .HasColumnType("boolean") + .HasColumnName("use_default_page_as_root_node"); + + b.Property("WebmasterEmail") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("webmaster_email"); + + b.HasKey("Id") + .HasName("pk_cs_content_project"); + + b.ToTable("cs_content_project", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageCategory", b => + { + b.Property("Value") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("page_entity_id"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("project_id"); + + b.HasKey("Value", "PageEntityId") + .HasName("pk_cs_page_category"); + + b.HasIndex("PageEntityId") + .HasDatabaseName("ix_cs_page_category_page_entity_id"); + + b.HasIndex("ProjectId") + .HasDatabaseName("ix_cs_page_category_project_id"); + + b.HasIndex("Value") + .HasDatabaseName("ix_cs_page_category_value"); + + b.ToTable("cs_page_category", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("id"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("author"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("email"); + + b.Property("Ip") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("ip"); + + b.Property("IsAdmin") + .HasColumnType("boolean") + .HasColumnName("is_admin"); + + b.Property("IsApproved") + .HasColumnType("boolean") + .HasColumnName("is_approved"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("page_entity_id"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("project_id"); + + b.Property("PubDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("pub_date"); + + b.Property("UserAgent") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("user_agent"); + + b.Property("Website") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("website"); + + b.HasKey("Id") + .HasName("pk_cs_page_comment"); + + b.HasIndex("PageEntityId") + .HasDatabaseName("ix_cs_page_comment_page_entity_id"); + + b.HasIndex("ProjectId") + .HasDatabaseName("ix_cs_page_comment_project_id"); + + b.ToTable("cs_page_comment", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("id"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("author"); + + b.Property("CategoriesCsv") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("categories_csv"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasDefaultValue("html") + .HasColumnName("content_type"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("correlation_key"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("created_by_user"); + + b.Property("CreatedUtc") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_utc"); + + b.Property("DisableEditor") + .HasColumnType("boolean") + .HasColumnName("disable_editor"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("draft_author"); + + b.Property("DraftContent") + .HasColumnType("text") + .HasColumnName("draft_content"); + + b.Property("DraftPubDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("draft_pub_date"); + + b.Property("DraftSerializedModel") + .HasColumnType("text") + .HasColumnName("draft_serialized_model"); + + b.Property("ExternalUrl") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("external_url"); + + b.Property("IsPublished") + .HasColumnType("boolean") + .HasColumnName("is_published"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("last_modified_by_user"); + + b.Property("MenuFilters") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("menu_filters"); + + b.Property("MenuOnly") + .HasColumnType("boolean") + .HasColumnName("menu_only"); + + b.Property("MetaDescription") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("meta_description"); + + b.Property("MetaHtml") + .HasColumnType("text") + .HasColumnName("meta_html"); + + b.Property("MetaJson") + .HasColumnType("text") + .HasColumnName("meta_json"); + + b.Property("PageOrder") + .HasColumnType("integer") + .HasColumnName("page_order"); + + b.Property("ParentId") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("parent_id"); + + b.Property("ParentSlug") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("parent_slug"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("project_id"); + + b.Property("PubDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("pub_date"); + + b.Property("SerializedModel") + .HasColumnType("text") + .HasColumnName("serialized_model"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("serializer"); + + b.Property("ShowCategories") + .HasColumnType("boolean") + .HasColumnName("show_categories"); + + b.Property("ShowComments") + .HasColumnType("boolean") + .HasColumnName("show_comments"); + + b.Property("ShowCreatedBy") + .HasColumnType("boolean") + .HasColumnName("show_created_by"); + + b.Property("ShowCreatedDate") + .HasColumnType("boolean") + .HasColumnName("show_created_date"); + + b.Property("ShowHeading") + .HasColumnType("boolean") + .HasColumnName("show_heading"); + + b.Property("ShowLastModified") + .HasColumnType("boolean") + .HasColumnName("show_last_modified"); + + b.Property("ShowLastModifiedBy") + .HasColumnType("boolean") + .HasColumnName("show_last_modified_by"); + + b.Property("ShowLastModifiedDate") + .HasColumnType("boolean") + .HasColumnName("show_last_modified_date"); + + b.Property("ShowMenu") + .HasColumnType("boolean") + .HasColumnName("show_menu"); + + b.Property("ShowPubDate") + .HasColumnType("boolean") + .HasColumnName("show_pub_date"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("slug"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("template_key"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("title"); + + b.Property("ViewRoles") + .HasColumnType("text") + .HasColumnName("view_roles"); + + b.HasKey("Id") + .HasName("pk_cs_page"); + + b.HasIndex("CorrelationKey") + .HasDatabaseName("ix_cs_page_correlation_key"); + + b.HasIndex("ParentId") + .HasDatabaseName("ix_cs_page_parent_id"); + + b.HasIndex("ProjectId") + .HasDatabaseName("ix_cs_page_project_id"); + + b.ToTable("cs_page", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("id"); + + b.Property("Environment") + .IsRequired() + .HasMaxLength(15) + .HasColumnType("character varying(15)") + .HasColumnName("environment"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("page_entity_id"); + + b.Property("Sort") + .HasColumnType("integer") + .HasColumnName("sort"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("character varying(10)") + .HasColumnName("type"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("url"); + + b.HasKey("Id") + .HasName("pk_cs_page_resource"); + + b.HasIndex("PageEntityId") + .HasDatabaseName("ix_cs_page_resource_page_entity_id"); + + b.ToTable("cs_page_resource", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostCategory", b => + { + b.Property("Value") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("value"); + + b.Property("PostEntityId") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("post_entity_id"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("project_id"); + + b.HasKey("Value", "PostEntityId") + .HasName("pk_cs_post_category"); + + b.HasIndex("PostEntityId") + .HasDatabaseName("ix_cs_post_category_post_entity_id"); + + b.HasIndex("ProjectId") + .HasDatabaseName("ix_cs_post_category_project_id"); + + b.HasIndex("Value") + .HasDatabaseName("ix_cs_post_category_value"); + + b.ToTable("cs_post_category", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("id"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("author"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("email"); + + b.Property("Ip") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("ip"); + + b.Property("IsAdmin") + .HasColumnType("boolean") + .HasColumnName("is_admin"); + + b.Property("IsApproved") + .HasColumnType("boolean") + .HasColumnName("is_approved"); + + b.Property("PostEntityId") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("post_entity_id"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("project_id"); + + b.Property("PubDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("pub_date"); + + b.Property("UserAgent") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("user_agent"); + + b.Property("Website") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("website"); + + b.HasKey("Id") + .HasName("pk_cs_post_comment"); + + b.HasIndex("PostEntityId") + .HasDatabaseName("ix_cs_post_comment_post_entity_id"); + + b.HasIndex("ProjectId") + .HasDatabaseName("ix_cs_post_comment_project_id"); + + b.ToTable("cs_post_comment", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("character varying(36)") + .HasColumnName("id"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("author"); + + b.Property("AutoTeaser") + .HasColumnType("text") + .HasColumnName("auto_teaser"); + + b.Property("BlogId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("blog_id"); + + b.Property("CategoriesCsv") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("categories_csv"); + + b.Property("Content") + .HasColumnType("text") + .HasColumnName("content"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasDefaultValue("html") + .HasColumnName("content_type"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("correlation_key"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("created_by_user"); + + b.Property("CreatedUtc") + .HasColumnType("timestamp with time zone") + .HasColumnName("created_utc"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("draft_author"); + + b.Property("DraftContent") + .HasColumnType("text") + .HasColumnName("draft_content"); + + b.Property("DraftPubDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("draft_pub_date"); + + b.Property("DraftSerializedModel") + .HasColumnType("text") + .HasColumnName("draft_serialized_model"); + + b.Property("ImageUrl") + .HasMaxLength(250) + .HasColumnType("character varying(250)") + .HasColumnName("image_url"); + + b.Property("IsFeatured") + .HasColumnType("boolean") + .HasColumnName("is_featured"); + + b.Property("IsPublished") + .HasColumnType("boolean") + .HasColumnName("is_published"); + + b.Property("LastModified") + .HasColumnType("timestamp with time zone") + .HasColumnName("last_modified"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("character varying(100)") + .HasColumnName("last_modified_by_user"); + + b.Property("MetaDescription") + .HasMaxLength(500) + .HasColumnType("character varying(500)") + .HasColumnName("meta_description"); + + b.Property("MetaHtml") + .HasColumnType("text") + .HasColumnName("meta_html"); + + b.Property("MetaJson") + .HasColumnType("text") + .HasColumnName("meta_json"); + + b.Property("PubDate") + .HasColumnType("timestamp with time zone") + .HasColumnName("pub_date"); + + b.Property("SerializedModel") + .HasColumnType("text") + .HasColumnName("serialized_model"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("character varying(50)") + .HasColumnName("serializer"); + + b.Property("ShowComments") + .HasColumnType("boolean") + .HasColumnName("show_comments"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("slug"); + + b.Property("SuppressTeaser") + .HasColumnType("boolean") + .HasColumnName("suppress_teaser"); + + b.Property("TeaserOverride") + .HasColumnType("text") + .HasColumnName("teaser_override"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("template_key"); + + b.Property("ThumbnailUrl") + .HasMaxLength(250) + .HasColumnType("character varying(250)") + .HasColumnName("thumbnail_url"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("character varying(255)") + .HasColumnName("title"); + + b.HasKey("Id") + .HasName("pk_cs_post"); + + b.HasIndex("BlogId") + .HasDatabaseName("ix_cs_post_blog_id"); + + b.HasIndex("CorrelationKey") + .HasDatabaseName("ix_cs_post_correlation_key"); + + b.HasIndex("Slug") + .HasDatabaseName("ix_cs_post_slug"); + + b.ToTable("cs_post", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null) + .WithMany("PageComments") + .HasForeignKey("PageEntityId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_cs_page_comment_cs_page_page_entity_id"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null) + .WithMany("PageResources") + .HasForeignKey("PageEntityId") + .OnDelete(DeleteBehavior.Cascade) + .HasConstraintName("fk_cs_page_resource_cs_page_page_entity_id"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", null) + .WithMany("PostComments") + .HasForeignKey("PostEntityId") + .HasConstraintName("fk_cs_post_comment_cs_post_post_entity_id"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Navigation("PageComments"); + + b.Navigation("PageResources"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Navigation("PostComments"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/20240916102400_ShowHideEditingDetails-20240916.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/20240916102400_ShowHideEditingDetails-20240916.cs new file mode 100644 index 000000000..2d452cf32 --- /dev/null +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/20240916102400_ShowHideEditingDetails-20240916.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace cloudscribe.SimpleContent.Storage.EFCore.PostgreSql.Migrations +{ + /// + public partial class ShowHideEditingDetails20240916 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "show_created_by", + table: "cs_page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "show_created_date", + table: "cs_page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "show_last_modified_by", + table: "cs_page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "show_last_modified_date", + table: "cs_page", + type: "boolean", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "show_created_by", + table: "cs_page"); + + migrationBuilder.DropColumn( + name: "show_created_date", + table: "cs_page"); + + migrationBuilder.DropColumn( + name: "show_last_modified_by", + table: "cs_page"); + + migrationBuilder.DropColumn( + name: "show_last_modified_date", + table: "cs_page"); + } + } +} diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/SimpleContentDbContextModelSnapshot.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/SimpleContentDbContextModelSnapshot.cs index 13dc98ed7..4e5ead1bd 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/SimpleContentDbContextModelSnapshot.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/Migrations/SimpleContentDbContextModelSnapshot.cs @@ -17,7 +17,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder - .HasAnnotation("ProductVersion", "6.0.0") + .HasAnnotation("ProductVersion", "8.0.0") .HasAnnotation("Relational:MaxIdentifierLength", 63); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); @@ -732,6 +732,14 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("boolean") .HasColumnName("show_comments"); + b.Property("ShowCreatedBy") + .HasColumnType("boolean") + .HasColumnName("show_created_by"); + + b.Property("ShowCreatedDate") + .HasColumnType("boolean") + .HasColumnName("show_created_date"); + b.Property("ShowHeading") .HasColumnType("boolean") .HasColumnName("show_heading"); @@ -740,6 +748,14 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("boolean") .HasColumnName("show_last_modified"); + b.Property("ShowLastModifiedBy") + .HasColumnType("boolean") + .HasColumnName("show_last_modified_by"); + + b.Property("ShowLastModifiedDate") + .HasColumnType("boolean") + .HasColumnName("show_last_modified_date"); + b.Property("ShowMenu") .HasColumnType("boolean") .HasColumnName("show_menu"); diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/SimpleContentDbContext.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/SimpleContentDbContext.cs index 7a1072008..6119d3b96 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/SimpleContentDbContext.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.PostgreSql/SimpleContentDbContext.cs @@ -355,6 +355,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(p => p.DraftAuthor) .HasMaxLength(255); + entity.Property(p => p.ShowCreatedBy).HasColumnType("boolean"); + entity.Property(p => p.ShowCreatedDate).HasColumnType("boolean"); + entity.Property(p => p.ShowLastModifiedBy).HasColumnType("boolean"); + entity.Property(p => p.ShowLastModifiedDate).HasColumnType("boolean"); }); modelBuilder.Entity(entity => diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/20240916103032_ShowHideEditingDetails-20240916.Designer.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/20240916103032_ShowHideEditingDetails-20240916.Designer.cs new file mode 100644 index 000000000..657c0867d --- /dev/null +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/20240916103032_ShowHideEditingDetails-20240916.Designer.cs @@ -0,0 +1,918 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using cloudscribe.SimpleContent.Storage.EFCore.SQLite; + +#nullable disable + +namespace cloudscribe.SimpleContent.Storage.EFCore.SQLite.Migrations +{ + [DbContext(typeof(SimpleContentDbContext))] + [Migration("20240916103032_ShowHideEditingDetails-20240916")] + partial class ShowHideEditingDetails20240916 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); + + modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("ArchivedBy") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ArchivedUtc") + .HasColumnType("TEXT"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("CategoriesCsv") + .HasColumnType("TEXT"); + + b.Property("Content") + .HasColumnType("TEXT"); + + b.Property("ContentId") + .IsRequired() + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("ContentSource") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("TEXT") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("CreatedUtc") + .HasColumnType("TEXT"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("DraftContent") + .HasColumnType("TEXT"); + + b.Property("DraftPubDate") + .HasColumnType("TEXT"); + + b.Property("DraftSerializedModel") + .HasColumnType("TEXT"); + + b.Property("IsDraftHx") + .HasColumnType("INTEGER"); + + b.Property("IsPublished") + .HasColumnType("INTEGER"); + + b.Property("LastModified") + .HasColumnType("TEXT"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("MetaDescription") + .HasColumnType("TEXT"); + + b.Property("MetaHtml") + .HasColumnType("TEXT"); + + b.Property("MetaJson") + .HasColumnType("TEXT"); + + b.Property("PageOrder") + .HasColumnType("INTEGER"); + + b.Property("ParentId") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ParentSlug") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ProjectId") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PubDate") + .HasColumnType("TEXT"); + + b.Property("SerializedModel") + .HasColumnType("TEXT"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("Slug") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("TeaserOverride") + .HasColumnType("TEXT"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ViewRoles") + .HasColumnType("TEXT"); + + b.Property("WasDeleted") + .HasColumnType("INTEGER"); + + b.HasKey("Id"); + + b.HasIndex("ContentId"); + + b.HasIndex("ContentSource"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("CreatedByUser"); + + b.HasIndex("LastModifiedByUser"); + + b.HasIndex("Title"); + + b.ToTable("cs_ContentHistory", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Models.ProjectSettings", b => + { + b.Property("Id") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("AboutContent") + .HasColumnType("TEXT"); + + b.Property("AboutHeading") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("AddBlogToPagesTree") + .HasColumnType("INTEGER"); + + b.Property("BlogMenuLinksToNewestPost") + .HasColumnType("INTEGER"); + + b.Property("BlogPageNavComponentVisibility") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("BlogPagePosition") + .HasColumnType("INTEGER"); + + b.Property("BlogPageText") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("CdnUrl") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ChannelCategoriesCsv") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ChannelRating") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("ChannelTimeToLive") + .HasColumnType("INTEGER"); + + b.Property("CommentNotificationEmail") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("CopyrightNotice") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("DaysToComment") + .HasColumnType("INTEGER"); + + b.Property("DefaultContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("TEXT") + .HasDefaultValue("html"); + + b.Property("DefaultFeedItems") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(20); + + b.Property("DefaultPageSlug") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Description") + .HasColumnType("TEXT"); + + b.Property("DisqusShortName") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("FacebookAppId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Image") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("IncludePubDateInPostUrls") + .HasColumnType("INTEGER"); + + b.Property("LanguageCode") + .HasMaxLength(10) + .HasColumnType("TEXT"); + + b.Property("LocalMediaVirtualPath") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ManagingEditorEmail") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("MaxFeedItems") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(1000); + + b.Property("ModerateComments") + .HasColumnType("INTEGER"); + + b.Property("PostsPerPage") + .HasColumnType("INTEGER"); + + b.Property("PubDateFormat") + .HasMaxLength(75) + .HasColumnType("TEXT"); + + b.Property("Publisher") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("PublisherEntityType") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PublisherLogoHeight") + .HasMaxLength(20) + .HasColumnType("TEXT"); + + b.Property("PublisherLogoUrl") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("PublisherLogoWidth") + .HasMaxLength(20) + .HasColumnType("TEXT"); + + b.Property("RecaptchaPrivateKey") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("RecaptchaPublicKey") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("RemoteFeedProcessorUseAgentFragment") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("RemoteFeedUrl") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ShowAboutBox") + .HasColumnType("INTEGER"); + + b.Property("ShowFeaturedPostsOnDefaultPage") + .HasColumnType("INTEGER"); + + b.Property("ShowRecentPostsOnDefaultPage") + .HasColumnType("INTEGER"); + + b.Property("ShowRelatedPosts") + .HasColumnType("INTEGER"); + + b.Property("ShowTitle") + .HasColumnType("INTEGER"); + + b.Property("SiteName") + .HasMaxLength(200) + .HasColumnType("TEXT"); + + b.Property("TeaserMode") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue((byte)0); + + b.Property("TeaserTruncationLength") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue(20); + + b.Property("TeaserTruncationMode") + .ValueGeneratedOnAdd() + .HasColumnType("INTEGER") + .HasDefaultValue((byte)0); + + b.Property("TimeZoneId") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Title") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("TwitterCreator") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("TwitterPublisher") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("UseDefaultPageAsRootNode") + .HasColumnType("INTEGER"); + + b.Property("WebmasterEmail") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.ToTable("cs_ContentProject", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageCategory", b => + { + b.Property("Value") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.HasKey("Value", "PageEntityId"); + + b.HasIndex("PageEntityId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("Value"); + + b.ToTable("cs_PageCategory", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Content") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Ip") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("IsAdmin") + .HasColumnType("INTEGER"); + + b.Property("IsApproved") + .HasColumnType("INTEGER"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PubDate") + .HasColumnType("TEXT"); + + b.Property("UserAgent") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Website") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("PageEntityId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_PageComment", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("CategoriesCsv") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("Content") + .HasColumnType("TEXT"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("TEXT") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("CreatedUtc") + .HasColumnType("TEXT"); + + b.Property("DisableEditor") + .HasColumnType("INTEGER"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("DraftContent") + .HasColumnType("TEXT"); + + b.Property("DraftPubDate") + .HasColumnType("TEXT"); + + b.Property("DraftSerializedModel") + .HasColumnType("TEXT"); + + b.Property("ExternalUrl") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("IsPublished") + .HasColumnType("INTEGER"); + + b.Property("LastModified") + .HasColumnType("TEXT"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("MenuFilters") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("MenuOnly") + .HasColumnType("INTEGER"); + + b.Property("MetaDescription") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("MetaHtml") + .HasColumnType("TEXT"); + + b.Property("MetaJson") + .HasColumnType("TEXT"); + + b.Property("PageOrder") + .HasColumnType("INTEGER"); + + b.Property("ParentId") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("ParentSlug") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PubDate") + .HasColumnType("TEXT"); + + b.Property("SerializedModel") + .HasColumnType("TEXT"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ShowCategories") + .HasColumnType("INTEGER"); + + b.Property("ShowComments") + .HasColumnType("INTEGER"); + + b.Property("ShowCreatedBy") + .HasColumnType("boolean"); + + b.Property("ShowCreatedDate") + .HasColumnType("boolean"); + + b.Property("ShowHeading") + .HasColumnType("INTEGER"); + + b.Property("ShowLastModified") + .HasColumnType("INTEGER"); + + b.Property("ShowLastModifiedBy") + .HasColumnType("boolean"); + + b.Property("ShowLastModifiedDate") + .HasColumnType("boolean"); + + b.Property("ShowMenu") + .HasColumnType("INTEGER"); + + b.Property("ShowPubDate") + .HasColumnType("INTEGER"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ViewRoles") + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("ParentId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_Page", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("Environment") + .IsRequired() + .HasMaxLength(15) + .HasColumnType("TEXT"); + + b.Property("PageEntityId") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("Sort") + .HasColumnType("INTEGER"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("TEXT"); + + b.Property("Url") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("PageEntityId"); + + b.ToTable("cs_PageResource", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostCategory", b => + { + b.Property("Value") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PostEntityId") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.HasKey("Value", "PostEntityId"); + + b.HasIndex("PostEntityId"); + + b.HasIndex("ProjectId"); + + b.HasIndex("Value"); + + b.ToTable("cs_PostCategory", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Content") + .HasColumnType("TEXT"); + + b.Property("Email") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("Ip") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("IsAdmin") + .HasColumnType("INTEGER"); + + b.Property("IsApproved") + .HasColumnType("INTEGER"); + + b.Property("PostEntityId") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("ProjectId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("PubDate") + .HasColumnType("TEXT"); + + b.Property("UserAgent") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("Website") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("PostEntityId"); + + b.HasIndex("ProjectId"); + + b.ToTable("cs_PostComment", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Property("Id") + .HasMaxLength(36) + .HasColumnType("TEXT"); + + b.Property("Author") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("AutoTeaser") + .HasColumnType("TEXT"); + + b.Property("BlogId") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("CategoriesCsv") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("Content") + .HasColumnType("TEXT"); + + b.Property("ContentType") + .ValueGeneratedOnAdd() + .HasMaxLength(50) + .HasColumnType("TEXT") + .HasDefaultValue("html"); + + b.Property("CorrelationKey") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("CreatedByUser") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("CreatedUtc") + .HasColumnType("TEXT"); + + b.Property("DraftAuthor") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("DraftContent") + .HasColumnType("TEXT"); + + b.Property("DraftPubDate") + .HasColumnType("TEXT"); + + b.Property("DraftSerializedModel") + .HasColumnType("TEXT"); + + b.Property("ImageUrl") + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("IsFeatured") + .HasColumnType("INTEGER"); + + b.Property("IsPublished") + .HasColumnType("INTEGER"); + + b.Property("LastModified") + .HasColumnType("TEXT"); + + b.Property("LastModifiedByUser") + .HasMaxLength(100) + .HasColumnType("TEXT"); + + b.Property("MetaDescription") + .HasMaxLength(500) + .HasColumnType("TEXT"); + + b.Property("MetaHtml") + .HasColumnType("TEXT"); + + b.Property("MetaJson") + .HasColumnType("TEXT"); + + b.Property("PubDate") + .HasColumnType("TEXT"); + + b.Property("SerializedModel") + .HasColumnType("TEXT"); + + b.Property("Serializer") + .HasMaxLength(50) + .HasColumnType("TEXT"); + + b.Property("ShowComments") + .HasColumnType("INTEGER"); + + b.Property("Slug") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("SuppressTeaser") + .HasColumnType("INTEGER"); + + b.Property("TeaserOverride") + .HasColumnType("TEXT"); + + b.Property("TemplateKey") + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.Property("ThumbnailUrl") + .HasMaxLength(250) + .HasColumnType("TEXT"); + + b.Property("Title") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("TEXT"); + + b.HasKey("Id"); + + b.HasIndex("BlogId"); + + b.HasIndex("CorrelationKey"); + + b.HasIndex("Slug"); + + b.ToTable("cs_Post", (string)null); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null) + .WithMany("PageComments") + .HasForeignKey("PageEntityId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", null) + .WithMany("PageResources") + .HasForeignKey("PageEntityId") + .OnDelete(DeleteBehavior.Cascade); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => + { + b.HasOne("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", null) + .WithMany("PostComments") + .HasForeignKey("PostEntityId"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Navigation("PageComments"); + + b.Navigation("PageResources"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Navigation("PostComments"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/20240916103032_ShowHideEditingDetails-20240916.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/20240916103032_ShowHideEditingDetails-20240916.cs new file mode 100644 index 000000000..061d2da4f --- /dev/null +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/20240916103032_ShowHideEditingDetails-20240916.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace cloudscribe.SimpleContent.Storage.EFCore.SQLite.Migrations +{ + /// + public partial class ShowHideEditingDetails20240916 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ShowCreatedBy", + table: "cs_Page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowCreatedDate", + table: "cs_Page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowLastModifiedBy", + table: "cs_Page", + type: "boolean", + nullable: false, + defaultValue: false); + + migrationBuilder.AddColumn( + name: "ShowLastModifiedDate", + table: "cs_Page", + type: "boolean", + nullable: false, + defaultValue: false); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ShowCreatedBy", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowCreatedDate", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowLastModifiedBy", + table: "cs_Page"); + + migrationBuilder.DropColumn( + name: "ShowLastModifiedDate", + table: "cs_Page"); + } + } +} diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/SimpleContentDbContextModelSnapshot.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/SimpleContentDbContextModelSnapshot.cs index c5f7e5115..eb98b3002 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/SimpleContentDbContextModelSnapshot.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/Migrations/SimpleContentDbContextModelSnapshot.cs @@ -5,6 +5,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using cloudscribe.SimpleContent.Storage.EFCore.SQLite; +#nullable disable + namespace cloudscribe.SimpleContent.Storage.EFCore.SQLite.Migrations { [DbContext(typeof(SimpleContentDbContext))] @@ -13,26 +15,25 @@ partial class SimpleContentDbContextModelSnapshot : ModelSnapshot protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("ProductVersion", "3.0.0"); + modelBuilder.HasAnnotation("ProductVersion", "8.0.0"); modelBuilder.Entity("cloudscribe.SimpleContent.Models.ContentHistory", b => { b.Property("Id") .ValueGeneratedOnAdd() - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("ArchivedBy") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ArchivedUtc") .HasColumnType("TEXT"); b.Property("Author") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("CategoriesCsv") .HasColumnType("TEXT"); @@ -42,34 +43,34 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ContentId") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("ContentSource") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("TEXT") .HasMaxLength(50) + .HasColumnType("TEXT") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("CreatedByUser") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("CreatedUtc") .HasColumnType("TEXT"); b.Property("DraftAuthor") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("DraftContent") .HasColumnType("TEXT"); @@ -90,8 +91,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("LastModifiedByUser") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("MetaDescription") .HasColumnType("TEXT"); @@ -106,16 +107,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER"); b.Property("ParentId") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ParentSlug") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ProjectId") - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("PubDate") .HasColumnType("TEXT"); @@ -124,24 +125,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("Serializer") - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("Slug") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("TeaserOverride") .HasColumnType("TEXT"); b.Property("TemplateKey") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("Title") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ViewRoles") .HasColumnType("TEXT"); @@ -163,21 +164,21 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Title"); - b.ToTable("cs_ContentHistory"); + b.ToTable("cs_ContentHistory", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Models.ProjectSettings", b => { b.Property("Id") - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("AboutContent") .HasColumnType("TEXT"); b.Property("AboutHeading") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("AddBlogToPagesTree") .HasColumnType("INTEGER"); @@ -186,46 +187,46 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER"); b.Property("BlogPageNavComponentVisibility") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("BlogPagePosition") .HasColumnType("INTEGER"); b.Property("BlogPageText") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("CdnUrl") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ChannelCategoriesCsv") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ChannelRating") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("ChannelTimeToLive") .HasColumnType("INTEGER"); b.Property("CommentNotificationEmail") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("CopyrightNotice") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("DaysToComment") .HasColumnType("INTEGER"); b.Property("DefaultContentType") .ValueGeneratedOnAdd() - .HasColumnType("TEXT") .HasMaxLength(50) + .HasColumnType("TEXT") .HasDefaultValue("html"); b.Property("DefaultFeedItems") @@ -234,38 +235,38 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasDefaultValue(20); b.Property("DefaultPageSlug") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("Description") .HasColumnType("TEXT"); b.Property("DisqusShortName") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("FacebookAppId") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("Image") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("IncludePubDateInPostUrls") .HasColumnType("INTEGER"); b.Property("LanguageCode") - .HasColumnType("TEXT") - .HasMaxLength(10); + .HasMaxLength(10) + .HasColumnType("TEXT"); b.Property("LocalMediaVirtualPath") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ManagingEditorEmail") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("MaxFeedItems") .ValueGeneratedOnAdd() @@ -279,44 +280,44 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER"); b.Property("PubDateFormat") - .HasColumnType("TEXT") - .HasMaxLength(75); + .HasMaxLength(75) + .HasColumnType("TEXT"); b.Property("Publisher") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("PublisherEntityType") - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("PublisherLogoHeight") - .HasColumnType("TEXT") - .HasMaxLength(20); + .HasMaxLength(20) + .HasColumnType("TEXT"); b.Property("PublisherLogoUrl") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("PublisherLogoWidth") - .HasColumnType("TEXT") - .HasMaxLength(20); + .HasMaxLength(20) + .HasColumnType("TEXT"); b.Property("RecaptchaPrivateKey") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("RecaptchaPublicKey") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("RemoteFeedProcessorUseAgentFragment") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("RemoteFeedUrl") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ShowAboutBox") .HasColumnType("INTEGER"); @@ -334,8 +335,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER"); b.Property("SiteName") - .HasColumnType("TEXT") - .HasMaxLength(200); + .HasMaxLength(200) + .HasColumnType("TEXT"); b.Property("TeaserMode") .ValueGeneratedOnAdd() @@ -353,47 +354,47 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasDefaultValue((byte)0); b.Property("TimeZoneId") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("Title") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("TwitterCreator") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("TwitterPublisher") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("UseDefaultPageAsRootNode") .HasColumnType("INTEGER"); b.Property("WebmasterEmail") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.HasKey("Id"); - b.ToTable("cs_ContentProject"); + b.ToTable("cs_ContentProject", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageCategory", b => { b.Property("Value") - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("PageEntityId") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("ProjectId") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.HasKey("Value", "PageEntityId"); @@ -403,29 +404,29 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Value"); - b.ToTable("cs_PageCategory"); + b.ToTable("cs_PageCategory", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => { b.Property("Id") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("Author") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("Content") .HasColumnType("TEXT"); b.Property("Email") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("Ip") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("IsAdmin") .HasColumnType("INTEGER"); @@ -434,24 +435,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER"); b.Property("PageEntityId") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("ProjectId") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("PubDate") .HasColumnType("TEXT"); b.Property("UserAgent") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("Website") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -459,39 +460,39 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_PageComment"); + b.ToTable("cs_PageComment", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => { b.Property("Id") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("Author") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("CategoriesCsv") - .HasColumnType("TEXT") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("TEXT"); b.Property("Content") .HasColumnType("TEXT"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("TEXT") .HasMaxLength(50) + .HasColumnType("TEXT") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("CreatedByUser") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("CreatedUtc") .HasColumnType("TEXT"); @@ -500,8 +501,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER"); b.Property("DraftAuthor") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("DraftContent") .HasColumnType("TEXT"); @@ -513,8 +514,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("ExternalUrl") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("IsPublished") .HasColumnType("INTEGER"); @@ -523,19 +524,19 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("LastModifiedByUser") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("MenuFilters") - .HasColumnType("TEXT") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("TEXT"); b.Property("MenuOnly") .HasColumnType("INTEGER"); b.Property("MetaDescription") - .HasColumnType("TEXT") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("TEXT"); b.Property("MetaHtml") .HasColumnType("TEXT"); @@ -547,17 +548,17 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER"); b.Property("ParentId") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("ParentSlug") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ProjectId") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("PubDate") .HasColumnType("TEXT"); @@ -566,8 +567,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("Serializer") - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("ShowCategories") .HasColumnType("INTEGER"); @@ -575,12 +576,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("ShowComments") .HasColumnType("INTEGER"); + b.Property("ShowCreatedBy") + .HasColumnType("boolean"); + + b.Property("ShowCreatedDate") + .HasColumnType("boolean"); + b.Property("ShowHeading") .HasColumnType("INTEGER"); b.Property("ShowLastModified") .HasColumnType("INTEGER"); + b.Property("ShowLastModifiedBy") + .HasColumnType("boolean"); + + b.Property("ShowLastModifiedDate") + .HasColumnType("boolean"); + b.Property("ShowMenu") .HasColumnType("INTEGER"); @@ -589,17 +602,17 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.Property("Slug") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("TemplateKey") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("Title") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ViewRoles") .HasColumnType("TEXT"); @@ -612,58 +625,58 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_Page"); + b.ToTable("cs_Page", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageResourceEntity", b => { b.Property("Id") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("Environment") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(15); + .HasMaxLength(15) + .HasColumnType("TEXT"); b.Property("PageEntityId") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("Sort") .HasColumnType("INTEGER"); b.Property("Type") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(10); + .HasMaxLength(10) + .HasColumnType("TEXT"); b.Property("Url") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("PageEntityId"); - b.ToTable("cs_PageResource"); + b.ToTable("cs_PageResource", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostCategory", b => { b.Property("Value") - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("PostEntityId") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("ProjectId") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.HasKey("Value", "PostEntityId"); @@ -673,29 +686,29 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Value"); - b.ToTable("cs_PostCategory"); + b.ToTable("cs_PostCategory", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostComment", b => { b.Property("Id") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("Author") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("Content") .HasColumnType("TEXT"); b.Property("Email") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("Ip") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("IsAdmin") .HasColumnType("INTEGER"); @@ -704,24 +717,24 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("INTEGER"); b.Property("PostEntityId") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("ProjectId") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("PubDate") .HasColumnType("TEXT"); b.Property("UserAgent") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("Website") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -729,54 +742,54 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("ProjectId"); - b.ToTable("cs_PostComment"); + b.ToTable("cs_PostComment", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => { b.Property("Id") - .HasColumnType("TEXT") - .HasMaxLength(36); + .HasMaxLength(36) + .HasColumnType("TEXT"); b.Property("Author") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("AutoTeaser") .HasColumnType("TEXT"); b.Property("BlogId") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("CategoriesCsv") - .HasColumnType("TEXT") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("TEXT"); b.Property("Content") .HasColumnType("TEXT"); b.Property("ContentType") .ValueGeneratedOnAdd() - .HasColumnType("TEXT") .HasMaxLength(50) + .HasColumnType("TEXT") .HasDefaultValue("html"); b.Property("CorrelationKey") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("CreatedByUser") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("CreatedUtc") .HasColumnType("TEXT"); b.Property("DraftAuthor") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("DraftContent") .HasColumnType("TEXT"); @@ -788,8 +801,8 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("ImageUrl") - .HasColumnType("TEXT") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("TEXT"); b.Property("IsFeatured") .HasColumnType("INTEGER"); @@ -801,12 +814,12 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("LastModifiedByUser") - .HasColumnType("TEXT") - .HasMaxLength(100); + .HasMaxLength(100) + .HasColumnType("TEXT"); b.Property("MetaDescription") - .HasColumnType("TEXT") - .HasMaxLength(500); + .HasMaxLength(500) + .HasColumnType("TEXT"); b.Property("MetaHtml") .HasColumnType("TEXT"); @@ -821,16 +834,16 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("Serializer") - .HasColumnType("TEXT") - .HasMaxLength(50); + .HasMaxLength(50) + .HasColumnType("TEXT"); b.Property("ShowComments") .HasColumnType("INTEGER"); b.Property("Slug") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("SuppressTeaser") .HasColumnType("INTEGER"); @@ -839,17 +852,17 @@ protected override void BuildModel(ModelBuilder modelBuilder) .HasColumnType("TEXT"); b.Property("TemplateKey") - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.Property("ThumbnailUrl") - .HasColumnType("TEXT") - .HasMaxLength(250); + .HasMaxLength(250) + .HasColumnType("TEXT"); b.Property("Title") .IsRequired() - .HasColumnType("TEXT") - .HasMaxLength(255); + .HasMaxLength(255) + .HasColumnType("TEXT"); b.HasKey("Id"); @@ -859,7 +872,7 @@ protected override void BuildModel(ModelBuilder modelBuilder) b.HasIndex("Slug"); - b.ToTable("cs_Post"); + b.ToTable("cs_Post", (string)null); }); modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageComment", b => @@ -884,6 +897,18 @@ protected override void BuildModel(ModelBuilder modelBuilder) .WithMany("PostComments") .HasForeignKey("PostEntityId"); }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PageEntity", b => + { + b.Navigation("PageComments"); + + b.Navigation("PageResources"); + }); + + modelBuilder.Entity("cloudscribe.SimpleContent.Storage.EFCore.Models.PostEntity", b => + { + b.Navigation("PostComments"); + }); #pragma warning restore 612, 618 } } diff --git a/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/SimpleContentDbContext.cs b/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/SimpleContentDbContext.cs index 32960fedd..90e067606 100644 --- a/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/SimpleContentDbContext.cs +++ b/src/cloudscribe.SimpleContent.Storage.EFCore.SQLite/SimpleContentDbContext.cs @@ -345,6 +345,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(p => p.DraftAuthor) .HasMaxLength(255); + entity.Property(p => p.ShowCreatedBy).HasColumnType("boolean"); + entity.Property(p => p.ShowCreatedDate).HasColumnType("boolean"); + entity.Property(p => p.ShowLastModifiedBy).HasColumnType("boolean"); + entity.Property(p => p.ShowLastModifiedDate).HasColumnType("boolean"); }); modelBuilder.Entity(entity => diff --git a/src/sourceDev.WebApp/nodb_storage/projects/f83067b4-919d-4910-acd1-4b3b1c210ecf/siteuser/17595de8-d27a-4304-bded-76b61a16ad19.json b/src/sourceDev.WebApp/nodb_storage/projects/f83067b4-919d-4910-acd1-4b3b1c210ecf/siteuser/17595de8-d27a-4304-bded-76b61a16ad19.json index f8c0b9caa..43de57765 100644 --- a/src/sourceDev.WebApp/nodb_storage/projects/f83067b4-919d-4910-acd1-4b3b1c210ecf/siteuser/17595de8-d27a-4304-bded-76b61a16ad19.json +++ b/src/sourceDev.WebApp/nodb_storage/projects/f83067b4-919d-4910-acd1-4b3b1c210ecf/siteuser/17595de8-d27a-4304-bded-76b61a16ad19.json @@ -1 +1 @@ -{"AuthorBio":"","Comment":"","NormalizedEmail":"ADMIN@ADMIN.COM","NormalizedUserName":"ADMIN","EmailConfirmed":true,"EmailConfirmSentUtc":null,"AgreementAcceptedUtc":null,"LockoutEndDateUtc":null,"NewEmail":"","NewEmailApproved":false,"LastPasswordChangeUtc":"2024-06-03T14:17:55.2771124Z","MustChangePwd":false,"PasswordHash":"AQAAAAIAAYagAAAAEGVnALS6pFN3EERYv0nYhCQ4jy0t3WB+uYVRUM40L55rqYdKv3yw1MmjWvEYd6x2Pw==","CanAutoLockout":true,"AccessFailedCount":0,"RolesChanged":false,"SecurityStamp":"S7ZJ6RCVYLDHBWTECX2S2GQXJKWUXNSL","Signature":"","TwoFactorEnabled":false,"BrowserKey":"9ed8b339-6fd3-47b9-b969-463319bde01e","Id":"17595de8-d27a-4304-bded-76b61a16ad19","SiteId":"f83067b4-919d-4910-acd1-4b3b1c210ecf","Email":"admin@admin.com","UserName":"admin","DisplayName":"Admin","FirstName":"","LastName":"","AvatarUrl":"","DateOfBirth":null,"CreatedUtc":"2016-08-04T12:03:50.2175089Z","LastModifiedUtc":"2016-08-04T12:03:50.2175089Z","DisplayInMemberList":true,"Gender":"","IsLockedOut":false,"LastLoginUtc":"2024-06-03T14:17:55.3500204Z","PhoneNumber":"","PhoneNumberConfirmed":false,"AccountApproved":true,"TimeZoneId":"","WebSiteUrl":""} \ No newline at end of file +{"AuthorBio":"","Comment":"","NormalizedEmail":"ADMIN@ADMIN.COM","NormalizedUserName":"ADMIN","EmailConfirmed":true,"EmailConfirmSentUtc":null,"AgreementAcceptedUtc":null,"LockoutEndDateUtc":null,"NewEmail":"","NewEmailApproved":false,"LastPasswordChangeUtc":"2024-06-03T14:17:55.2771124Z","MustChangePwd":false,"PasswordHash":"AQAAAAIAAYagAAAAEGVnALS6pFN3EERYv0nYhCQ4jy0t3WB+uYVRUM40L55rqYdKv3yw1MmjWvEYd6x2Pw==","CanAutoLockout":true,"AccessFailedCount":0,"RolesChanged":false,"SecurityStamp":"S7ZJ6RCVYLDHBWTECX2S2GQXJKWUXNSL","Signature":"","TwoFactorEnabled":false,"BrowserKey":"cf41a855-a85c-4676-9a31-835c6d2dd51f","Id":"17595de8-d27a-4304-bded-76b61a16ad19","SiteId":"f83067b4-919d-4910-acd1-4b3b1c210ecf","Email":"admin@admin.com","UserName":"admin","DisplayName":"Admin","FirstName":"","LastName":"","AvatarUrl":"","DateOfBirth":null,"CreatedUtc":"2016-08-04T12:03:50.2175089Z","LastModifiedUtc":"2016-08-04T12:03:50.2175089Z","DisplayInMemberList":true,"Gender":"","IsLockedOut":false,"LastLoginUtc":"2024-09-16T08:01:17.6944239Z","PhoneNumber":"","PhoneNumberConfirmed":false,"AccountApproved":true,"TimeZoneId":"","WebSiteUrl":""} \ No newline at end of file