27 lines
780 B
Transact-SQL
27 lines
780 B
Transact-SQL
if not exists (select top 1 1 from sys.objects where name = 'AppUser' and type = 'U')
|
|
begin
|
|
create table AppUser
|
|
(
|
|
UserId int identity(0, 1) constraint PK_AppUser primary key,
|
|
UserName varchar(100) not null,
|
|
[Password] varchar(100) not null,
|
|
FirstName varchar(100),
|
|
LastName varchar(100),
|
|
Email varchar(100),
|
|
ProfilePictureUrl varchar(200),
|
|
SecurityStamp varchar(200),
|
|
StatusId int constraint FK_AppUser_UserStatus references UserStatus(StatusId),
|
|
CreationDate datetime constraint DF_AppUser_CreationDate default getdate(),
|
|
FailedLoginAttempts int,
|
|
LastLoginDate datetime,
|
|
PasswordChangeDate datetime
|
|
)
|
|
end
|
|
go
|
|
|
|
if not exists (select top 1 1 from AppUser)
|
|
begin
|
|
insert into AppUser(UserName, [Password])
|
|
select '***REMOVED***', '***REMOVED***'
|
|
end
|
|
go |