1
0
mirror of https://github.com/bitwarden/server.git synced 2024-12-05 14:23:30 +01:00
bitwarden-server/util/Migrator/DbScripts/2024-09-24_00_DropOrganizationUserAccessAll_DefaultColumnValue.sql
Thomas Rittson f7bc5dfb2e
[PM-10365] Drop OrganizationUser AccessAll (#4701)
* Remove OrganizationUser.AccessAll

* Final database migrations
2024-09-24 16:26:35 +10:00

12 lines
463 B
Transact-SQL

-- Finalise removal of OrganizationUser.AccessAll column
-- Add default column value
-- Sprocs already have default value for rollback purposes, this just supports dropping the column itself
IF OBJECT_ID('[dbo].[DF_OrganizationUser_AccessAll]', 'D') IS NULL
AND COL_LENGTH('[dbo].[OrganizationUser]', 'AccessAll') IS NOT NULL
BEGIN
ALTER TABLE [dbo].[OrganizationUser]
ADD CONSTRAINT [DF_OrganizationUser_AccessAll] DEFAULT (0) FOR [AccessAll];
END
GO