1
0
mirror of https://github.com/bitwarden/server synced 2025-12-16 00:03:54 +00:00

Add transition migration to populate MaxStorageGbIncreased

This migration populates the MaxStorageGbIncreased column for Users and
Organizations by setting it to MaxStorageGb + 4, representing the storage
increase from 1GB to 5GB.

This migration depends on PM-27603 being deployed first to create the
MaxStorageGbIncreased column.

Target release: January 6th, 2026

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Cy Okeke
2025-11-14 10:48:05 +01:00
parent de90108e0f
commit 9851dd2ab8

View File

@@ -0,0 +1,13 @@
-- Populate MaxStorageGbIncreased for Users
-- Set MaxStorageGbIncreased = MaxStorageGb + 4 for all users with storage quota
UPDATE [dbo].[User]
SET [MaxStorageGbIncreased] = [MaxStorageGb] + 4
WHERE [MaxStorageGb] IS NOT NULL;
GO
-- Populate MaxStorageGbIncreased for Organizations
-- Set MaxStorageGbIncreased = MaxStorageGb + 4 for all organizations with storage quota
UPDATE [dbo].[Organization]
SET [MaxStorageGbIncreased] = [MaxStorageGb] + 4
WHERE [MaxStorageGb] IS NOT NULL;
GO