1
0
mirror of https://github.com/bitwarden/server synced 2026-01-03 17:14:00 +00:00

[SM-1591] Adding SecretVersion table to server (#6406)

* Adding SecretVersion table to server

* making the names singular not plural for new table

* removing migration

* fixing migration

* Adding indexes for serviceacct and orguserId

* indexes for sqllite

* fixing migrations

* adding indexes to secretVeriosn.sql

* tests

* removing tests

* adding GO
This commit is contained in:
cd-bitwarden
2025-10-16 15:35:14 -04:00
committed by GitHub
parent 449603d180
commit 2965b499e9
16 changed files with 10640 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#nullable enable
using Bit.Core.Entities;
using Bit.Core.Utilities;
namespace Bit.Core.SecretsManager.Entities;
public class SecretVersion : ITableObject<Guid>
{
public Guid Id { get; set; }
public Guid SecretId { get; set; }
public string Value { get; set; } = string.Empty;
public DateTime VersionDate { get; set; }
public Guid? EditorServiceAccountId { get; set; }
public Guid? EditorOrganizationUserId { get; set; }
public void SetNewId()
{
if (Id == default(Guid))
{
Id = CoreHelpers.GenerateComb();
}
}
}