tuitio/IdentityServer.Domain.Data/Scripts/1.0.1/01.UserStatus table.sql

19 lines
477 B
Transact-SQL

if not exists (select top 1 1 from sys.objects where name = 'UserStatus' and type = 'U')
begin
create table UserStatus
(
StatusId int identity(1, 1) constraint PK_UserStatus primary key,
StatusCode varchar(30) not null,
StatusName varchar(50) not null
)
end
go
if not exists (select top 1 1 from UserStatus)
begin
insert into UserStatus(StatusCode, StatusName)
select 'ACTIVE', 'Active' union
select 'INACTIVE', 'Inactive' union
select 'BLOCKED', 'Blocked'
end
go