diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-09-06 09:02:31 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2026-09-06 09:02:31 +1000 |
| commit | a9bc03fb01b5d1ac41bf5592f384d22df5425aa4 (patch) | |
| tree | 16ae13e19d2a3cd7488202c30790d09557559d70 /src/marlin.web/Migrations/20260905102259_AddSecretModel.cs | |
| parent | c00992ffad24212c4398736efd6d707d4cb0cc0d (diff) | |
feat: vcs and secret management support
Diffstat (limited to 'src/marlin.web/Migrations/20260905102259_AddSecretModel.cs')
| -rw-r--r-- | src/marlin.web/Migrations/20260905102259_AddSecretModel.cs | 59 |
1 files changed, 59 insertions, 0 deletions
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 +{ + /// <inheritdoc /> + public partial class AddSecretModel : Migration + { + /// <inheritdoc /> + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn<Guid>( + name: "access_secret_id", + table: "sources", + type: "uuid", + nullable: true); + + migrationBuilder.CreateTable( + name: "secrets", + columns: table => new + { + id = table.Column<Guid>(type: "uuid", nullable: false), + source_id = table.Column<Guid>(type: "uuid", nullable: false), + may_reveal = table.Column<bool>(type: "boolean", nullable: false), + kind = table.Column<string>(type: "text", nullable: true), + label = table.Column<string>(type: "text", nullable: false), + content = table.Column<string>(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"); + } + + /// <inheritdoc /> + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "secrets"); + + migrationBuilder.DropColumn( + name: "access_secret_id", + table: "sources"); + } + } +} |
