summaryrefslogtreecommitdiff
path: root/src/marlin.web/Migrations/ApplicationDbContextModelSnapshot.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/marlin.web/Migrations/ApplicationDbContextModelSnapshot.cs')
-rw-r--r--src/marlin.web/Migrations/ApplicationDbContextModelSnapshot.cs204
1 files changed, 144 insertions, 60 deletions
diff --git a/src/marlin.web/Migrations/ApplicationDbContextModelSnapshot.cs b/src/marlin.web/Migrations/ApplicationDbContextModelSnapshot.cs
index 8de35de..411706b 100644
--- a/src/marlin.web/Migrations/ApplicationDbContextModelSnapshot.cs
+++ b/src/marlin.web/Migrations/ApplicationDbContextModelSnapshot.cs
@@ -22,13 +22,18 @@ namespace marlin.web.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
- modelBuilder.Entity("marlin.core.models.Agent", b =>
+ modelBuilder.Entity("marlin.web.Models.Agent", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
+ b.Property<string>("AuthToken")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("auth_token");
+
b.Property<string>("Capabilities")
.IsRequired()
.HasColumnType("text")
@@ -53,7 +58,7 @@ namespace marlin.web.Migrations
b.ToTable("agents", (string)null);
});
- modelBuilder.Entity("marlin.core.models.Job", b =>
+ modelBuilder.Entity("marlin.web.Models.Job", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -64,10 +69,17 @@ namespace marlin.web.Migrations
.HasColumnType("uuid")
.HasColumnName("agent_id");
- b.Property<string>("Commit")
- .IsRequired()
+ b.Property<Guid>("BranchId")
+ .HasColumnType("uuid")
+ .HasColumnName("branch_id");
+
+ b.Property<string>("ClaimToken")
.HasColumnType("text")
- .HasColumnName("commit");
+ .HasColumnName("claim_token");
+
+ b.Property<Guid>("CommitId")
+ .HasColumnType("uuid")
+ .HasColumnName("commit_id");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone")
@@ -83,11 +95,6 @@ namespace marlin.web.Migrations
.HasColumnType("text")
.HasColumnName("recipe");
- b.Property<string>("Ref")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("ref");
-
b.Property<Guid>("SourceId")
.HasColumnType("uuid")
.HasColumnName("source_id");
@@ -102,13 +109,19 @@ namespace marlin.web.Migrations
b.HasIndex("AgentId")
.HasDatabaseName("ix_jobs_agent_id");
+ b.HasIndex("BranchId")
+ .HasDatabaseName("ix_jobs_branch_id");
+
+ b.HasIndex("CommitId")
+ .HasDatabaseName("ix_jobs_commit_id");
+
b.HasIndex("SourceId")
.HasDatabaseName("ix_jobs_source_id");
b.ToTable("jobs", (string)null);
});
- modelBuilder.Entity("marlin.core.models.JobStatusUpdate", b =>
+ modelBuilder.Entity("marlin.web.Models.JobStatusUpdate", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -136,7 +149,45 @@ namespace marlin.web.Migrations
b.ToTable("job_status_update", (string)null);
});
- modelBuilder.Entity("marlin.core.models.VersionControlSource", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlSecret", b =>
+ {
+ b.Property<Guid>("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uuid")
+ .HasColumnName("id");
+
+ b.Property<string>("Content")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("content");
+
+ b.Property<string>("Kind")
+ .HasColumnType("text")
+ .HasColumnName("kind");
+
+ b.Property<string>("Label")
+ .IsRequired()
+ .HasColumnType("text")
+ .HasColumnName("label");
+
+ b.Property<bool>("MayReveal")
+ .HasColumnType("boolean")
+ .HasColumnName("may_reveal");
+
+ b.Property<Guid>("SourceId")
+ .HasColumnType("uuid")
+ .HasColumnName("source_id");
+
+ b.HasKey("Id")
+ .HasName("pk_secrets");
+
+ b.HasIndex("SourceId")
+ .HasDatabaseName("ix_secrets_source_id");
+
+ b.ToTable("secrets", (string)null);
+ });
+
+ modelBuilder.Entity("marlin.web.Models.VersionControlSource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -172,7 +223,7 @@ namespace marlin.web.Migrations
b.ToTable("sources", (string)null);
});
- modelBuilder.Entity("marlin.core.models.VersionControlledBlob", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlledBlob", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -209,7 +260,7 @@ namespace marlin.web.Migrations
b.ToTable("source_blobs", (string)null);
});
- modelBuilder.Entity("marlin.core.models.VersionControlledBranch", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlledBranch", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -241,7 +292,7 @@ namespace marlin.web.Migrations
b.ToTable("source_branches", (string)null);
});
- modelBuilder.Entity("marlin.core.models.VersionControlledCommit", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlledCommit", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
@@ -261,6 +312,10 @@ namespace marlin.web.Migrations
.HasColumnType("uuid")
.HasColumnName("source_id");
+ b.Property<bool>("WorkflowScanned")
+ .HasColumnType("boolean")
+ .HasColumnName("workflow_scanned");
+
b.HasKey("Id")
.HasName("pk_source_commits");
@@ -270,52 +325,58 @@ namespace marlin.web.Migrations
b.ToTable("source_commits", (string)null);
});
- modelBuilder.Entity("marlin.web.Models.VersionControlSecret", b =>
+ modelBuilder.Entity("marlin.web.Models.WorkflowSnapshot", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid")
.HasColumnName("id");
- b.Property<string>("Content")
- .IsRequired()
- .HasColumnType("text")
- .HasColumnName("content");
+ b.Property<Guid>("CommitId")
+ .HasColumnType("uuid")
+ .HasColumnName("commit_id");
- b.Property<string>("Kind")
- .HasColumnType("text")
- .HasColumnName("kind");
+ b.Property<DateTime>("ScannedAt")
+ .HasColumnType("timestamp with time zone")
+ .HasColumnName("scanned_at");
- b.Property<string>("Label")
+ b.Property<string>("Workflow")
.IsRequired()
.HasColumnType("text")
- .HasColumnName("label");
-
- b.Property<bool>("MayReveal")
- .HasColumnType("boolean")
- .HasColumnName("may_reveal");
-
- b.Property<Guid>("SourceId")
- .HasColumnType("uuid")
- .HasColumnName("source_id");
+ .HasColumnName("workflow");
b.HasKey("Id")
- .HasName("pk_secrets");
+ .HasName("pk_workflow_snapshots");
- b.HasIndex("SourceId")
- .HasDatabaseName("ix_secrets_source_id");
+ b.HasIndex("CommitId")
+ .IsUnique()
+ .HasDatabaseName("ix_workflow_snapshots_commit_id");
- b.ToTable("secrets", (string)null);
+ b.ToTable("workflow_snapshots", (string)null);
});
- modelBuilder.Entity("marlin.core.models.Job", b =>
+ modelBuilder.Entity("marlin.web.Models.Job", b =>
{
- b.HasOne("marlin.core.models.Agent", "Agent")
- .WithMany()
+ b.HasOne("marlin.web.Models.Agent", "Agent")
+ .WithMany("Jobs")
.HasForeignKey("AgentId")
.HasConstraintName("fk_jobs_agents_agent_id");
- b.HasOne("marlin.core.models.VersionControlSource", "Source")
+ b.HasOne("marlin.web.Models.VersionControlledBranch", "Branch")
+ .WithMany()
+ .HasForeignKey("BranchId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_jobs_source_branches_branch_id");
+
+ b.HasOne("marlin.web.Models.VersionControlledCommit", "Commit")
+ .WithMany()
+ .HasForeignKey("CommitId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_jobs_source_commits_commit_id");
+
+ b.HasOne("marlin.web.Models.VersionControlSource", "Source")
.WithMany()
.HasForeignKey("SourceId")
.OnDelete(DeleteBehavior.Cascade)
@@ -324,12 +385,16 @@ namespace marlin.web.Migrations
b.Navigation("Agent");
+ b.Navigation("Branch");
+
+ b.Navigation("Commit");
+
b.Navigation("Source");
});
- modelBuilder.Entity("marlin.core.models.JobStatusUpdate", b =>
+ modelBuilder.Entity("marlin.web.Models.JobStatusUpdate", b =>
{
- b.HasOne("marlin.core.models.Job", "Job")
+ b.HasOne("marlin.web.Models.Job", "Job")
.WithMany("StatusUpdates")
.HasForeignKey("JobId")
.OnDelete(DeleteBehavior.Cascade)
@@ -339,16 +404,28 @@ namespace marlin.web.Migrations
b.Navigation("Job");
});
- modelBuilder.Entity("marlin.core.models.VersionControlledBlob", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlSecret", b =>
{
- b.HasOne("marlin.core.models.VersionControlledCommit", "Commit")
+ b.HasOne("marlin.web.Models.VersionControlSource", "Source")
+ .WithMany()
+ .HasForeignKey("SourceId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired()
+ .HasConstraintName("fk_secrets_sources_source_id");
+
+ b.Navigation("Source");
+ });
+
+ modelBuilder.Entity("marlin.web.Models.VersionControlledBlob", b =>
+ {
+ b.HasOne("marlin.web.Models.VersionControlledCommit", "Commit")
.WithMany("Blobs")
.HasForeignKey("CommitId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_source_blobs_source_commits_commit_id");
- b.HasOne("marlin.core.models.VersionControlSource", "Source")
+ b.HasOne("marlin.web.Models.VersionControlSource", "Source")
.WithMany()
.HasForeignKey("SourceId")
.OnDelete(DeleteBehavior.Cascade)
@@ -360,16 +437,16 @@ namespace marlin.web.Migrations
b.Navigation("Source");
});
- modelBuilder.Entity("marlin.core.models.VersionControlledBranch", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlledBranch", b =>
{
- b.HasOne("marlin.core.models.VersionControlledCommit", "Commit")
+ b.HasOne("marlin.web.Models.VersionControlledCommit", "Commit")
.WithMany("Branches")
.HasForeignKey("CommitId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
.HasConstraintName("fk_source_branches_source_commits_commit_id");
- b.HasOne("marlin.core.models.VersionControlSource", "Source")
+ b.HasOne("marlin.web.Models.VersionControlSource", "Source")
.WithMany("Branches")
.HasForeignKey("SourceId")
.OnDelete(DeleteBehavior.Cascade)
@@ -381,9 +458,9 @@ namespace marlin.web.Migrations
b.Navigation("Source");
});
- modelBuilder.Entity("marlin.core.models.VersionControlledCommit", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlledCommit", b =>
{
- b.HasOne("marlin.core.models.VersionControlSource", "Source")
+ b.HasOne("marlin.web.Models.VersionControlSource", "Source")
.WithMany()
.HasForeignKey("SourceId")
.OnDelete(DeleteBehavior.Cascade)
@@ -393,33 +470,40 @@ namespace marlin.web.Migrations
b.Navigation("Source");
});
- modelBuilder.Entity("marlin.web.Models.VersionControlSecret", b =>
+ modelBuilder.Entity("marlin.web.Models.WorkflowSnapshot", b =>
{
- b.HasOne("marlin.core.models.VersionControlSource", "Source")
- .WithMany()
- .HasForeignKey("SourceId")
+ b.HasOne("marlin.web.Models.VersionControlledCommit", "Commit")
+ .WithOne("WorkflowSnapshot")
+ .HasForeignKey("marlin.web.Models.WorkflowSnapshot", "CommitId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired()
- .HasConstraintName("fk_secrets_sources_source_id");
+ .HasConstraintName("fk_workflow_snapshots_source_commits_commit_id");
- b.Navigation("Source");
+ b.Navigation("Commit");
});
- modelBuilder.Entity("marlin.core.models.Job", b =>
+ modelBuilder.Entity("marlin.web.Models.Agent", b =>
+ {
+ b.Navigation("Jobs");
+ });
+
+ modelBuilder.Entity("marlin.web.Models.Job", b =>
{
b.Navigation("StatusUpdates");
});
- modelBuilder.Entity("marlin.core.models.VersionControlSource", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlSource", b =>
{
b.Navigation("Branches");
});
- modelBuilder.Entity("marlin.core.models.VersionControlledCommit", b =>
+ modelBuilder.Entity("marlin.web.Models.VersionControlledCommit", b =>
{
b.Navigation("Blobs");
b.Navigation("Branches");
+
+ b.Navigation("WorkflowSnapshot");
});
#pragma warning restore 612, 618
}