From a9bc03fb01b5d1ac41bf5592f384d22df5425aa4 Mon Sep 17 00:00:00 2001 From: Melodi <62381002+Melodi17@users.noreply.github.com> Date: Sun, 6 Sep 2026 09:02:31 +1000 Subject: feat: vcs and secret management support --- .../Migrations/20260905102259_AddSecretModel.cs | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/marlin.web/Migrations/20260905102259_AddSecretModel.cs (limited to 'src/marlin.web/Migrations/20260905102259_AddSecretModel.cs') diff --git a/src/marlin.web/Migrations/20260905102259_AddSecretModel.cs b/src/marlin.web/Migrations/20260905102259_AddSecretModel.cs new file mode 100644 index 0000000..8b09e89 --- /dev/null +++ b/src/marlin.web/Migrations/20260905102259_AddSecretModel.cs @@ -0,0 +1,59 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace marlin.web.Migrations +{ + /// + public partial class AddSecretModel : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "access_secret_id", + table: "sources", + type: "uuid", + nullable: true); + + migrationBuilder.CreateTable( + name: "secrets", + columns: table => new + { + id = table.Column(type: "uuid", nullable: false), + source_id = table.Column(type: "uuid", nullable: false), + may_reveal = table.Column(type: "boolean", nullable: false), + kind = table.Column(type: "text", nullable: true), + label = table.Column(type: "text", nullable: false), + content = table.Column(type: "text", nullable: false) + }, + constraints: table => + { + table.PrimaryKey("pk_secrets", x => x.id); + table.ForeignKey( + name: "fk_secrets_sources_source_id", + column: x => x.source_id, + principalTable: "sources", + principalColumn: "id", + onDelete: ReferentialAction.Cascade); + }); + + migrationBuilder.CreateIndex( + name: "ix_secrets_source_id", + table: "secrets", + column: "source_id"); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "secrets"); + + migrationBuilder.DropColumn( + name: "access_secret_id", + table: "sources"); + } + } +} -- cgit v1.3.1