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

17 lines
471 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
(
2021-11-11 01:20:02 +02:00
StatusId int identity(1, 1) constraint PK_UserStatus primary key,
2021-11-10 15:14:58 +02:00
StatusCode varchar(30) not null,
StatusName varchar(50) not null
)
end
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