From df0737e55afeb5c01eb39909605970d1d3a73ffc Mon Sep 17 00:00:00 2001
From: Melodi <62381002+Melodi17@users.noreply.github.com>
Date: Sun, 13 Sep 2026 13:22:20 +1000
Subject: refactor: cleanup; feat: connection to agent
---
.../20260906003038_AddWorkflowSnapshot.cs | 59 ++++++++++++++++++++++
1 file changed, 59 insertions(+)
create mode 100644 src/marlin.web/Migrations/20260906003038_AddWorkflowSnapshot.cs
(limited to 'src/marlin.web/Migrations/20260906003038_AddWorkflowSnapshot.cs')
diff --git a/src/marlin.web/Migrations/20260906003038_AddWorkflowSnapshot.cs b/src/marlin.web/Migrations/20260906003038_AddWorkflowSnapshot.cs
new file mode 100644
index 0000000..d47ee9e
--- /dev/null
+++ b/src/marlin.web/Migrations/20260906003038_AddWorkflowSnapshot.cs
@@ -0,0 +1,59 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace marlin.web.Migrations
+{
+ ///
+ public partial class AddWorkflowSnapshot : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "workflow_scanned",
+ table: "source_commits",
+ type: "boolean",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.CreateTable(
+ name: "workflow_snapshots",
+ columns: table => new
+ {
+ id = table.Column(type: "uuid", nullable: false),
+ commit_id = table.Column(type: "uuid", nullable: false),
+ scanned_at = table.Column(type: "timestamp with time zone", nullable: false),
+ workflow = table.Column(type: "text", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("pk_workflow_snapshots", x => x.id);
+ table.ForeignKey(
+ name: "fk_workflow_snapshots_source_commits_commit_id",
+ column: x => x.commit_id,
+ principalTable: "source_commits",
+ principalColumn: "id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "ix_workflow_snapshots_commit_id",
+ table: "workflow_snapshots",
+ column: "commit_id",
+ unique: true);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "workflow_snapshots");
+
+ migrationBuilder.DropColumn(
+ name: "workflow_scanned",
+ table: "source_commits");
+ }
+ }
+}
--
cgit v1.3.1