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

19 lines
477 B
MySQL
Raw Normal View History

2021-11-10 15:14:58 +02:00
if not exists (select top 1 1 from sys.objects where name = 'UserStatus' and type = 'U')
begin
create table UserStatus
(
StatusId int identity(0, 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