tuitio/IdentityServer.Domain.Data/Scripts/1.0.0/03.IDX_AppUser_Email_NOTNUL...

6 lines
239 B
MySQL
Raw Normal View History

if not exists (select top 1 1 from sys.indexes where name = 'IDX_AppUser_Email_NOTNULL' AND object_id = OBJECT_ID('AppUser'))
begin
CREATE UNIQUE NONCLUSTERED INDEX IDX_AppUser_Email_NOTNULL
ON AppUser(Email)
WHERE Email IS NOT NULL
end