script fix
parent
3fe1721f85
commit
be76c3a5f3
|
@ -14,7 +14,7 @@ begin
|
|||
[Password] varchar(100) not null,
|
||||
FirstName varchar(100),
|
||||
LastName varchar(100),
|
||||
Email varchar(100) constraint UQ_AppUser_Email unique,
|
||||
Email varchar(100),
|
||||
ProfilePictureUrl varchar(200),
|
||||
SecurityStamp varchar(200) constraint UQ_AppUser_SecurityStamp unique,
|
||||
StatusId int not null constraint FK_AppUser_UserStatus references UserStatus(StatusId),
|
||||
|
@ -26,6 +26,14 @@ begin
|
|||
end
|
||||
go
|
||||
|
||||
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
|
||||
go
|
||||
|
||||
if not exists (select top 1 1 from AppUser)
|
||||
begin
|
||||
declare @activeStatusId int
|
||||
|
|
Loading…
Reference in New Issue