summaryrefslogtreecommitdiff
path: root/src/marlin.web/Migrations/20260908142748_CommitAlt.cs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-09-13 13:22:20 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-09-13 13:22:20 +1000
commitdf0737e55afeb5c01eb39909605970d1d3a73ffc (patch)
tree09823eaa310c60eefd2420dc305acae45c81900f /src/marlin.web/Migrations/20260908142748_CommitAlt.cs
parentee69ce25b2fba871920260028bb10c2d6b62b26f (diff)
refactor: cleanup; feat: connection to agent
Diffstat (limited to 'src/marlin.web/Migrations/20260908142748_CommitAlt.cs')
-rw-r--r--src/marlin.web/Migrations/20260908142748_CommitAlt.cs115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/marlin.web/Migrations/20260908142748_CommitAlt.cs b/src/marlin.web/Migrations/20260908142748_CommitAlt.cs
new file mode 100644
index 0000000..b607d31
--- /dev/null
+++ b/src/marlin.web/Migrations/20260908142748_CommitAlt.cs
@@ -0,0 +1,115 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace marlin.web.Migrations
+{
+ /// <inheritdoc />
+ public partial class CommitAlt : Migration
+ {
+ /// <inheritdoc />
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "commit",
+ table: "jobs");
+
+ migrationBuilder.DropColumn(
+ name: "ref",
+ table: "jobs");
+
+ migrationBuilder.AddColumn<Guid>(
+ name: "branch_id",
+ table: "jobs",
+ type: "uuid",
+ nullable: false,
+ defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
+
+ migrationBuilder.AddColumn<string>(
+ name: "claim_token",
+ table: "jobs",
+ type: "text",
+ nullable: true);
+
+ migrationBuilder.AddColumn<Guid>(
+ name: "commit_id",
+ table: "jobs",
+ type: "uuid",
+ nullable: false,
+ defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
+
+ migrationBuilder.CreateIndex(
+ name: "ix_jobs_branch_id",
+ table: "jobs",
+ column: "branch_id");
+
+ migrationBuilder.CreateIndex(
+ name: "ix_jobs_commit_id",
+ table: "jobs",
+ column: "commit_id");
+
+ migrationBuilder.AddForeignKey(
+ name: "fk_jobs_source_branches_branch_id",
+ table: "jobs",
+ column: "branch_id",
+ principalTable: "source_branches",
+ principalColumn: "id",
+ onDelete: ReferentialAction.Cascade);
+
+ migrationBuilder.AddForeignKey(
+ name: "fk_jobs_source_commits_commit_id",
+ table: "jobs",
+ column: "commit_id",
+ principalTable: "source_commits",
+ principalColumn: "id",
+ onDelete: ReferentialAction.Cascade);
+ }
+
+ /// <inheritdoc />
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "fk_jobs_source_branches_branch_id",
+ table: "jobs");
+
+ migrationBuilder.DropForeignKey(
+ name: "fk_jobs_source_commits_commit_id",
+ table: "jobs");
+
+ migrationBuilder.DropIndex(
+ name: "ix_jobs_branch_id",
+ table: "jobs");
+
+ migrationBuilder.DropIndex(
+ name: "ix_jobs_commit_id",
+ table: "jobs");
+
+ migrationBuilder.DropColumn(
+ name: "branch_id",
+ table: "jobs");
+
+ migrationBuilder.DropColumn(
+ name: "claim_token",
+ table: "jobs");
+
+ migrationBuilder.DropColumn(
+ name: "commit_id",
+ table: "jobs");
+
+ migrationBuilder.AddColumn<string>(
+ name: "commit",
+ table: "jobs",
+ type: "text",
+ nullable: false,
+ defaultValue: "");
+
+ migrationBuilder.AddColumn<string>(
+ name: "ref",
+ table: "jobs",
+ type: "text",
+ nullable: false,
+ defaultValue: "");
+ }
+ }
+}