// <auto-generated />
using Elsa.WorkflowSettings.Persistence.EntityFramework.Core;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;

namespace Elsa.WorkflowSettings.Persistence.EntityFramework.PostgreSql.Migrations
{
    [DbContext(typeof(WorkflowSettingsContext))]
    [Migration("20210730112057_Initial")]
    partial class Initial
    {
        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasDefaultSchema("Elsa")
                .HasAnnotation("Relational:MaxIdentifierLength", 63)
                .HasAnnotation("ProductVersion", "5.0.6")
                .HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);

            modelBuilder.Entity("Elsa.WorkflowSettings.Models.WorkflowSetting", b =>
                {
                    b.Property<string>("Id")
                        .HasColumnType("text");

                    b.Property<string>("Key")
                        .HasColumnType("text");

                    b.Property<string>("Value")
                        .HasColumnType("text");

                    b.Property<string>("WorkflowBlueprintId")
                        .HasColumnType("text");

                    b.HasKey("Id");

                    b.HasIndex("Key")
                        .HasDatabaseName("IX_WorkflowSetting_Key");

                    b.HasIndex("Value")
                        .HasDatabaseName("IX_WorkflowSetting_Value");

                    b.HasIndex("WorkflowBlueprintId")
                        .HasDatabaseName("IX_WorkflowSetting_WorkflowBlueprintId");

                    b.ToTable("WorkflowSettings");
                });
#pragma warning restore 612, 618
        }
    }
}
