// using System; using CredentialManager.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace CredentialManager.Migrations { [DbContext(typeof(CredentialDbContext))] [Migration("20250704135720_AddSourceDatabaseNameColumn")] partial class AddSourceDatabaseNameColumn { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "9.0.0"); modelBuilder.Entity("CredentialManager.Models.CredentialEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AdditionalParameters") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("CommandTimeout") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(30); b.Property("ConnectionString") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("CreatedBy") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("DatabaseName") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("DatabaseType") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("EncryptedApiKey") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("EncryptedAuthToken") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("EncryptedPassword") .HasColumnType("TEXT"); b.Property("Headers") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("Host") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("IgnoreSslErrors") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(false); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(true); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Port") .HasColumnType("INTEGER"); b.Property("RestServiceType") .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("TimeoutSeconds") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(100); b.Property("Type") .IsRequired() .HasMaxLength(50) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.Property("Username") .HasMaxLength(100) .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("DatabaseType"); b.HasIndex("IsActive"); b.HasIndex("Name") .IsUnique(); b.HasIndex("Type"); b.ToTable("Credentials", (string)null); }); modelBuilder.Entity("CredentialManager.Models.DataCouplerProfile", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("CreatedAt") .ValueGeneratedOnAdd() .HasColumnType("TEXT") .HasDefaultValueSql("CURRENT_TIMESTAMP"); b.Property("CreatedBy") .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("Description") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("DestinationCredentialId") .HasColumnType("INTEGER"); b.Property("DestinationEndpoint") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("DestinationSchema") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("DestinationTable") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("DestinationType") .IsRequired() .HasMaxLength(20) .HasColumnType("TEXT"); b.Property("FieldMappingJson") .HasMaxLength(4000) .HasColumnType("TEXT"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(true); b.Property("LastUsedAt") .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("SourceCredentialId") .HasColumnType("INTEGER"); b.Property("SourceDatabaseName") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("SourceFilePath") .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("SourceKeyField") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("SourceSchema") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("SourceTable") .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("SourceType") .IsRequired() .HasMaxLength(20) .HasColumnType("TEXT"); b.Property("UseRecordAssociations") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("CreatedAt"); b.HasIndex("DestinationCredentialId"); b.HasIndex("DestinationType"); b.HasIndex("IsActive"); b.HasIndex("LastUsedAt"); b.HasIndex("Name") .IsUnique(); b.HasIndex("SourceCredentialId"); b.HasIndex("SourceType"); b.ToTable("DataCouplerProfiles", (string)null); }); modelBuilder.Entity("CredentialManager.Models.KeyAssociation", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("AdditionalInfo") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("CreatedAt") .HasColumnType("TEXT"); b.Property("DestinationEntity") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("DestinationId") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("DestinationKeyField") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("IsActive") .ValueGeneratedOnAdd() .HasColumnType("INTEGER") .HasDefaultValue(true); b.Property("KeyValue") .IsRequired() .HasMaxLength(500) .HasColumnType("TEXT"); b.Property("LastVerifiedAt") .HasColumnType("TEXT"); b.Property("RestCredentialName") .IsRequired() .HasMaxLength(100) .HasColumnType("TEXT"); b.Property("SourceKeyField") .IsRequired() .HasMaxLength(200) .HasColumnType("TEXT"); b.Property("SourcesInfo") .HasMaxLength(2000) .HasColumnType("TEXT"); b.Property("UpdatedAt") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("CreatedAt"); b.HasIndex("DestinationEntity"); b.HasIndex("IsActive"); b.HasIndex("KeyValue") .HasDatabaseName("IX_KeyAssociations_KeyValue"); b.HasIndex("LastVerifiedAt"); b.HasIndex("RestCredentialName"); b.HasIndex("KeyValue", "DestinationEntity", "RestCredentialName") .IsUnique() .HasDatabaseName("IX_KeyAssociations_Unique"); b.ToTable("KeyAssociations", (string)null); }); modelBuilder.Entity("CredentialManager.Models.DataCouplerProfile", b => { b.HasOne("CredentialManager.Models.CredentialEntity", "DestinationCredential") .WithMany() .HasForeignKey("DestinationCredentialId") .OnDelete(DeleteBehavior.SetNull); b.HasOne("CredentialManager.Models.CredentialEntity", "SourceCredential") .WithMany() .HasForeignKey("SourceCredentialId") .OnDelete(DeleteBehavior.SetNull); b.Navigation("DestinationCredential"); b.Navigation("SourceCredential"); }); #pragma warning restore 612, 618 } } }