database and gitsync issues fixed

This commit is contained in:
Nils Blomgren
2026-06-07 14:54:16 +02:00
parent 8dc46ef031
commit 76b7e55931
72 changed files with 31067 additions and 1508 deletions

View File

@@ -777,6 +777,70 @@ namespace EntKube.Web.Data.Migrations.Sqlite
b.ToTable("CustomerAccesses");
});
modelBuilder.Entity("EntKube.Web.Data.CustomerGitCredential", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("AuthType")
.IsRequired()
.HasMaxLength(20)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<Guid>("CustomerId")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200)
.HasColumnType("TEXT");
b.Property<Guid>("TenantId")
.HasColumnType("TEXT");
b.Property<string>("Username")
.HasMaxLength(300)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("TenantId");
b.HasIndex("CustomerId", "Name")
.IsUnique();
b.ToTable("CustomerGitCredentials");
});
modelBuilder.Entity("EntKube.Web.Data.CustomerGitRepoPolicy", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<Guid>("CustomerId")
.HasColumnType("TEXT");
b.Property<string>("UrlPattern")
.IsRequired()
.HasMaxLength(2000)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("CustomerId", "UrlPattern")
.IsUnique();
b.ToTable("CustomerGitRepoPolicies");
});
modelBuilder.Entity("EntKube.Web.Data.DatabaseBinding", b =>
{
b.Property<Guid>("Id")
@@ -1208,6 +1272,9 @@ namespace EntKube.Web.Data.Migrations.Sqlite
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<Guid?>("CustomerGitCredentialId")
.HasColumnType("TEXT");
b.Property<string>("DefaultBranch")
.IsRequired()
.ValueGeneratedOnAdd()
@@ -1234,6 +1301,8 @@ namespace EntKube.Web.Data.Migrations.Sqlite
b.HasKey("Id");
b.HasIndex("CustomerGitCredentialId");
b.HasIndex("TenantId", "Name")
.IsUnique();
@@ -2545,6 +2614,9 @@ namespace EntKube.Web.Data.Migrations.Sqlite
b.Property<DateTime>("CreatedAt")
.HasColumnType("TEXT");
b.Property<Guid?>("CustomerGitCredentialId")
.HasColumnType("TEXT");
b.Property<byte[]>("EncryptedValue")
.IsRequired()
.HasColumnType("BLOB");
@@ -2615,6 +2687,8 @@ namespace EntKube.Web.Data.Migrations.Sqlite
b.HasIndex("ComponentId");
b.HasIndex("CustomerGitCredentialId");
b.HasIndex("GitRepositoryId");
b.HasIndex("KubernetesClusterId");
@@ -3183,6 +3257,36 @@ namespace EntKube.Web.Data.Migrations.Sqlite
b.Navigation("User");
});
modelBuilder.Entity("EntKube.Web.Data.CustomerGitCredential", b =>
{
b.HasOne("EntKube.Web.Data.Customer", "Customer")
.WithMany("GitCredentials")
.HasForeignKey("CustomerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Customer");
b.Navigation("Tenant");
});
modelBuilder.Entity("EntKube.Web.Data.CustomerGitRepoPolicy", b =>
{
b.HasOne("EntKube.Web.Data.Customer", "Customer")
.WithMany("GitRepoPolicies")
.HasForeignKey("CustomerId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Customer");
});
modelBuilder.Entity("EntKube.Web.Data.DatabaseBinding", b =>
{
b.HasOne("EntKube.Web.Data.AppDeployment", "AppDeployment")
@@ -3330,12 +3434,19 @@ namespace EntKube.Web.Data.Migrations.Sqlite
modelBuilder.Entity("EntKube.Web.Data.GitRepository", b =>
{
b.HasOne("EntKube.Web.Data.CustomerGitCredential", "CustomerGitCredential")
.WithMany()
.HasForeignKey("CustomerGitCredentialId")
.OnDelete(DeleteBehavior.SetNull);
b.HasOne("EntKube.Web.Data.Tenant", "Tenant")
.WithMany("GitRepositories")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CustomerGitCredential");
b.Navigation("Tenant");
});
@@ -3934,6 +4045,11 @@ namespace EntKube.Web.Data.Migrations.Sqlite
.HasForeignKey("ComponentId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("EntKube.Web.Data.CustomerGitCredential", "CustomerGitCredential")
.WithMany()
.HasForeignKey("CustomerGitCredentialId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("EntKube.Web.Data.GitRepository", "GitRepository")
.WithMany()
.HasForeignKey("GitRepositoryId")
@@ -3992,6 +4108,8 @@ namespace EntKube.Web.Data.Migrations.Sqlite
b.Navigation("Component");
b.Navigation("CustomerGitCredential");
b.Navigation("GitRepository");
b.Navigation("KubernetesCluster");
@@ -4178,6 +4296,10 @@ namespace EntKube.Web.Data.Migrations.Sqlite
modelBuilder.Entity("EntKube.Web.Data.Customer", b =>
{
b.Navigation("Apps");
b.Navigation("GitCredentials");
b.Navigation("GitRepoPolicies");
});
modelBuilder.Entity("EntKube.Web.Data.DeploymentResource", b =>