diff --git a/util/Migrator/DbScripts/2023-01-04_00_Send_Add_CipherId.sql b/util/Migrator/DbScripts/2024-01-04_00_Send_Add_CipherId.sql similarity index 81% rename from util/Migrator/DbScripts/2023-01-04_00_Send_Add_CipherId.sql rename to util/Migrator/DbScripts/2024-01-04_00_Send_Add_CipherId.sql index 49bb57c33f..be7e8d4fc7 100644 --- a/util/Migrator/DbScripts/2023-01-04_00_Send_Add_CipherId.sql +++ b/util/Migrator/DbScripts/2024-01-04_00_Send_Add_CipherId.sql @@ -7,19 +7,8 @@ BEGIN END GO --- Recreate View -IF OBJECT_ID('[dbo].[SendView]') IS NOT NULL -BEGIN - DROP VIEW [dbo].[SendView] -END -GO - -CREATE VIEW [dbo].[SendView] -AS -SELECT - * -FROM - [dbo].[Send] +-- Refresh View +EXECUTE sp_refreshview N'[dbo].[{SendView}]' GO CREATE OR ALTER PROCEDURE [dbo].[Send_Create] @@ -44,7 +33,7 @@ BEGIN SET NOCOUNT ON INSERT INTO [dbo].[Send] - ( + ( [Id], [UserId], [OrganizationId], @@ -61,25 +50,25 @@ BEGIN [Disabled], [HideEmail], [CipherId] - ) + ) VALUES - ( - @Id, - @UserId, - @OrganizationId, - @Type, - @Data, - @Key, - @Password, - @MaxAccessCount, - @AccessCount, - @CreationDate, - @RevisionDate, - @ExpirationDate, - @DeletionDate, - @Disabled, - @HideEmail, - @CipherId + ( + @Id, + @UserId, + @OrganizationId, + @Type, + @Data, + @Key, + @Password, + @MaxAccessCount, + @AccessCount, + @CreationDate, + @RevisionDate, + @ExpirationDate, + @DeletionDate, + @Disabled, + @HideEmail, + @CipherId ) IF @UserId IS NOT NULL @@ -90,7 +79,7 @@ BEGIN END EXEC [dbo].[User_BumpAccountRevisionDate] @UserId END - -- TODO: OrganizationId bump? +-- TODO: OrganizationId bump? END GO @@ -140,6 +129,6 @@ BEGIN BEGIN EXEC [dbo].[User_BumpAccountRevisionDate] @UserId END - -- TODO: OrganizationId bump? +-- TODO: OrganizationId bump? END -GO \ No newline at end of file +GO