mirror of
https://github.com/bitwarden/server.git
synced 2024-11-27 13:05:23 +01:00
0da62f9cee
- Add default constraint - Update sprocs to remove column - Drop column
26 lines
498 B
Transact-SQL
26 lines
498 B
Transact-SQL
-- Finalise removal of Group.AccessAll column
|
|
-- Drop the column
|
|
|
|
IF OBJECT_ID('[dbo].[DF_Group_AccessAll]', 'D') IS NOT NULL
|
|
BEGIN
|
|
ALTER TABLE [dbo].[Group]
|
|
DROP CONSTRAINT [DF_Group_AccessAll];
|
|
END
|
|
GO
|
|
|
|
IF COL_LENGTH('[dbo].[Group]', 'AccessAll') IS NOT NULL
|
|
BEGIN
|
|
ALTER TABLE
|
|
[dbo].[Group]
|
|
DROP COLUMN
|
|
[AccessAll]
|
|
END
|
|
GO
|
|
|
|
-- Refresh views
|
|
IF OBJECT_ID('[dbo].[GroupView]') IS NOT NULL
|
|
BEGIN
|
|
EXECUTE sp_refreshsqlmodule N'[dbo].[GroupView]';
|
|
END
|
|
GO
|