diff --git a/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Migrations/20250130063448_Cms_Release_1_0_0.Designer.cs b/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Migrations/20250130063448_Cms_Release_1_0_0.Designer.cs
new file mode 100644
index 00000000..45ca6689
--- /dev/null
+++ b/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Migrations/20250130063448_Cms_Release_1_0_0.Designer.cs
@@ -0,0 +1,1185 @@
+//
+using Logitar.Cms.Infrastructure;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace Logitar.Cms.Infrastructure.PostgreSQL.Migrations
+{
+ [DbContext(typeof(CmsContext))]
+ [Migration("20250130063448_Cms_Release_1_0_0")]
+ partial class Cms_Release_1_0_0
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 63);
+
+ NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.ContentEntity", b =>
+ {
+ b.Property("ContentId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ContentId"));
+
+ b.Property("ContentTypeId")
+ .HasColumnType("integer");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ b.Property("StreamId")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Version")
+ .HasColumnType("bigint");
+
+ b.HasKey("ContentId");
+
+ b.HasIndex("ContentTypeId");
+
+ b.HasIndex("CreatedBy");
+
+ b.HasIndex("CreatedOn");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("StreamId")
+ .IsUnique();
+
+ b.HasIndex("UpdatedBy");
+
+ b.HasIndex("UpdatedOn");
+
+ b.HasIndex("Version");
+
+ b.ToTable("Contents", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.ContentLocaleEntity", b =>
+ {
+ b.Property("ContentLocaleId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ContentLocaleId"));
+
+ b.Property("ContentId")
+ .HasColumnType("integer");
+
+ b.Property("ContentTypeId")
+ .HasColumnType("integer");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("DisplayName")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("FieldValues")
+ .HasColumnType("text");
+
+ b.Property("IsPublished")
+ .HasColumnType("boolean");
+
+ b.Property("LanguageId")
+ .HasColumnType("integer");
+
+ b.Property("PublishedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("PublishedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("PublishedRevision")
+ .HasColumnType("bigint");
+
+ b.Property("Revision")
+ .HasColumnType("bigint");
+
+ b.Property("UniqueName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UniqueNameNormalized")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.HasKey("ContentLocaleId");
+
+ b.HasIndex("CreatedBy");
+
+ b.HasIndex("CreatedOn");
+
+ b.HasIndex("DisplayName");
+
+ b.HasIndex("IsPublished");
+
+ b.HasIndex("LanguageId");
+
+ b.HasIndex("PublishedBy");
+
+ b.HasIndex("PublishedOn");
+
+ b.HasIndex("PublishedRevision");
+
+ b.HasIndex("Revision");
+
+ b.HasIndex("UniqueName");
+
+ b.HasIndex("UpdatedBy");
+
+ b.HasIndex("UpdatedOn");
+
+ b.HasIndex("ContentId", "LanguageId")
+ .IsUnique();
+
+ b.HasIndex("ContentTypeId", "LanguageId", "UniqueNameNormalized")
+ .IsUnique();
+
+ b.ToTable("ContentLocales", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.ContentTypeEntity", b =>
+ {
+ b.Property("ContentTypeId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("ContentTypeId"));
+
+ b.Property("CreatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("DisplayName")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("FieldCount")
+ .HasColumnType("integer");
+
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ b.Property("IsInvariant")
+ .HasColumnType("boolean");
+
+ b.Property("StreamId")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UniqueName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UniqueNameNormalized")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Version")
+ .HasColumnType("bigint");
+
+ b.HasKey("ContentTypeId");
+
+ b.HasIndex("CreatedBy");
+
+ b.HasIndex("CreatedOn");
+
+ b.HasIndex("DisplayName");
+
+ b.HasIndex("FieldCount");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("IsInvariant");
+
+ b.HasIndex("StreamId")
+ .IsUnique();
+
+ b.HasIndex("UniqueName");
+
+ b.HasIndex("UniqueNameNormalized")
+ .IsUnique();
+
+ b.HasIndex("UpdatedBy");
+
+ b.HasIndex("UpdatedOn");
+
+ b.HasIndex("Version");
+
+ b.ToTable("ContentTypes", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.FieldDefinitionEntity", b =>
+ {
+ b.Property("FieldDefinitionId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("FieldDefinitionId"));
+
+ b.Property("ContentTypeId")
+ .HasColumnType("integer");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("DisplayName")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("FieldTypeId")
+ .HasColumnType("integer");
+
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ b.Property("IsIndexed")
+ .HasColumnType("boolean");
+
+ b.Property("IsInvariant")
+ .HasColumnType("boolean");
+
+ b.Property("IsRequired")
+ .HasColumnType("boolean");
+
+ b.Property("IsUnique")
+ .HasColumnType("boolean");
+
+ b.Property("Order")
+ .HasColumnType("integer");
+
+ b.Property("Placeholder")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UniqueName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UniqueNameNormalized")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("FieldDefinitionId");
+
+ b.HasIndex("FieldTypeId");
+
+ b.HasIndex("ContentTypeId", "Id")
+ .IsUnique();
+
+ b.HasIndex("ContentTypeId", "Order")
+ .IsUnique();
+
+ b.HasIndex("ContentTypeId", "UniqueNameNormalized")
+ .IsUnique();
+
+ b.ToTable("FieldDefinitions", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.FieldIndexEntity", b =>
+ {
+ b.Property("FieldIndexId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("FieldIndexId"));
+
+ b.Property("Boolean")
+ .HasColumnType("boolean");
+
+ b.Property("ContentId")
+ .HasColumnType("integer");
+
+ b.Property("ContentLocaleId")
+ .HasColumnType("integer");
+
+ b.Property("ContentLocaleName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("ContentTypeId")
+ .HasColumnType("integer");
+
+ b.Property("ContentTypeName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("ContentTypeUid")
+ .HasColumnType("uuid");
+
+ b.Property("ContentUid")
+ .HasColumnType("uuid");
+
+ b.Property("DateTime")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("FieldDefinitionId")
+ .HasColumnType("integer");
+
+ b.Property("FieldDefinitionName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("FieldDefinitionUid")
+ .HasColumnType("uuid");
+
+ b.Property("FieldTypeId")
+ .HasColumnType("integer");
+
+ b.Property("FieldTypeName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("FieldTypeUid")
+ .HasColumnType("uuid");
+
+ b.Property("LanguageCode")
+ .HasMaxLength(16)
+ .HasColumnType("character varying(16)");
+
+ b.Property("LanguageId")
+ .HasColumnType("integer");
+
+ b.Property("LanguageIsDefault")
+ .HasColumnType("boolean");
+
+ b.Property("LanguageUid")
+ .HasColumnType("uuid");
+
+ b.Property("Number")
+ .HasColumnType("double precision");
+
+ b.Property("RelatedContent")
+ .HasColumnType("text");
+
+ b.Property("Revision")
+ .HasColumnType("bigint");
+
+ b.Property("RichText")
+ .HasColumnType("text");
+
+ b.Property("Select")
+ .HasColumnType("text");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("String")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("Tags")
+ .HasColumnType("text");
+
+ b.HasKey("FieldIndexId");
+
+ b.HasIndex("Boolean");
+
+ b.HasIndex("ContentId");
+
+ b.HasIndex("ContentLocaleId");
+
+ b.HasIndex("ContentLocaleName");
+
+ b.HasIndex("ContentTypeId");
+
+ b.HasIndex("ContentTypeName");
+
+ b.HasIndex("ContentTypeUid");
+
+ b.HasIndex("ContentUid");
+
+ b.HasIndex("DateTime");
+
+ b.HasIndex("FieldDefinitionId");
+
+ b.HasIndex("FieldDefinitionName");
+
+ b.HasIndex("FieldDefinitionUid");
+
+ b.HasIndex("FieldTypeId");
+
+ b.HasIndex("FieldTypeName");
+
+ b.HasIndex("FieldTypeUid");
+
+ b.HasIndex("LanguageCode");
+
+ b.HasIndex("LanguageId");
+
+ b.HasIndex("LanguageIsDefault");
+
+ b.HasIndex("LanguageUid");
+
+ b.HasIndex("Number");
+
+ b.HasIndex("Revision");
+
+ b.HasIndex("Status");
+
+ b.HasIndex("String");
+
+ b.HasIndex("ContentLocaleId", "FieldDefinitionId", "Status")
+ .IsUnique();
+
+ b.ToTable("FieldIndex", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.FieldTypeEntity", b =>
+ {
+ b.Property("FieldTypeId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("FieldTypeId"));
+
+ b.Property("CreatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DataType")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("DisplayName")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ b.Property("Settings")
+ .HasColumnType("text");
+
+ b.Property("StreamId")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UniqueName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UniqueNameNormalized")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Version")
+ .HasColumnType("bigint");
+
+ b.HasKey("FieldTypeId");
+
+ b.HasIndex("CreatedBy");
+
+ b.HasIndex("CreatedOn");
+
+ b.HasIndex("DataType");
+
+ b.HasIndex("DisplayName");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("StreamId")
+ .IsUnique();
+
+ b.HasIndex("UniqueName");
+
+ b.HasIndex("UniqueNameNormalized")
+ .IsUnique();
+
+ b.HasIndex("UpdatedBy");
+
+ b.HasIndex("UpdatedOn");
+
+ b.HasIndex("Version");
+
+ b.ToTable("FieldTypes", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.LanguageEntity", b =>
+ {
+ b.Property("LanguageId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("LanguageId"));
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(16)
+ .HasColumnType("character varying(16)");
+
+ b.Property("CodeNormalized")
+ .IsRequired()
+ .HasMaxLength(16)
+ .HasColumnType("character varying(16)");
+
+ b.Property("CreatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("CreatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("DisplayName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("EnglishName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("Id")
+ .HasColumnType("uuid");
+
+ b.Property("IsDefault")
+ .HasColumnType("boolean");
+
+ b.Property("LCID")
+ .HasColumnType("integer");
+
+ b.Property("NativeName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("StreamId")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UpdatedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Version")
+ .HasColumnType("bigint");
+
+ b.HasKey("LanguageId");
+
+ b.HasIndex("Code");
+
+ b.HasIndex("CodeNormalized")
+ .IsUnique();
+
+ b.HasIndex("CreatedBy");
+
+ b.HasIndex("CreatedOn");
+
+ b.HasIndex("DisplayName");
+
+ b.HasIndex("EnglishName");
+
+ b.HasIndex("Id")
+ .IsUnique();
+
+ b.HasIndex("IsDefault");
+
+ b.HasIndex("LCID");
+
+ b.HasIndex("NativeName");
+
+ b.HasIndex("StreamId")
+ .IsUnique();
+
+ b.HasIndex("UpdatedBy");
+
+ b.HasIndex("UpdatedOn");
+
+ b.HasIndex("Version");
+
+ b.ToTable("Languages", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.PublishedContentEntity", b =>
+ {
+ b.Property("ContentLocaleId")
+ .HasColumnType("integer");
+
+ b.Property("ContentId")
+ .HasColumnType("integer");
+
+ b.Property("ContentTypeId")
+ .HasColumnType("integer");
+
+ b.Property("ContentTypeName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("ContentTypeUid")
+ .HasColumnType("uuid");
+
+ b.Property("ContentUid")
+ .HasColumnType("uuid");
+
+ b.Property("Description")
+ .HasColumnType("text");
+
+ b.Property("DisplayName")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("FieldValues")
+ .HasColumnType("text");
+
+ b.Property("LanguageCode")
+ .HasMaxLength(16)
+ .HasColumnType("character varying(16)");
+
+ b.Property("LanguageId")
+ .HasColumnType("integer");
+
+ b.Property("LanguageIsDefault")
+ .HasColumnType("boolean");
+
+ b.Property("LanguageUid")
+ .HasColumnType("uuid");
+
+ b.Property("PublishedBy")
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("PublishedOn")
+ .HasColumnType("timestamp with time zone");
+
+ b.Property("Revision")
+ .HasColumnType("bigint");
+
+ b.Property("UniqueName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("UniqueNameNormalized")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("ContentLocaleId");
+
+ b.HasIndex("ContentId");
+
+ b.HasIndex("ContentTypeId");
+
+ b.HasIndex("ContentTypeName");
+
+ b.HasIndex("ContentTypeUid");
+
+ b.HasIndex("ContentUid");
+
+ b.HasIndex("DisplayName");
+
+ b.HasIndex("LanguageCode");
+
+ b.HasIndex("LanguageId");
+
+ b.HasIndex("LanguageIsDefault");
+
+ b.HasIndex("LanguageUid");
+
+ b.HasIndex("PublishedBy");
+
+ b.HasIndex("PublishedOn");
+
+ b.HasIndex("Revision");
+
+ b.HasIndex("UniqueName");
+
+ b.HasIndex("UniqueNameNormalized");
+
+ b.ToTable("PublishedContents", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.UniqueIndexEntity", b =>
+ {
+ b.Property("UniqueIndexId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("integer");
+
+ NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("UniqueIndexId"));
+
+ b.Property("ContentId")
+ .HasColumnType("integer");
+
+ b.Property("ContentLocaleId")
+ .HasColumnType("integer");
+
+ b.Property("ContentLocaleName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("ContentTypeId")
+ .HasColumnType("integer");
+
+ b.Property("ContentTypeName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("ContentTypeUid")
+ .HasColumnType("uuid");
+
+ b.Property("ContentUid")
+ .HasColumnType("uuid");
+
+ b.Property("FieldDefinitionId")
+ .HasColumnType("integer");
+
+ b.Property("FieldDefinitionName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("FieldDefinitionUid")
+ .HasColumnType("uuid");
+
+ b.Property("FieldTypeId")
+ .HasColumnType("integer");
+
+ b.Property("FieldTypeName")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("FieldTypeUid")
+ .HasColumnType("uuid");
+
+ b.Property("Key")
+ .IsRequired()
+ .HasMaxLength(278)
+ .HasColumnType("character varying(278)");
+
+ b.Property("LanguageCode")
+ .HasMaxLength(16)
+ .HasColumnType("character varying(16)");
+
+ b.Property("LanguageId")
+ .HasColumnType("integer");
+
+ b.Property("LanguageIsDefault")
+ .HasColumnType("boolean");
+
+ b.Property("LanguageUid")
+ .HasColumnType("uuid");
+
+ b.Property("Revision")
+ .HasColumnType("bigint");
+
+ b.Property("Status")
+ .IsRequired()
+ .HasMaxLength(10)
+ .HasColumnType("character varying(10)");
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.Property("ValueNormalized")
+ .IsRequired()
+ .HasMaxLength(255)
+ .HasColumnType("character varying(255)");
+
+ b.HasKey("UniqueIndexId");
+
+ b.HasIndex("ContentId");
+
+ b.HasIndex("ContentLocaleId");
+
+ b.HasIndex("ContentLocaleName");
+
+ b.HasIndex("ContentTypeId");
+
+ b.HasIndex("ContentTypeName");
+
+ b.HasIndex("ContentTypeUid");
+
+ b.HasIndex("ContentUid");
+
+ b.HasIndex("FieldDefinitionId");
+
+ b.HasIndex("FieldDefinitionName");
+
+ b.HasIndex("FieldDefinitionUid");
+
+ b.HasIndex("FieldTypeId");
+
+ b.HasIndex("FieldTypeName");
+
+ b.HasIndex("FieldTypeUid");
+
+ b.HasIndex("Key");
+
+ b.HasIndex("LanguageCode");
+
+ b.HasIndex("LanguageId");
+
+ b.HasIndex("LanguageIsDefault");
+
+ b.HasIndex("LanguageUid");
+
+ b.HasIndex("Revision");
+
+ b.HasIndex("Status");
+
+ b.HasIndex("Value");
+
+ b.HasIndex("ValueNormalized");
+
+ b.HasIndex("FieldDefinitionId", "LanguageId", "Status", "ValueNormalized")
+ .IsUnique();
+
+ b.ToTable("UniqueIndex", "Cms");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.ContentEntity", b =>
+ {
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentTypeEntity", "ContentType")
+ .WithMany("Contents")
+ .HasForeignKey("ContentTypeId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("ContentType");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.ContentLocaleEntity", b =>
+ {
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentEntity", "Content")
+ .WithMany("Locales")
+ .HasForeignKey("ContentId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentTypeEntity", "ContentType")
+ .WithMany("ContentLocales")
+ .HasForeignKey("ContentTypeId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.LanguageEntity", "Language")
+ .WithMany("ContentLocales")
+ .HasForeignKey("LanguageId")
+ .OnDelete(DeleteBehavior.Restrict);
+
+ b.Navigation("Content");
+
+ b.Navigation("ContentType");
+
+ b.Navigation("Language");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.FieldDefinitionEntity", b =>
+ {
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentTypeEntity", "ContentType")
+ .WithMany("Fields")
+ .HasForeignKey("ContentTypeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.FieldTypeEntity", "FieldType")
+ .WithMany("FieldDefinitions")
+ .HasForeignKey("FieldTypeId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.Navigation("ContentType");
+
+ b.Navigation("FieldType");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.FieldIndexEntity", b =>
+ {
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentEntity", "Content")
+ .WithMany("FieldIndex")
+ .HasForeignKey("ContentId")
+ .OnDelete(DeleteBehavior.NoAction)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentLocaleEntity", "ContentLocale")
+ .WithMany("FieldIndex")
+ .HasForeignKey("ContentLocaleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentTypeEntity", "ContentType")
+ .WithMany("FieldIndex")
+ .HasForeignKey("ContentTypeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.FieldDefinitionEntity", "FieldDefinition")
+ .WithMany("FieldIndex")
+ .HasForeignKey("FieldDefinitionId")
+ .OnDelete(DeleteBehavior.NoAction)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.FieldTypeEntity", "FieldType")
+ .WithMany("FieldIndex")
+ .HasForeignKey("FieldTypeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.LanguageEntity", "Language")
+ .WithMany("FieldIndex")
+ .HasForeignKey("LanguageId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.Navigation("Content");
+
+ b.Navigation("ContentLocale");
+
+ b.Navigation("ContentType");
+
+ b.Navigation("FieldDefinition");
+
+ b.Navigation("FieldType");
+
+ b.Navigation("Language");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.PublishedContentEntity", b =>
+ {
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentEntity", "Content")
+ .WithMany("PublishedContents")
+ .HasForeignKey("ContentId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentLocaleEntity", "ContentLocale")
+ .WithOne("PublishedContent")
+ .HasForeignKey("Logitar.Cms.Infrastructure.Entities.PublishedContentEntity", "ContentLocaleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentTypeEntity", "ContentType")
+ .WithMany("PublishedContents")
+ .HasForeignKey("ContentTypeId")
+ .OnDelete(DeleteBehavior.Restrict)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.LanguageEntity", "Language")
+ .WithMany("PublishedContents")
+ .HasForeignKey("LanguageId")
+ .OnDelete(DeleteBehavior.Restrict);
+
+ b.Navigation("Content");
+
+ b.Navigation("ContentLocale");
+
+ b.Navigation("ContentType");
+
+ b.Navigation("Language");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.UniqueIndexEntity", b =>
+ {
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentEntity", "Content")
+ .WithMany("UniqueIndex")
+ .HasForeignKey("ContentId")
+ .OnDelete(DeleteBehavior.NoAction)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentLocaleEntity", "ContentLocale")
+ .WithMany("UniqueIndex")
+ .HasForeignKey("ContentLocaleId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.ContentTypeEntity", "ContentType")
+ .WithMany("UniqueIndex")
+ .HasForeignKey("ContentTypeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.FieldDefinitionEntity", "FieldDefinition")
+ .WithMany("UniqueIndex")
+ .HasForeignKey("FieldDefinitionId")
+ .OnDelete(DeleteBehavior.NoAction)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.FieldTypeEntity", "FieldType")
+ .WithMany("UniqueIndex")
+ .HasForeignKey("FieldTypeId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("Logitar.Cms.Infrastructure.Entities.LanguageEntity", "Language")
+ .WithMany("UniqueIndex")
+ .HasForeignKey("LanguageId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.Navigation("Content");
+
+ b.Navigation("ContentLocale");
+
+ b.Navigation("ContentType");
+
+ b.Navigation("FieldDefinition");
+
+ b.Navigation("FieldType");
+
+ b.Navigation("Language");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.ContentEntity", b =>
+ {
+ b.Navigation("FieldIndex");
+
+ b.Navigation("Locales");
+
+ b.Navigation("PublishedContents");
+
+ b.Navigation("UniqueIndex");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.ContentLocaleEntity", b =>
+ {
+ b.Navigation("FieldIndex");
+
+ b.Navigation("PublishedContent");
+
+ b.Navigation("UniqueIndex");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.ContentTypeEntity", b =>
+ {
+ b.Navigation("ContentLocales");
+
+ b.Navigation("Contents");
+
+ b.Navigation("FieldIndex");
+
+ b.Navigation("Fields");
+
+ b.Navigation("PublishedContents");
+
+ b.Navigation("UniqueIndex");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.FieldDefinitionEntity", b =>
+ {
+ b.Navigation("FieldIndex");
+
+ b.Navigation("UniqueIndex");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.FieldTypeEntity", b =>
+ {
+ b.Navigation("FieldDefinitions");
+
+ b.Navigation("FieldIndex");
+
+ b.Navigation("UniqueIndex");
+ });
+
+ modelBuilder.Entity("Logitar.Cms.Infrastructure.Entities.LanguageEntity", b =>
+ {
+ b.Navigation("ContentLocales");
+
+ b.Navigation("FieldIndex");
+
+ b.Navigation("PublishedContents");
+
+ b.Navigation("UniqueIndex");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Migrations/20250130063448_Cms_Release_1_0_0.cs b/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Migrations/20250130063448_Cms_Release_1_0_0.cs
new file mode 100644
index 00000000..b74df592
--- /dev/null
+++ b/backend/src/Logitar.Cms.Infrastructure.PostgreSQL/Migrations/20250130063448_Cms_Release_1_0_0.cs
@@ -0,0 +1,1236 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
+
+#nullable disable
+
+namespace Logitar.Cms.Infrastructure.PostgreSQL.Migrations
+{
+ ///
+ public partial class Cms_Release_1_0_0 : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.EnsureSchema(
+ name: "Cms");
+
+ migrationBuilder.CreateTable(
+ name: "ContentTypes",
+ schema: "Cms",
+ columns: table => new
+ {
+ ContentTypeId = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ Id = table.Column(type: "uuid", nullable: false),
+ IsInvariant = table.Column(type: "boolean", nullable: false),
+ UniqueName = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ UniqueNameNormalized = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ DisplayName = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ Description = table.Column(type: "text", nullable: true),
+ FieldCount = table.Column(type: "integer", nullable: false),
+ StreamId = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ Version = table.Column(type: "bigint", nullable: false),
+ CreatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ CreatedOn = table.Column(type: "timestamp with time zone", nullable: false),
+ UpdatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ UpdatedOn = table.Column(type: "timestamp with time zone", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ContentTypes", x => x.ContentTypeId);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "FieldTypes",
+ schema: "Cms",
+ columns: table => new
+ {
+ FieldTypeId = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ Id = table.Column(type: "uuid", nullable: false),
+ UniqueName = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ UniqueNameNormalized = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ DisplayName = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ Description = table.Column(type: "text", nullable: true),
+ DataType = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ Settings = table.Column(type: "text", nullable: true),
+ StreamId = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ Version = table.Column(type: "bigint", nullable: false),
+ CreatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ CreatedOn = table.Column(type: "timestamp with time zone", nullable: false),
+ UpdatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ UpdatedOn = table.Column(type: "timestamp with time zone", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_FieldTypes", x => x.FieldTypeId);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Languages",
+ schema: "Cms",
+ columns: table => new
+ {
+ LanguageId = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ Id = table.Column(type: "uuid", nullable: false),
+ IsDefault = table.Column(type: "boolean", nullable: false),
+ LCID = table.Column(type: "integer", nullable: false),
+ Code = table.Column(type: "character varying(16)", maxLength: 16, nullable: false),
+ CodeNormalized = table.Column(type: "character varying(16)", maxLength: 16, nullable: false),
+ DisplayName = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ EnglishName = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ NativeName = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ StreamId = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ Version = table.Column(type: "bigint", nullable: false),
+ CreatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ CreatedOn = table.Column(type: "timestamp with time zone", nullable: false),
+ UpdatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ UpdatedOn = table.Column(type: "timestamp with time zone", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Languages", x => x.LanguageId);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Contents",
+ schema: "Cms",
+ columns: table => new
+ {
+ ContentId = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ Id = table.Column(type: "uuid", nullable: false),
+ ContentTypeId = table.Column(type: "integer", nullable: false),
+ StreamId = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ Version = table.Column(type: "bigint", nullable: false),
+ CreatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ CreatedOn = table.Column(type: "timestamp with time zone", nullable: false),
+ UpdatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ UpdatedOn = table.Column(type: "timestamp with time zone", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Contents", x => x.ContentId);
+ table.ForeignKey(
+ name: "FK_Contents_ContentTypes_ContentTypeId",
+ column: x => x.ContentTypeId,
+ principalSchema: "Cms",
+ principalTable: "ContentTypes",
+ principalColumn: "ContentTypeId",
+ onDelete: ReferentialAction.Restrict);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "FieldDefinitions",
+ schema: "Cms",
+ columns: table => new
+ {
+ FieldDefinitionId = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ ContentTypeId = table.Column(type: "integer", nullable: false),
+ Id = table.Column(type: "uuid", nullable: false),
+ Order = table.Column(type: "integer", nullable: false),
+ FieldTypeId = table.Column(type: "integer", nullable: false),
+ IsInvariant = table.Column(type: "boolean", nullable: false),
+ IsRequired = table.Column(type: "boolean", nullable: false),
+ IsIndexed = table.Column(type: "boolean", nullable: false),
+ IsUnique = table.Column(type: "boolean", nullable: false),
+ UniqueName = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ UniqueNameNormalized = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ DisplayName = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ Description = table.Column(type: "text", nullable: true),
+ Placeholder = table.Column(type: "character varying(255)", maxLength: 255, nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_FieldDefinitions", x => x.FieldDefinitionId);
+ table.ForeignKey(
+ name: "FK_FieldDefinitions_ContentTypes_ContentTypeId",
+ column: x => x.ContentTypeId,
+ principalSchema: "Cms",
+ principalTable: "ContentTypes",
+ principalColumn: "ContentTypeId",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_FieldDefinitions_FieldTypes_FieldTypeId",
+ column: x => x.FieldTypeId,
+ principalSchema: "Cms",
+ principalTable: "FieldTypes",
+ principalColumn: "FieldTypeId",
+ onDelete: ReferentialAction.Restrict);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "ContentLocales",
+ schema: "Cms",
+ columns: table => new
+ {
+ ContentLocaleId = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ ContentTypeId = table.Column(type: "integer", nullable: false),
+ ContentId = table.Column(type: "integer", nullable: false),
+ LanguageId = table.Column(type: "integer", nullable: true),
+ UniqueName = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ UniqueNameNormalized = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ DisplayName = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ Description = table.Column(type: "text", nullable: true),
+ FieldValues = table.Column(type: "text", nullable: true),
+ Revision = table.Column(type: "bigint", nullable: false),
+ CreatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ CreatedOn = table.Column(type: "timestamp with time zone", nullable: false),
+ UpdatedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ UpdatedOn = table.Column(type: "timestamp with time zone", nullable: false),
+ IsPublished = table.Column(type: "boolean", nullable: false),
+ PublishedRevision = table.Column(type: "bigint", nullable: true),
+ PublishedBy = table.Column(type: "character varying(255)", maxLength: 255, nullable: true),
+ PublishedOn = table.Column(type: "timestamp with time zone", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ContentLocales", x => x.ContentLocaleId);
+ table.ForeignKey(
+ name: "FK_ContentLocales_ContentTypes_ContentTypeId",
+ column: x => x.ContentTypeId,
+ principalSchema: "Cms",
+ principalTable: "ContentTypes",
+ principalColumn: "ContentTypeId",
+ onDelete: ReferentialAction.Restrict);
+ table.ForeignKey(
+ name: "FK_ContentLocales_Contents_ContentId",
+ column: x => x.ContentId,
+ principalSchema: "Cms",
+ principalTable: "Contents",
+ principalColumn: "ContentId",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_ContentLocales_Languages_LanguageId",
+ column: x => x.LanguageId,
+ principalSchema: "Cms",
+ principalTable: "Languages",
+ principalColumn: "LanguageId",
+ onDelete: ReferentialAction.Restrict);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "FieldIndex",
+ schema: "Cms",
+ columns: table => new
+ {
+ FieldIndexId = table.Column(type: "integer", nullable: false)
+ .Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
+ ContentTypeId = table.Column(type: "integer", nullable: false),
+ ContentTypeUid = table.Column(type: "uuid", nullable: false),
+ ContentTypeName = table.Column(type: "character varying(255)", maxLength: 255, nullable: false),
+ LanguageId = table.Column(type: "integer", nullable: true),
+ LanguageUid = table.Column(type: "uuid", nullable: true),
+ LanguageCode = table.Column(type: "character varying(16)", maxLength: 16, nullable: true),
+ LanguageIsDefault = table.Column(type: "boolean", nullable: false),
+ FieldTypeId = table.Column(type: "integer", nullable: false),
+ FieldTypeUid = table.Column