mirror of
https://github.com/bitwarden/server.git
synced 2026-01-31 22:23:18 +08:00
11 lines
416 B
MySQL
11 lines
416 B
MySQL
|
|
BEGIN
|
||
|
|
IF EXISTS (SELECT 1 FROM sys.foreign_keys WHERE name = N'FK_NotificationStatus_Notification')
|
||
|
|
BEGIN
|
||
|
|
ALTER TABLE [dbo].[NotificationStatus] DROP CONSTRAINT [FK_NotificationStatus_Notification]
|
||
|
|
END
|
||
|
|
|
||
|
|
ALTER TABLE [dbo].[NotificationStatus]
|
||
|
|
ADD CONSTRAINT [FK_NotificationStatus_Notification] FOREIGN KEY ([NotificationId]) REFERENCES [dbo].[Notification]([Id]) ON DELETE CASCADE
|
||
|
|
END
|
||
|
|
GO
|