diff --git a/data/Piranha.Data.EF.SQLServer/Migrations/20210406114503_AddContentBlocks.Designer.cs b/data/Piranha.Data.EF.SQLServer/Migrations/20210406114503_AddContentBlocks.Designer.cs
new file mode 100644
index 000000000..5c0028651
--- /dev/null
+++ b/data/Piranha.Data.EF.SQLServer/Migrations/20210406114503_AddContentBlocks.Designer.cs
@@ -0,0 +1,1860 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Piranha.Data.EF.SQLServer;
+
+namespace Piranha.Data.EF.SQLServer.Migrations
+{
+ [DbContext(typeof(SQLServerDb))]
+ [Migration("20210406114503_AddContentBlocks")]
+ partial class AddContentBlocks
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .UseIdentityColumns()
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("ProductVersion", "5.0.0");
+
+ modelBuilder.Entity("Piranha.Data.Alias", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AliasUrl")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("RedirectUrl")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("SiteId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SiteId", "AliasUrl")
+ .IsUnique();
+
+ b.ToTable("Piranha_Aliases");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Block", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("IsReusable")
+ .HasColumnType("bit");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Title")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Piranha_Blocks");
+ });
+
+ modelBuilder.Entity("Piranha.Data.BlockField", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BlockId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("FieldId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BlockId", "FieldId", "SortOrder")
+ .IsUnique();
+
+ b.ToTable("Piranha_BlockFields");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Category", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BlogId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BlogId", "Slug")
+ .IsUnique();
+
+ b.ToTable("Piranha_Categories");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Content", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CategoryId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Excerpt")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("PrimaryImageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Title")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("TypeId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CategoryId");
+
+ b.HasIndex("TypeId");
+
+ b.ToTable("Piranha_Content");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentBlock", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ContentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContentId");
+
+ b.ToTable("Piranha_ContentBlocks");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentBlockField", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BlockId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("FieldId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BlockId", "FieldId", "SortOrder")
+ .IsUnique();
+
+ b.ToTable("Piranha_ContentBlockFields");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentBlockFieldTranslation", b =>
+ {
+ b.Property("FieldId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LanguageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("FieldId", "LanguageId");
+
+ b.HasIndex("LanguageId");
+
+ b.ToTable("Piranha_ContentBlockFieldTranslations");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentField", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("ContentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("FieldId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RegionId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ContentId", "RegionId", "FieldId", "SortOrder");
+
+ b.ToTable("Piranha_ContentFields");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentFieldTranslation", b =>
+ {
+ b.Property("FieldId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LanguageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("FieldId", "LanguageId");
+
+ b.HasIndex("LanguageId");
+
+ b.ToTable("Piranha_ContentFieldTranslations");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentGroup", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Icon")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("IsHidden")
+ .HasColumnType("bit");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Piranha_ContentGroups");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentTaxonomy", b =>
+ {
+ b.Property("ContentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TaxonomyId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("ContentId", "TaxonomyId");
+
+ b.HasIndex("TaxonomyId");
+
+ b.ToTable("Piranha_ContentTaxonomies");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentTranslation", b =>
+ {
+ b.Property("ContentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LanguageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Excerpt")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("ContentId", "LanguageId");
+
+ b.HasIndex("LanguageId");
+
+ b.ToTable("Piranha_ContentTranslations");
+ });
+
+ modelBuilder.Entity("Piranha.Data.ContentType", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Body")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CLRType")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Group")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.ToTable("Piranha_ContentTypes");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Language", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Culture")
+ .HasMaxLength(6)
+ .HasColumnType("nvarchar(6)");
+
+ b.Property("IsDefault")
+ .HasColumnType("bit");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Piranha_Languages");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Media", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AltText")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("ContentType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.Property("Filename")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("FolderId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Height")
+ .HasColumnType("int");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("Properties")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PublicUrl")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Size")
+ .HasColumnType("bigint");
+
+ b.Property("Title")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("Type")
+ .HasColumnType("int");
+
+ b.Property("Width")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("FolderId");
+
+ b.ToTable("Piranha_Media");
+ });
+
+ modelBuilder.Entity("Piranha.Data.MediaFolder", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasMaxLength(512)
+ .HasColumnType("nvarchar(512)");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.ToTable("Piranha_MediaFolders");
+ });
+
+ modelBuilder.Entity("Piranha.Data.MediaVersion", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("FileExtension")
+ .HasMaxLength(8)
+ .HasColumnType("nvarchar(8)");
+
+ b.Property("Height")
+ .HasColumnType("int");
+
+ b.Property("MediaId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Size")
+ .HasColumnType("bigint");
+
+ b.Property("Width")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("MediaId", "Width", "Height")
+ .IsUnique()
+ .HasFilter("[Height] IS NOT NULL");
+
+ b.ToTable("Piranha_MediaVersions");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Page", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CloseCommentsAfterDays")
+ .HasColumnType("int");
+
+ b.Property("ContentType")
+ .IsRequired()
+ .ValueGeneratedOnAdd()
+ .HasMaxLength(255)
+ .HasColumnType("nvarchar(255)")
+ .HasDefaultValue("Page");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("EnableComments")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("Excerpt")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("IsHidden")
+ .HasColumnType("bit");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("MetaDescription")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("MetaFollow")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(true);
+
+ b.Property("MetaIndex")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(true);
+
+ b.Property("MetaKeywords")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("MetaPriority")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("float")
+ .HasDefaultValue(0.5);
+
+ b.Property("MetaTitle")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("NavigationTitle")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("OgDescription")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("OgImageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OgTitle")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("OriginalPageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PageTypeId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PrimaryImageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Published")
+ .HasColumnType("datetime2");
+
+ b.Property("RedirectType")
+ .HasColumnType("int");
+
+ b.Property("RedirectUrl")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Route")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("SiteId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PageTypeId");
+
+ b.HasIndex("ParentId");
+
+ b.HasIndex("SiteId", "Slug")
+ .IsUnique();
+
+ b.ToTable("Piranha_Pages");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PageBlock", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BlockId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BlockId");
+
+ b.HasIndex("PageId", "SortOrder")
+ .IsUnique();
+
+ b.ToTable("Piranha_PageBlocks");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PageComment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Author")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("Body")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("IsApproved")
+ .HasColumnType("bit");
+
+ b.Property("PageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Url")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("UserId")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PageId");
+
+ b.ToTable("Piranha_PageComments");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PageField", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("FieldId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RegionId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PageId", "RegionId", "FieldId", "SortOrder");
+
+ b.ToTable("Piranha_PageFields");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PagePermission", b =>
+ {
+ b.Property("PageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Permission")
+ .HasColumnType("nvarchar(450)");
+
+ b.HasKey("PageId", "Permission");
+
+ b.ToTable("Piranha_PagePermissions");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PageRevision", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Data")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PageId");
+
+ b.ToTable("Piranha_PageRevisions");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PageType", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Body")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CLRType")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.ToTable("Piranha_PageTypes");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Param", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Key")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("Key")
+ .IsUnique();
+
+ b.ToTable("Piranha_Params");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Post", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BlogId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CategoryId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CloseCommentsAfterDays")
+ .HasColumnType("int");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("EnableComments")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(false);
+
+ b.Property("Excerpt")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("MetaDescription")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("MetaFollow")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(true);
+
+ b.Property("MetaIndex")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("bit")
+ .HasDefaultValue(true);
+
+ b.Property("MetaKeywords")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("MetaPriority")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("float")
+ .HasDefaultValue(0.5);
+
+ b.Property("MetaTitle")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("OgDescription")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("OgImageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OgTitle")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("PostTypeId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PrimaryImageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Published")
+ .HasColumnType("datetime2");
+
+ b.Property("RedirectType")
+ .HasColumnType("int");
+
+ b.Property("RedirectUrl")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Route")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CategoryId");
+
+ b.HasIndex("PostTypeId");
+
+ b.HasIndex("BlogId", "Slug")
+ .IsUnique();
+
+ b.ToTable("Piranha_Posts");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PostBlock", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BlockId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("BlockId");
+
+ b.HasIndex("PostId", "SortOrder")
+ .IsUnique();
+
+ b.ToTable("Piranha_PostBlocks");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PostComment", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Author")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("Body")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Email")
+ .IsRequired()
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.Property("IsApproved")
+ .HasColumnType("bit");
+
+ b.Property("PostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Url")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("UserId")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PostId");
+
+ b.ToTable("Piranha_PostComments");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PostField", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("FieldId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("PostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("RegionId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PostId", "RegionId", "FieldId", "SortOrder");
+
+ b.ToTable("Piranha_PostFields");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PostPermission", b =>
+ {
+ b.Property("PostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Permission")
+ .HasColumnType("nvarchar(450)");
+
+ b.HasKey("PostId", "Permission");
+
+ b.ToTable("Piranha_PostPermissions");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PostRevision", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Data")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("PostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("PostId");
+
+ b.ToTable("Piranha_PostRevisions");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PostTag", b =>
+ {
+ b.Property("PostId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TagId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("PostId", "TagId");
+
+ b.HasIndex("TagId");
+
+ b.ToTable("Piranha_PostTags");
+ });
+
+ modelBuilder.Entity("Piranha.Data.PostType", b =>
+ {
+ b.Property("Id")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Body")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CLRType")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.HasKey("Id");
+
+ b.ToTable("Piranha_PostTypes");
+ });
+
+ modelBuilder.Entity("Piranha.Data.Site", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ContentLastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("Created")
+ .HasColumnType("datetime2");
+
+ b.Property("Culture")
+ .HasMaxLength(6)
+ .HasColumnType("nvarchar(6)");
+
+ b.Property("Description")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("Hostnames")
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("InternalId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("IsDefault")
+ .HasColumnType("bit");
+
+ b.Property("LanguageId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LastModified")
+ .HasColumnType("datetime2");
+
+ b.Property("LogoId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SiteTypeId")
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("Title")
+ .HasMaxLength(128)
+ .HasColumnType("nvarchar(128)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("InternalId")
+ .IsUnique();
+
+ b.HasIndex("LanguageId");
+
+ b.ToTable("Piranha_Sites");
+ });
+
+ modelBuilder.Entity("Piranha.Data.SiteField", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CLRType")
+ .IsRequired()
+ .HasMaxLength(256)
+ .HasColumnType("nvarchar(256)");
+
+ b.Property("FieldId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("RegionId")
+ .IsRequired()
+ .HasMaxLength(64)
+ .HasColumnType("nvarchar(64)");
+
+ b.Property("SiteId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SortOrder")
+ .HasColumnType("int");
+
+ b.Property("Value")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("SiteId", "RegionId", "FieldId", "SortOrder");
+
+ b.ToTable("Piranha_SiteFields");
+ });
+
+ modelBuilder.Entity("Piranha.Data.SiteType", b =>
+ {
+ b.Property