mirror of
https://github.com/bitwarden/server.git
synced 2025-02-23 03:01:23 +01:00
add renewal reminder date prop to users
This commit is contained in:
parent
0524630c33
commit
476ee53931
@ -32,6 +32,7 @@ namespace Bit.Core.Models.Table
|
||||
public string PrivateKey { get; set; }
|
||||
public bool Premium { get; set; }
|
||||
public DateTime? PremiumExpirationDate { get; set; }
|
||||
public DateTime? RenewalReminderDate { get; set; }
|
||||
public long? Storage { get; set; }
|
||||
public short? MaxStorageGb { get; set; }
|
||||
public GatewayType? Gateway { get; set; }
|
||||
|
@ -17,6 +17,7 @@
|
||||
@PrivateKey NVARCHAR(MAX),
|
||||
@Premium BIT,
|
||||
@PremiumExpirationDate DATETIME2(7),
|
||||
@RenewalReminderDate DATETIME2(7),
|
||||
@Storage BIGINT,
|
||||
@MaxStorageGb SMALLINT,
|
||||
@Gateway TINYINT,
|
||||
@ -49,6 +50,7 @@ BEGIN
|
||||
[PrivateKey],
|
||||
[Premium],
|
||||
[PremiumExpirationDate],
|
||||
[RenewalReminderDate],
|
||||
[Storage],
|
||||
[MaxStorageGb],
|
||||
[Gateway],
|
||||
@ -78,6 +80,7 @@ BEGIN
|
||||
@PrivateKey,
|
||||
@Premium,
|
||||
@PremiumExpirationDate,
|
||||
@RenewalReminderDate,
|
||||
@Storage,
|
||||
@MaxStorageGb,
|
||||
@Gateway,
|
||||
|
@ -17,6 +17,7 @@
|
||||
@PrivateKey NVARCHAR(MAX),
|
||||
@Premium BIT,
|
||||
@PremiumExpirationDate DATETIME2(7),
|
||||
@RenewalReminderDate DATETIME2(7),
|
||||
@Storage BIGINT,
|
||||
@MaxStorageGb SMALLINT,
|
||||
@Gateway TINYINT,
|
||||
@ -49,6 +50,7 @@ BEGIN
|
||||
[PrivateKey] = @PrivateKey,
|
||||
[Premium] = @Premium,
|
||||
[PremiumExpirationDate] = @PremiumExpirationDate,
|
||||
[RenewalReminderDate] = @RenewalReminderDate,
|
||||
[Storage] = @Storage,
|
||||
[MaxStorageGb] = @MaxStorageGb,
|
||||
[Gateway] = @Gateway,
|
||||
|
@ -17,6 +17,7 @@
|
||||
[PrivateKey] VARCHAR (MAX) NULL,
|
||||
[Premium] BIT NOT NULL,
|
||||
[PremiumExpirationDate] DATETIME2 (7) NULL,
|
||||
[RenewalReminderDate] DATETIME2 (7) NULL,
|
||||
[Storage] BIGINT NULL,
|
||||
[MaxStorageGb] SMALLINT NULL,
|
||||
[Gateway] TINYINT NULL,
|
||||
@ -33,3 +34,7 @@ GO
|
||||
CREATE UNIQUE NONCLUSTERED INDEX [IX_User_Email]
|
||||
ON [dbo].[User]([Email] ASC);
|
||||
|
||||
GO
|
||||
CREATE UNIQUE NONCLUSTERED INDEX [IX_User_Premium_PremiumExpirationDate_RenewalReminderDate]
|
||||
ON [dbo].[User]([Premium] ASC, [PremiumExpirationDate] ASC, [RenewalReminderDate] ASC);
|
||||
|
||||
|
@ -1,4 +1,13 @@
|
||||
IF OBJECT_ID('[dbo].[Collection_ReadByUserId]') IS NOT NULL
|
||||
IF COL_LENGTH('[dbo].[User]', 'RenewalReminderDate') IS NULL
|
||||
BEGIN
|
||||
ALTER TABLE
|
||||
[dbo].[User]
|
||||
ADD
|
||||
[RenewalReminderDate] DATETIME2 (7) NULL
|
||||
END
|
||||
GO
|
||||
|
||||
IF OBJECT_ID('[dbo].[Collection_ReadByUserId]') IS NOT NULL
|
||||
BEGIN
|
||||
DROP PROCEDURE [dbo].[Collection_ReadByUserId]
|
||||
END
|
||||
@ -236,3 +245,17 @@ BEGIN
|
||||
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationId] @OrganizationId
|
||||
END
|
||||
GO
|
||||
|
||||
IF EXISTS(SELECT * FROM sys.views WHERE [Name] = 'UserView')
|
||||
BEGIN
|
||||
DROP VIEW [dbo].[UserView]
|
||||
END
|
||||
GO
|
||||
|
||||
CREATE VIEW [dbo].[UserView]
|
||||
AS
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
[dbo].[User]
|
||||
GO
|
||||
|
Loading…
Reference in New Issue
Block a user