mirror of
https://github.com/bitwarden/server
synced 2025-12-17 08:43:27 +00:00
Fixup device table user FK cascade
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
IF OBJECT_ID('[dbo].[FK_Device_User]', 'F') IS NOT NULL
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[Device]
|
||||
DROP CONSTRAINT [FK_Device_User]
|
||||
END
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Device]
|
||||
ADD CONSTRAINT [FK_Device_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id]) ON DELETE CASCADE
|
||||
GO
|
||||
Reference in New Issue
Block a user