mirror of
https://github.com/bitwarden/server.git
synced 2025-06-25 05:08:48 -05:00
Merge branch 'dirt/pm-20574/database_tables_and_scripts_riskinsights' into dirt/pm-20576/report-store-query-commands
This commit is contained in:
commit
5f1a9d0d95
@ -5,14 +5,13 @@ using Bit.Core.Utilities;
|
|||||||
|
|
||||||
namespace Bit.Core.Dirt.Entities;
|
namespace Bit.Core.Dirt.Entities;
|
||||||
|
|
||||||
public class OrganizationReport : ITableObject<Guid>, IRevisable
|
public class OrganizationReport : ITableObject<Guid>
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
public Guid OrganizationId { get; set; }
|
public Guid OrganizationId { get; set; }
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public string ReportData { get; set; } = string.Empty;
|
public string ReportData { get; set; } = string.Empty;
|
||||||
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
|
public DateTime CreationDate { get; set; } = DateTime.UtcNow;
|
||||||
public DateTime RevisionDate { get; set; } = DateTime.UtcNow;
|
|
||||||
|
|
||||||
public void SetNewId()
|
public void SetNewId()
|
||||||
{
|
{
|
||||||
|
@ -3,7 +3,5 @@ CREATE PROCEDURE [dbo].[OrganizationApplication_DeleteById]
|
|||||||
AS
|
AS
|
||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
DELETE FROM
|
DELETE FROM [dbo].[OrganizationApplication]
|
||||||
[dbo].[OrganizationApplication]
|
WHERE [Id] = @Id;
|
||||||
WHERE
|
|
||||||
[Id] = @Id;
|
|
||||||
|
@ -4,10 +4,6 @@ AS
|
|||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
[Id],
|
*
|
||||||
[OrganizationId],
|
|
||||||
[Applications],
|
|
||||||
[CreationDate],
|
|
||||||
[RevisionDate]
|
|
||||||
FROM [dbo].[OrganizationApplicationView]
|
FROM [dbo].[OrganizationApplicationView]
|
||||||
WHERE [Id] = @Id;
|
WHERE [Id] = @Id;
|
||||||
|
@ -4,10 +4,6 @@ AS
|
|||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
[Id],
|
*
|
||||||
[OrganizationId],
|
|
||||||
[Applications],
|
|
||||||
[CreationDate],
|
|
||||||
[RevisionDate]
|
|
||||||
FROM [dbo].[OrganizationApplicationView]
|
FROM [dbo].[OrganizationApplicationView]
|
||||||
WHERE [OrganizationId] = @OrganizationId;
|
WHERE [OrganizationId] = @OrganizationId;
|
||||||
|
@ -6,9 +6,11 @@ CREATE PROCEDURE [dbo].[OrganizationApplication_Update]
|
|||||||
@RevisionDate DATETIME2(7)
|
@RevisionDate DATETIME2(7)
|
||||||
AS
|
AS
|
||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
UPDATE [dbo].[OrganizationApplication]
|
UPDATE [dbo].[OrganizationApplication]
|
||||||
SET
|
SET
|
||||||
[OrganizationId] = @OrganizationId,
|
[OrganizationId] = @OrganizationId,
|
||||||
[Applications] = @Applications,
|
[Applications] = @Applications,
|
||||||
|
[CreationDate] = @CreationDate,
|
||||||
[RevisionDate] = @RevisionDate
|
[RevisionDate] = @RevisionDate
|
||||||
WHERE [Id] = @Id;
|
WHERE [Id] = @Id;
|
||||||
|
@ -3,8 +3,7 @@ CREATE PROCEDURE [dbo].[OrganizationReport_Create]
|
|||||||
@OrganizationId UNIQUEIDENTIFIER,
|
@OrganizationId UNIQUEIDENTIFIER,
|
||||||
@Date DATETIME2(7),
|
@Date DATETIME2(7),
|
||||||
@ReportData NVARCHAR(MAX),
|
@ReportData NVARCHAR(MAX),
|
||||||
@CreationDate DATETIME2(7),
|
@CreationDate DATETIME2(7)
|
||||||
@RevisionDate DATETIME2(7)
|
|
||||||
AS
|
AS
|
||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
@ -13,14 +12,12 @@ AS
|
|||||||
[OrganizationId],
|
[OrganizationId],
|
||||||
[Date],
|
[Date],
|
||||||
[ReportData],
|
[ReportData],
|
||||||
[CreationDate],
|
[CreationDate]
|
||||||
[RevisionDate]
|
|
||||||
)
|
)
|
||||||
VALUES (
|
VALUES (
|
||||||
@Id,
|
@Id,
|
||||||
@OrganizationId,
|
@OrganizationId,
|
||||||
@Date,
|
@Date,
|
||||||
@ReportData,
|
@ReportData,
|
||||||
@CreationDate,
|
@CreationDate
|
||||||
@RevisionDate
|
|
||||||
);
|
);
|
||||||
|
@ -4,11 +4,6 @@ AS
|
|||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
[Id],
|
*
|
||||||
[OrganizationId],
|
FROM [dbo].[OrganizationReportView]
|
||||||
[Date],
|
|
||||||
[ReportData],
|
|
||||||
[CreationDate],
|
|
||||||
[RevisionDate]
|
|
||||||
FROM [dbo].[OrganizationReport]
|
|
||||||
WHERE [Id] = @Id;
|
WHERE [Id] = @Id;
|
||||||
|
@ -4,11 +4,6 @@ AS
|
|||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
[Id],
|
*
|
||||||
[OrganizationId],
|
FROM [dbo].[OrganizationReportView]
|
||||||
[Date],
|
|
||||||
[ReportData],
|
|
||||||
[CreationDate],
|
|
||||||
[RevisionDate]
|
|
||||||
FROM [dbo].[OrganizationReport]
|
|
||||||
WHERE [OrganizationId] = @OrganizationId;
|
WHERE [OrganizationId] = @OrganizationId;
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
CREATE PROCEDURE [dbo].[OrganizationReport_Update]
|
|
||||||
@Id UNIQUEIDENTIFIER OUTPUT,
|
|
||||||
@OrganizationId UNIQUEIDENTIFIER,
|
|
||||||
@Date DATETIME2(7),
|
|
||||||
@ReportData NVARCHAR(MAX),
|
|
||||||
@CreationDate DATETIME2(7),
|
|
||||||
@RevisionDate DATETIME2(7)
|
|
||||||
AS
|
|
||||||
SET NOCOUNT ON;
|
|
||||||
|
|
||||||
UPDATE [dbo].[OrganizationReport]
|
|
||||||
SET [OrganizationId] = @OrganizationId,
|
|
||||||
[Date] = @Date,
|
|
||||||
[ReportData] = @ReportData,
|
|
||||||
[RevisionDate] = @RevisionDate
|
|
||||||
WHERE [Id] = @Id;
|
|
@ -4,7 +4,6 @@ CREATE TABLE [dbo].[OrganizationReport] (
|
|||||||
[Date] DATETIME2 (7) NOT NULL,
|
[Date] DATETIME2 (7) NOT NULL,
|
||||||
[ReportData] NVARCHAR(MAX) NOT NULL,
|
[ReportData] NVARCHAR(MAX) NOT NULL,
|
||||||
[CreationDate] DATETIME2 (7) NOT NULL,
|
[CreationDate] DATETIME2 (7) NOT NULL,
|
||||||
[RevisionDate] DATETIME2 (7) NOT NULL,
|
|
||||||
CONSTRAINT [PK_OrganizationReport] PRIMARY KEY CLUSTERED ([Id] ASC),
|
CONSTRAINT [PK_OrganizationReport] PRIMARY KEY CLUSTERED ([Id] ASC),
|
||||||
CONSTRAINT [FK_OrganizationReport_Organization] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization] ([Id])
|
CONSTRAINT [FK_OrganizationReport_Organization] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization] ([Id])
|
||||||
);
|
);
|
||||||
|
@ -7,7 +7,6 @@ BEGIN
|
|||||||
[Date] DATETIME2 (7) NOT NULL,
|
[Date] DATETIME2 (7) NOT NULL,
|
||||||
[ReportData] NVARCHAR(MAX) NOT NULL,
|
[ReportData] NVARCHAR(MAX) NOT NULL,
|
||||||
[CreationDate] DATETIME2 (7) NOT NULL,
|
[CreationDate] DATETIME2 (7) NOT NULL,
|
||||||
[RevisionDate] DATETIME2 (7) NOT NULL,
|
|
||||||
CONSTRAINT [PK_OrganizationReport] PRIMARY KEY CLUSTERED ([Id] ASC),
|
CONSTRAINT [PK_OrganizationReport] PRIMARY KEY CLUSTERED ([Id] ASC),
|
||||||
CONSTRAINT [FK_OrganizationReport_Organization] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization] ([Id])
|
CONSTRAINT [FK_OrganizationReport_Organization] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization] ([Id])
|
||||||
);
|
);
|
||||||
@ -32,8 +31,7 @@ CREATE PROCEDURE [dbo].[OrganizationReport_Create]
|
|||||||
@OrganizationId UNIQUEIDENTIFIER,
|
@OrganizationId UNIQUEIDENTIFIER,
|
||||||
@Date DATETIME2(7),
|
@Date DATETIME2(7),
|
||||||
@ReportData NVARCHAR(MAX),
|
@ReportData NVARCHAR(MAX),
|
||||||
@CreationDate DATETIME2(7),
|
@CreationDate DATETIME2(7)
|
||||||
@RevisionDate DATETIME2(7)
|
|
||||||
AS
|
AS
|
||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
@ -42,16 +40,14 @@ AS
|
|||||||
[OrganizationId],
|
[OrganizationId],
|
||||||
[Date],
|
[Date],
|
||||||
[ReportData],
|
[ReportData],
|
||||||
[CreationDate],
|
[CreationDate]
|
||||||
[RevisionDate]
|
|
||||||
)
|
)
|
||||||
VALUES (
|
VALUES (
|
||||||
@Id,
|
@Id,
|
||||||
@OrganizationId,
|
@OrganizationId,
|
||||||
@Date,
|
@Date,
|
||||||
@ReportData,
|
@ReportData,
|
||||||
@CreationDate,
|
@CreationDate
|
||||||
@RevisionDate
|
|
||||||
);
|
);
|
||||||
GO
|
GO
|
||||||
|
|
||||||
@ -71,13 +67,8 @@ AS
|
|||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
[Id],
|
*
|
||||||
[OrganizationId],
|
FROM [dbo].[OrganizationReportView]
|
||||||
[Date],
|
|
||||||
[ReportData],
|
|
||||||
[CreationDate],
|
|
||||||
[RevisionDate]
|
|
||||||
FROM [dbo].[OrganizationReport]
|
|
||||||
WHERE [Id] = @Id;
|
WHERE [Id] = @Id;
|
||||||
|
|
||||||
GO
|
GO
|
||||||
@ -88,31 +79,7 @@ AS
|
|||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
[Id],
|
*
|
||||||
[OrganizationId],
|
FROM [dbo].[OrganizationReportView]
|
||||||
[Date],
|
|
||||||
[ReportData],
|
|
||||||
[CreationDate],
|
|
||||||
[RevisionDate]
|
|
||||||
FROM [dbo].[OrganizationReport]
|
|
||||||
WHERE [OrganizationId] = @OrganizationId;
|
WHERE [OrganizationId] = @OrganizationId;
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationReport_Update]
|
|
||||||
@Id UNIQUEIDENTIFIER OUTPUT,
|
|
||||||
@OrganizationId UNIQUEIDENTIFIER,
|
|
||||||
@Date DATETIME2(7),
|
|
||||||
@ReportData NVARCHAR(MAX),
|
|
||||||
@CreationDate DATETIME2(7),
|
|
||||||
@RevisionDate DATETIME2(7)
|
|
||||||
AS
|
|
||||||
SET NOCOUNT ON;
|
|
||||||
|
|
||||||
UPDATE [dbo].[OrganizationReport]
|
|
||||||
SET [OrganizationId] = @OrganizationId,
|
|
||||||
[Date] = @Date,
|
|
||||||
[ReportData] = @ReportData,
|
|
||||||
[RevisionDate] = @RevisionDate
|
|
||||||
WHERE [Id] = @Id;
|
|
||||||
|
|
||||||
GO
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
IF OBJECT_ID('dbo.OrganizationApplication') IS NULL
|
IF OBJECT_ID('dbo.OrganizationApplication') IS NULL
|
||||||
BEGIN
|
BEGIN
|
||||||
CREATE TABLE [dbo].[OrganizationApplication]
|
CREATE TABLE [dbo].[OrganizationApplication] (
|
||||||
(
|
|
||||||
[Id] UNIQUEIDENTIFIER NOT NULL,
|
[Id] UNIQUEIDENTIFIER NOT NULL,
|
||||||
[OrganizationId] UNIQUEIDENTIFIER NOT NULL,
|
[OrganizationId] UNIQUEIDENTIFIER NOT NULL,
|
||||||
[Applications] NVARCHAR(MAX) NOT NULL,
|
[Applications] NVARCHAR(MAX) NOT NULL,
|
||||||
@ -13,14 +12,11 @@ BEGIN
|
|||||||
|
|
||||||
CREATE NONCLUSTERED INDEX [IX_OrganizationApplication_OrganizationId]
|
CREATE NONCLUSTERED INDEX [IX_OrganizationApplication_OrganizationId]
|
||||||
ON [dbo].[OrganizationApplication]([OrganizationId] ASC);
|
ON [dbo].[OrganizationApplication]([OrganizationId] ASC);
|
||||||
|
|
||||||
END
|
END
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE OR ALTER VIEW [dbo].[OrganizationApplicationView]
|
CREATE OR ALTER VIEW [dbo].[OrganizationApplicationView] AS
|
||||||
AS
|
SELECT * FROM [dbo].[OrganizationApplication];
|
||||||
SELECT *
|
|
||||||
FROM [dbo].[OrganizationApplication];
|
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_Create]
|
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_Create]
|
||||||
@ -48,35 +44,6 @@ AS
|
|||||||
@CreationDate,
|
@CreationDate,
|
||||||
@RevisionDate
|
@RevisionDate
|
||||||
);
|
);
|
||||||
|
|
||||||
GO
|
|
||||||
|
|
||||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_DeleteById]
|
|
||||||
@Id UNIQUEIDENTIFIER
|
|
||||||
AS
|
|
||||||
SET NOCOUNT ON;
|
|
||||||
|
|
||||||
DELETE FROM
|
|
||||||
[dbo].[OrganizationApplication]
|
|
||||||
WHERE
|
|
||||||
[Id] = @Id;
|
|
||||||
|
|
||||||
GO
|
|
||||||
|
|
||||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_ReadById]
|
|
||||||
@Id UNIQUEIDENTIFIER
|
|
||||||
AS
|
|
||||||
SET NOCOUNT ON;
|
|
||||||
|
|
||||||
SELECT
|
|
||||||
[Id],
|
|
||||||
[OrganizationId],
|
|
||||||
[Applications],
|
|
||||||
[CreationDate],
|
|
||||||
[RevisionDate]
|
|
||||||
FROM [dbo].[OrganizationApplicationView]
|
|
||||||
WHERE [Id] = @Id;
|
|
||||||
|
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_ReadByOrganizationId]
|
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_ReadByOrganizationId]
|
||||||
@ -85,14 +52,20 @@ AS
|
|||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
[Id],
|
*
|
||||||
[OrganizationId],
|
|
||||||
[Applications],
|
|
||||||
[CreationDate],
|
|
||||||
[RevisionDate]
|
|
||||||
FROM [dbo].[OrganizationApplicationView]
|
FROM [dbo].[OrganizationApplicationView]
|
||||||
WHERE [OrganizationId] = @OrganizationId;
|
WHERE [OrganizationId] = @OrganizationId;
|
||||||
|
GO
|
||||||
|
|
||||||
|
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_ReadById]
|
||||||
|
@Id UNIQUEIDENTIFIER
|
||||||
|
AS
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
*
|
||||||
|
FROM [dbo].[OrganizationApplicationView]
|
||||||
|
WHERE [Id] = @Id;
|
||||||
GO
|
GO
|
||||||
|
|
||||||
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_Update]
|
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_Update]
|
||||||
@ -103,11 +76,22 @@ CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_Update]
|
|||||||
@RevisionDate DATETIME2(7)
|
@RevisionDate DATETIME2(7)
|
||||||
AS
|
AS
|
||||||
SET NOCOUNT ON;
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
UPDATE [dbo].[OrganizationApplication]
|
UPDATE [dbo].[OrganizationApplication]
|
||||||
SET
|
SET
|
||||||
[OrganizationId] = @OrganizationId,
|
[OrganizationId] = @OrganizationId,
|
||||||
[Applications] = @Applications,
|
[Applications] = @Applications,
|
||||||
|
[CreationDate] = @CreationDate,
|
||||||
[RevisionDate] = @RevisionDate
|
[RevisionDate] = @RevisionDate
|
||||||
WHERE [Id] = @Id;
|
WHERE [Id] = @Id;
|
||||||
|
|
||||||
GO
|
GO
|
||||||
|
|
||||||
|
CREATE OR ALTER PROCEDURE [dbo].[OrganizationApplication_DeleteById]
|
||||||
|
@Id UNIQUEIDENTIFIER
|
||||||
|
AS
|
||||||
|
SET NOCOUNT ON;
|
||||||
|
|
||||||
|
DELETE FROM [dbo].[OrganizationApplication]
|
||||||
|
WHERE [Id] = @Id;
|
||||||
|
GO
|
||||||
|
@ -25,6 +25,53 @@ namespace Bit.MySqlMigrations.Migrations
|
|||||||
|
|
||||||
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
MySqlModelBuilderExtensions.AutoIncrementColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Bit.Core.Dirt.Reports.Models.Data.OrganizationMemberBaseDetail", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("CipherId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CollectionId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<string>("CollectionName")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<Guid?>("GroupId")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<string>("GroupName")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<bool?>("HidePasswords")
|
||||||
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
b.Property<bool?>("Manage")
|
||||||
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
b.Property<bool?>("ReadOnly")
|
||||||
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
b.Property<string>("ResetPasswordKey")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<string>("TwoFactorProviders")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<Guid?>("UserGuid")
|
||||||
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
|
b.Property<bool>("UsesKeyConnector")
|
||||||
|
.HasColumnType("tinyint(1)");
|
||||||
|
|
||||||
|
b.ToTable("OrganizationMemberBaseDetails");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
|
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -970,9 +1017,6 @@ namespace Bit.MySqlMigrations.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("longtext");
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
b.Property<DateTime>("RevisionDate")
|
|
||||||
.HasColumnType("datetime(6)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Id")
|
b.HasIndex("Id")
|
||||||
|
@ -42,8 +42,7 @@ public partial class _2025061300_OrganizationReportsql : Migration
|
|||||||
Date = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
Date = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
||||||
ReportData = table.Column<string>(type: "longtext", nullable: false)
|
ReportData = table.Column<string>(type: "longtext", nullable: false)
|
||||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||||
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false),
|
CreationDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
||||||
RevisionDate = table.Column<DateTime>(type: "datetime(6)", nullable: false)
|
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
@ -1014,9 +1014,6 @@ namespace Bit.MySqlMigrations.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("longtext");
|
.HasColumnType("longtext");
|
||||||
|
|
||||||
b.Property<DateTime>("RevisionDate")
|
|
||||||
.HasColumnType("datetime(6)");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Id")
|
b.HasIndex("Id")
|
||||||
|
@ -26,6 +26,53 @@ namespace Bit.PostgresMigrations.Migrations
|
|||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("Bit.Core.Dirt.Reports.Models.Data.OrganizationMemberBaseDetail", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("CipherId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CollectionId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<string>("CollectionName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<Guid?>("GroupId")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<string>("GroupName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool?>("HidePasswords")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool?>("Manage")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool?>("ReadOnly")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("ResetPasswordKey")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("TwoFactorProviders")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<Guid?>("UserGuid")
|
||||||
|
.HasColumnType("uuid");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("UsesKeyConnector")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.ToTable("OrganizationMemberBaseDetails");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
|
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -975,9 +1022,6 @@ namespace Bit.PostgresMigrations.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime>("RevisionDate")
|
|
||||||
.HasColumnType("timestamp with time zone");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Id")
|
b.HasIndex("Id")
|
||||||
|
@ -39,8 +39,7 @@ public partial class _2025061300_OrganizationReportsql : Migration
|
|||||||
OrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
|
OrganizationId = table.Column<Guid>(type: "uuid", nullable: false),
|
||||||
Date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
Date = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
||||||
ReportData = table.Column<string>(type: "text", nullable: false),
|
ReportData = table.Column<string>(type: "text", nullable: false),
|
||||||
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
|
CreationDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
||||||
RevisionDate = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
|
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
@ -1019,9 +1019,6 @@ namespace Bit.PostgresMigrations.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<DateTime>("RevisionDate")
|
|
||||||
.HasColumnType("timestamp with time zone");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Id")
|
b.HasIndex("Id")
|
||||||
|
@ -20,6 +20,53 @@ namespace Bit.SqliteMigrations.Migrations
|
|||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
||||||
|
|
||||||
|
modelBuilder.Entity("Bit.Core.Dirt.Reports.Models.Data.OrganizationMemberBaseDetail", b =>
|
||||||
|
{
|
||||||
|
b.Property<Guid>("CipherId")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<Guid?>("CollectionId")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("CollectionName")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<Guid?>("GroupId")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("GroupName")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<bool?>("HidePasswords")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<bool?>("Manage")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<bool?>("ReadOnly")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.Property<string>("ResetPasswordKey")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("TwoFactorProviders")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<Guid?>("UserGuid")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
|
b.Property<bool>("UsesKeyConnector")
|
||||||
|
.HasColumnType("INTEGER");
|
||||||
|
|
||||||
|
b.ToTable("OrganizationMemberBaseDetails");
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
|
modelBuilder.Entity("Bit.Infrastructure.EntityFramework.AdminConsole.Models.Organization", b =>
|
||||||
{
|
{
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
@ -959,9 +1006,6 @@ namespace Bit.SqliteMigrations.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<DateTime>("RevisionDate")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Id")
|
b.HasIndex("Id")
|
||||||
|
@ -39,8 +39,7 @@ public partial class _2025061300_OrganizationReportsql : Migration
|
|||||||
OrganizationId = table.Column<Guid>(type: "TEXT", nullable: false),
|
OrganizationId = table.Column<Guid>(type: "TEXT", nullable: false),
|
||||||
Date = table.Column<DateTime>(type: "TEXT", nullable: false),
|
Date = table.Column<DateTime>(type: "TEXT", nullable: false),
|
||||||
ReportData = table.Column<string>(type: "TEXT", nullable: false),
|
ReportData = table.Column<string>(type: "TEXT", nullable: false),
|
||||||
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: false),
|
CreationDate = table.Column<DateTime>(type: "TEXT", nullable: false)
|
||||||
RevisionDate = table.Column<DateTime>(type: "TEXT", nullable: false)
|
|
||||||
},
|
},
|
||||||
constraints: table =>
|
constraints: table =>
|
||||||
{
|
{
|
||||||
|
@ -1003,9 +1003,6 @@ namespace Bit.SqliteMigrations.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("TEXT");
|
.HasColumnType("TEXT");
|
||||||
|
|
||||||
b.Property<DateTime>("RevisionDate")
|
|
||||||
.HasColumnType("TEXT");
|
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.HasIndex("Id")
|
b.HasIndex("Id")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user