mirror of
https://github.com/bitwarden/server.git
synced 2025-05-25 13:24:50 -05:00
check if column exists
This commit is contained in:
parent
756b2b4e73
commit
c533a3aa8c
@ -1,11 +1,11 @@
|
||||
-- Add `Emails` field that stores a comma-separated list of email addresses for
|
||||
-- email/OTP authentication to table and write methods. The read methods
|
||||
-- don't need to be updated because they all use `*`.
|
||||
|
||||
IF (EXISTS (SELECT *
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = 'dbo'
|
||||
AND TABLE_NAME = 'Send'))
|
||||
IF NOT EXISTS(
|
||||
SELECT *
|
||||
FROM [sys].[columns]
|
||||
WHERE [object_id] = OBJECT_ID(N'[dbo].[Send]')
|
||||
AND [name] = 'Emails')
|
||||
BEGIN
|
||||
ALTER TABLE [dbo].[Send] ADD [Emails] NVARCHAR(1024) NULL;
|
||||
END
|
||||
|
Loading…
x
Reference in New Issue
Block a user