mirror of
https://github.com/bitwarden/server
synced 2026-01-09 20:13:24 +00:00
* Add send HideEmail to tables and models * Respect HideEmail setting for Sends * Recreate SendView to include new HideEmail column * Enforce new Send policy * Insert default value for new HideEmail column * Delete c95d7598-71cc-4eab-8b08-aced0045198b.json * Remove unrelated files * Revert disableSendPolicy, add sendOptionsPolicy * Minor style fixes * Update SQL project with Send.HideEmail column * unit test SendOptionsPolicy.DisableHideEmail * Add SendOptionsPolicy to Portal * Make HideEmail nullable, fix migrator script * Remove NOT NULL constraint from HideEmail * Fix style * Make HideEmail nullable * minor fixes to model and error message * Move SendOptionsExemption banner Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
31 lines
1.2 KiB
Transact-SQL
31 lines
1.2 KiB
Transact-SQL
CREATE TABLE [dbo].[Send] (
|
|
[Id] UNIQUEIDENTIFIER NOT NULL,
|
|
[UserId] UNIQUEIDENTIFIER NULL,
|
|
[OrganizationId] UNIQUEIDENTIFIER NULL,
|
|
[Type] TINYINT NOT NULL,
|
|
[Data] VARCHAR(MAX) NOT NULL,
|
|
[Key] VARCHAR (MAX) NOT NULL,
|
|
[Password] NVARCHAR (300) NULL,
|
|
[MaxAccessCount] INT NULL,
|
|
[AccessCount] INT NOT NULL,
|
|
[CreationDate] DATETIME2 (7) NOT NULL,
|
|
[RevisionDate] DATETIME2 (7) NOT NULL,
|
|
[ExpirationDate] DATETIME2 (7) NULL,
|
|
[DeletionDate] DATETIME2 (7) NOT NULL,
|
|
[Disabled] BIT NOT NULL,
|
|
[HideEmail] BIT NULL,
|
|
CONSTRAINT [PK_Send] PRIMARY KEY CLUSTERED ([Id] ASC),
|
|
CONSTRAINT [FK_Send_Organization] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organization] ([Id]),
|
|
CONSTRAINT [FK_Send_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id])
|
|
);
|
|
|
|
|
|
GO
|
|
CREATE NONCLUSTERED INDEX [IX_Send_UserId_OrganizationId]
|
|
ON [dbo].[Send]([UserId] ASC, [OrganizationId] ASC);
|
|
|
|
GO
|
|
CREATE NONCLUSTERED INDEX [IX_Send_DeletionDate]
|
|
ON [dbo].[Send]([DeletionDate] ASC);
|
|
|